feat: introduce reusable types via types/unreleased #548
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
orinoco/concepts!548
Loading…
Reference in a new issue
No description provided.
Delete branch "rf-types"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Disclaimer: these changes are done using claude code but it was highly iterative to not only fulfill my goal but also to learn more about these schemas and linkml. I got to this while we were reviewing with @candleindark our auto-converted model for dandi-schema and question about centralizing regexes came up and we decided to look into types and then I saw duplicated and non centralized regexes here.
This PR introduces types/unreleased which centralizes some of the types in addition to types/v1
If this is somehow not aligned with what you are aiming for etc -- just feel free to close @mih .
Here is the summary claude code generate for me/us. Click to expand
Multiple schemas duplicated the same pattern definitions for identifiers (ORCID, DOI, ISSN) and relative paths. This centralizes them as proper LinkML types in types/unreleased, which can be imported by any schema regardless of whether it goes through the things or flat schema chain.
types/unreleased is reworked from a stale DEPRECATED copy of types/v1 into a lean DRAFT extension with 4 new types: OrcidNotation, DoiNotation, IssnNotation, and RelativePath. The original duplicate type definitions (EmailAddress, HexBinary, NodeUriOrCurie, NonNegativeInteger) and schema_type slot are removed — they already exist in types/v1. The schema is renamed to types-development-schema and its dltypes prefix aligned with types/v1 to avoid merge conflicts when both are imported transitively.
W3CISO8601 remains in things/unreleased (moved from things-properties/unreleased) rather than types/unreleased because things-properties/v1 and temporal-mixin/unreleased each define it with different URIs (dlthings:w3ctr-datetime vs w3ctr:NOTE-datetime), and placing it in types/unreleased causes merge conflicts for schemas importing both chains.
Specific changes per file:
ai produced mermaid diagram to depict includes etc but too large to see easily
Hey, thanks for the PR. However, I will close it.
The centralization aspect is good on its own, whoever, it solves a problem that only exists when deprecated/obsolete schema components are re-entangled with the current releases. This is not desirable.
AFAICS when looking from the perspective of any schema listed at https://concepts.datalad.org/#latest-releases there is no centralization, only added complexity by introducing a schema dependency to
things/v2+, which complicates handling.@ -68,4 +53,3 @@base: strtypeof: stringpattern: "^[a-fA-F0-9]+$"description: >-note to myself: I think this is THE (only)
v1/I managed to pull in here,and there is LOTS of other v1/ refs in unreleased.yaml otherwise
so requires a re-review
it has been awhile and my mental context is gone, but quickly re-looking through - I left a comment on where I added additional /v1 dependency... I think that is largely orthogonal aspect as there are many other v1 imports (which likely pull in that /v1 types anyways, didn't review the hierarchy diagram) and in added here specifically it could be reworked to not extend but create a copy instead (I hope), and then still achieve centralization (thus avoidance of duplicates).
Pull request closed