v0.12.0 - Controlled instances typed from their documents, improved model version switching
LatestThis release fixes how the toolbox finds, types and reports its controlled instances, and makes selecting a model version within a session take effect for everything that depends on it. Nothing public is added, renamed or removed, so no migration is needed from v0.11.0.
Removed
- The
RecursionDepthoption ofopenminds.internal.FileMetadataStore. The store now flattens the graph through aCollectionand writes every node, so a depth had no meaning left; a constructor call that still passes it fails (#181).
Fixed
- The type of controlled instances is read from the
@typeeach instance document declares, instead of the name of the folder it is stored in. The hand-maintained map from plural folder names to types is gone; it had fallen behind the v5.0 renames and left 115 instances of five types untyped, with a warning for each, andparseInstanceIRIfailed on the same IRIs (#184). - Selecting a model version is improved: the metatype registry is cleared and the instance library is rebuilt against the selected version. (#184, #191).
- The instance library follows the model version instead of always reading
latest. Model versions 1 and 2, which the library publishes no instances for, are reported as such rather than looking like an empty library, and a library that is absent or incomplete no longer stops a model version from being selected (#184). - A
ControlledTermconstructed from an instance IRI of another model version resolves instead of failing on a missingloadmethod, and a term found in the library takes the library's identifier whichever way it was named. A controlled term can be read from a JSON-LD document, and a name is never taken for a file (#179). FileMetadataStore.savewrites every linked node, as the folder store does; a Person saved with a linked ORCID reloads whole (#181).- On a fresh installation the instance library downloads on first use; it was rejected for not existing before it could.
getControlledInstanceno longer guesses folder names (#188). - When MATLAB has no user folder, as on Linux without
$HOME/Documents, the toolbox keeps its downloads under the temporary folder and warns once, naming the folder and how to choose another, instead of building relative paths that stop working when the working directory changes (#184). - A repository download that fails part way leaves the previous copy in place instead of a folder that exists but is incomplete (#192).
- Warnings and errors that carried no identifier carry one:
openMINDS:ControlledTerm:UnknownInstanceName,openMINDS:MultipleModelVersionsOnPath,openMINDS:ParseInstanceIRI:NotAnInstanceIRI,openminds:Collection:SkippedNonInstance,openminds:MixedTypeSet:UnsupportedStructure(#179, #181, #188). - The display of a
Contributionis fixed forContributionswith multiple contributors (regenerated types, f309e77).
Internal
- The instance library tests read a small library kept with the tests, through
ommtest.helper.InstanceLibraryFixture, and need no network; what only the downloaded library can answer stays inInstanceLibraryIntegrationTest(#190). ommtest.helper.ModelVersionFixturerestores the model version a test found, whether the test passes or fails (#180).- Removed:
openminds.internal.vocab.getPluralToSingularTypeMapandopenminds.internal.constants.SandsInstanceFolders.InstanceLibrary.LibraryVersionis read-only, andgetControlledInstanceno longer takes a module (#184, #188). - The folders under the user folder,
openminds.internal.constants.Paths, resolve on first use rather than when the class loads (#184).
All merged pull requests
What's Changed
Fixed
- fix: resolve a controlled instance IRI from another schema version by @ehennestad in #179
- fix: address the critical TODOs outside the generator by @ehennestad in #181
- fix: resolve instance types from the type each instance declares by @ehennestad in #184
- fix: report what a controlled instance lookup cannot resolve by @ehennestad in #188
- fix: release the type registry when a model version is selected by @ehennestad in #191
- fix: keep the previous repository copy when a download fails part way by @ehennestad in #192
Internal
- test: restore the model version a test found, through a fixture by @ehennestad in #180
- test: read the instance library from a small library kept with the tests by @ehennestad in #190
Full Changelog: v0.11.0...v0.12.0