From 005cdeef7db7ba6e153f4c5922c83c7160bf46aa Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Mon, 19 Jun 2023 12:55:26 -0400 Subject: [PATCH 1/4] add releaseNotes property to published dandiset --- dandischema/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dandischema/models.py b/dandischema/models.py index 7acc8fb..be6be1a 100644 --- a/dandischema/models.py +++ b/dandischema/models.py @@ -1657,6 +1657,11 @@ class PublishedDandiset(Dandiset, Publishable): description="Permalink to the Dandiset.", json_schema_extra={"readOnly": True, "nskey": "schema"}, ) + releaseNotes: Optional[str] = Field( + None, + description="User notes for describing the release", + nskey="schema", + ) schemaKey: Literal["Dandiset"] = Field( "Dandiset", validate_default=True, json_schema_extra={"readOnly": True} From 03e53cddf664aef5efeda5bd8cea2d7c9d5e4359 Mon Sep 17 00:00:00 2001 From: Satrajit Ghosh Date: Wed, 21 Jun 2023 21:53:02 -0400 Subject: [PATCH 2/4] add releaseNotes to metadata dictionary --- dandischema/tests/test_models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dandischema/tests/test_models.py b/dandischema/tests/test_models.py index b4cd299..91d6de8 100644 --- a/dandischema/tests/test_models.py +++ b/dandischema/tests/test_models.py @@ -450,6 +450,7 @@ def test_dantimeta_1() -> None: meta_dict["version"] = "0.0.0" meta_dict.update(_basic_publishmeta(dandi_id="999999")) meta_dict["assetsSummary"].update(**{"numberOfBytes": 1, "numberOfFiles": 1}) + meta_dict["releaseNotes"] = "Releasing during testing" PublishedDandiset(**meta_dict) From 4a20cf28fc8863dc7768857d15369a965cdd474b Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 24 Oct 2023 11:43:25 -0400 Subject: [PATCH 3/4] Adjust description of the releaseNotes --- dandischema/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dandischema/models.py b/dandischema/models.py index be6be1a..a2c1201 100644 --- a/dandischema/models.py +++ b/dandischema/models.py @@ -1659,7 +1659,7 @@ class PublishedDandiset(Dandiset, Publishable): ) releaseNotes: Optional[str] = Field( None, - description="User notes for describing the release", + description="The description of the release", nskey="schema", ) From bd4474f83a1e7f353eb0efb307a7f60566b63471 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 3 Feb 2024 14:02:45 -0500 Subject: [PATCH 4/4] Adjust for pydantic 2.0 changes --- dandischema/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dandischema/models.py b/dandischema/models.py index a2c1201..a899563 100644 --- a/dandischema/models.py +++ b/dandischema/models.py @@ -1660,7 +1660,7 @@ class PublishedDandiset(Dandiset, Publishable): releaseNotes: Optional[str] = Field( None, description="The description of the release", - nskey="schema", + json_schema_extra={"readOnly": True, "nskey": "schema"}, ) schemaKey: Literal["Dandiset"] = Field(