From f1e8ff7468676e1c8c8858b54f73fdb3cc140eac Mon Sep 17 00:00:00 2001 From: Aaron Kanzer Date: Thu, 14 Mar 2024 11:53:05 -0400 Subject: [PATCH 1/2] Include additional valid LicenseType enums --- dandischema/models.py | 5 ++++- dandischema/tests/test_models.py | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dandischema/models.py b/dandischema/models.py index 20af8bd..d1a6d8d 100644 --- a/dandischema/models.py +++ b/dandischema/models.py @@ -118,9 +118,12 @@ class IdentifierType(Enum): class LicenseType(Enum): """An enumeration of supported licenses""" - + # DANDI-specific -- supported within https://spdx.org/licenses/ CC0_10 = "spdx:CC0-1.0" CC_BY_40 = "spdx:CC-BY-4.0" + # LINC Brain, other specific + UNLICENSED = "unlicensed" + PRIVATE = "private" class RelationType(Enum): diff --git a/dandischema/tests/test_models.py b/dandischema/tests/test_models.py index a5bc368..74321d7 100644 --- a/dandischema/tests/test_models.py +++ b/dandischema/tests/test_models.py @@ -321,6 +321,8 @@ def test_asset_digest() -> None: { "CC0_10": "spdx:CC0-1.0", "CC_BY_40": "spdx:CC-BY-4.0", + "PRIVATE": "private", + "UNLICENSED": "unlicensed", }, ), ( From a5ff126fd95b3488c551710dc7f3d12f0809cb6a Mon Sep 17 00:00:00 2001 From: Aaron Kanzer Date: Thu, 14 Mar 2024 11:55:39 -0400 Subject: [PATCH 2/2] run linter --- dandischema/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dandischema/models.py b/dandischema/models.py index d1a6d8d..fb15d03 100644 --- a/dandischema/models.py +++ b/dandischema/models.py @@ -118,6 +118,7 @@ class IdentifierType(Enum): class LicenseType(Enum): """An enumeration of supported licenses""" + # DANDI-specific -- supported within https://spdx.org/licenses/ CC0_10 = "spdx:CC0-1.0" CC_BY_40 = "spdx:CC-BY-4.0" @@ -1048,9 +1049,9 @@ class Activity(DandiBaseModel): # isPartOf: Optional["Activity"] = Field(None, json_schema_extra={"nskey": "schema"}) # hasPart: Optional["Activity"] = Field(None, json_schema_extra={"nskey": "schema"}) - wasAssociatedWith: Optional[List[Union[Person, Organization, Software, Agent]]] = ( - Field(None, json_schema_extra={"nskey": "prov"}) - ) + wasAssociatedWith: Optional[ + List[Union[Person, Organization, Software, Agent]] + ] = Field(None, json_schema_extra={"nskey": "prov"}) used: Optional[List[Equipment]] = Field( None, description="A listing of equipment used for the activity.",