Skip to content

Conversation

@apdavison
Copy link
Member

By default, uses the most recent release.

This is an alternative to #75.

The disadvantage of the approach in this PR is that the user needs to know which version of openMINDS was used to create the loaded file(s), which is fine if they created the files themselves, but a problem if someone else created them (e.g., a curator handling files generated by a data provider).

The advantages of this approach are (i) it avoids filling JSON-LD files with a lot of "schema:schemaVersion" entries, and (ii) it ensures all nodes are read with the same schema version. (The approach in #75 in theory opens the door to having a graph combining different openMINDS versions, which we probably don't want to do).

…Collection.load()`.

By default, uses the most recent release.
@apdavison apdavison added the enhancement New feature or request label Nov 17, 2025
from .base import Link


DEFAULT_VERSION = "v4"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe instead of using a constant here, it would be better to automatically select the latest version, excluding "latest" itself.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, that would be better. I propose to leave this for a future pull request.

newly_sorted.append(node_id)
unsorted -= set(newly_sorted)
return [self.nodes[node_id] for node_id in sorted]

Copy link
Member

Choose a reason for hiding this comment

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

An empty line seems to be missing.

Copy link
Member Author

Choose a reason for hiding this comment

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

no, I don't think so. I think it's just that GitHub doesn't show a line if the file ends with a linebreak

@Raphael-Gazzotti Raphael-Gazzotti merged commit 2248509 into openMetadataInitiative:pipeline Nov 17, 2025
3 checks passed
@apdavison apdavison deleted the specify-load-version branch November 17, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants