Skip to content

fix: status's range is string instead of uriorcurie - #263

Draft
Silvanoc wants to merge 1 commit into
mainfrom
fix-status-slot
Draft

fix: status's range is string instead of uriorcurie#263
Silvanoc wants to merge 1 commit into
mainfrom
fix-status-slot

Conversation

@Silvanoc

@Silvanoc Silvanoc commented Jul 14, 2026

Copy link
Copy Markdown

The slot status declares it's range to be uriorcurie, but in fact bare strings like testing or unstable are being used in the metamodel itself (more details in the below linked issue). This patch aligns the specification with its current use.

Fixing it to remain uriorcurie would require multiple changes with bigger impact than this change. They might get implemented in the future.

Fixes: linkml/linkml#3760

@Silvanoc Silvanoc added the bug Something isn't working label Jul 14, 2026
The slot `status` declares it's range to be `string`, but in fact bare
strings like `testing` or `unstable` are being used in the metamodel
itself. This patch aligns the specification with its current use.

Fixing it to remain `uriorcurie` would require multiple changes with
bigger impact than this change. They might get implemented in the
future.

Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>

@matentzn matentzn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Silvanoc can you redo the PR with just the model changes? I will do the generation of files on a slightly different cadance (it also makes it clearer which files have actially changed other than linkml_model/model/schema/meta.yaml)

@Silvanoc

Copy link
Copy Markdown
Author

@Silvanoc can you redo the PR with just the model changes? I will do the generation of files on a slightly different cadance (it also makes it clearer which files have actially changed other than linkml_model/model/schema/meta.yaml)

@matentzn sure! Guess why I have two commits with exactly that split 😉 I'll drop the 2nd one and done.

- workflow status
domain: element
range: uriorcurie
range: string

@noelmcloughlin noelmcloughlin Jul 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we test this change against OWL generator?

While investigating linkml/linkml#3803 I tried this patch but found OwlSchemaGenerator.add_metadata() is silently dropping status annotation from OWL output due to this owlgen.py conditional

if metaslot_curie.startswith("linkml:"):
    # only mapped properties
    continue

This skips metaslots whose URI falls back to the native linkml: namespace - and after deleting slot_uri: bibo:status, the slot's URI becomes linkml:status, and every element's status value vanishes from the generated OWL.

https://github.com/linkml/linkml/blob/8e443f15faa4673acc3345923ea84199f73e7f50/packages/linkml/src/linkml/generators/owlgen.py#L379

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@noelmcloughlin it might be related with issue linkml/linkml#3752. Please give the attached PR a try.

@noelmcloughlin noelmcloughlin Jul 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems different bug... let me clarify

this PR alone is problematic. After removing slot_uri: bibo:status, slot's URI becomes linkml:status, and every element (ArrayExpression, apply_to, range_expression, etc.) status value vanishes from generated OWL (on my branch, I confirmed zero "testing" occurrences in my output, versus ~32 bibo:testing triples using alternative uriocurie approach). So a sibling PR forowlgen.py is needed to address fallout

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hmm, this PR is not changing status itself, only its range. Since you have tried it out, I assume that the explanation is not precise, but the problematic effect exists.

I'll switch this PR to draft until I've clarified the situation and, it needed, provided the required sibling PR for owlgen.py.

@Silvanoc Silvanoc Jul 24, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@noelmcloughlin I've realized this issue trying to make SchemaView.expand_curie strict (trying to expand something that is neither a URI -no expansion needed- nor a CURIE -can be expanded) on PR linkml/linkml#3805 (specifically commit linkml/linkml@85fb0c9). Apparently this and that PRs are somehow coupled together.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes, three lines in owlgen.py are coupled to this PR

if metaslot_curie.startswith("linkml:"):
    # only mapped properties
    continue

@Silvanoc
Silvanoc marked this pull request as draft July 24, 2026 20:13
@Silvanoc Silvanoc mentioned this pull request Jul 24, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

3 participants