@@ -374,7 +374,7 @@ def test_dandimeta_1() -> None:
374374
375375 assert DOI_PREFIX is not None
376376
377- # meta data without doi, datePublished and publishedBy
377+ # metadata without doi, datePublished and publishedBy
378378 meta_dict : Dict [str , Any ] = {
379379 "identifier" : f"{ INSTANCE_NAME } :999999" ,
380380 "id" : f"{ INSTANCE_NAME } :999999/draft" ,
@@ -463,7 +463,20 @@ def test_dandimeta_1() -> None:
463463 basic_publishmeta (INSTANCE_NAME , dandi_id = "999999" , prefix = DOI_PREFIX )
464464 )
465465 meta_dict ["assetsSummary" ].update (** {"numberOfBytes" : 1 , "numberOfFiles" : 1 })
466- PublishedDandiset (** meta_dict )
466+
467+ # Test that releaseNotes is optional (can be omitted)
468+ dandiset_without_notes = PublishedDandiset (** meta_dict )
469+ assert dandiset_without_notes .releaseNotes is None
470+
471+ # Test that releaseNotes can be set to a string value
472+ meta_dict ["releaseNotes" ] = "Releasing during testing"
473+ dandiset_with_notes = PublishedDandiset (** meta_dict )
474+ assert dandiset_with_notes .releaseNotes == "Releasing during testing"
475+
476+ # Test that releaseNotes appears in model_dump
477+ dumped = dandiset_with_notes .model_dump (exclude_none = True )
478+ assert "releaseNotes" in dumped
479+ assert dumped ["releaseNotes" ] == "Releasing during testing"
467480
468481
469482def test_schemakey () -> None :
0 commit comments