Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include additional valid LicenseType enums for downstream applications #230

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions dandischema/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,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):
Expand Down Expand Up @@ -1045,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[
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems running black linter reformatted here too.

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.",
Expand Down
2 changes: 2 additions & 0 deletions dandischema/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
),
(
Expand Down
Loading