Environment: openminds 0.5.1, Python 3.12
All Accessibility library instances (e.g. Accessibility.direct_virtual_open_access) define their properties as dicts {"@id": "..."} instead of typed objects. See openminds/v5/core/miscellaneous/accessibility.py
Minimal example
import openminds.latest
from openminds import Collection
from openminds.latest.core.miscellaneous.accessibility import Accessibility
from pathlib import Path
# Minimal collection
c = Collection()
c.add(Accessibility.direct_virtual_open_access)
# Validate
display(c.validate())
#Save
out_dir = Path("../test_accessibility")
out_dir.mkdir(exist_ok=True)
c.save(out_dir, individual_files=True, group_by_schema=True)
# Reload from disk — raises KeyError
c2 = Collection()
c2.load(out_dir, version="latest")
In this example, the referenced PaymentModelType instance is never added to the collection when saving, which causes a KeyError in Collection.load() .
Note: the same pattern likely affects other properties (channel, eligibility, form, process) of Accessibility library instances
Environment: openminds 0.5.1, Python 3.12
All
Accessibilitylibrary instances (e.g.Accessibility.direct_virtual_open_access) define their properties as dicts{"@id": "..."}instead of typed objects. See openminds/v5/core/miscellaneous/accessibility.pyMinimal example
In this example, the referenced
PaymentModelTypeinstance is never added to the collection when saving, which causes aKeyErrorinCollection.load().Note: the same pattern likely affects other properties (
channel,eligibility,form,process) ofAccessibilitylibrary instances