Skip to content

[owl]: erroneous ':' in generated URIs if no default_prefix #2578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Silvanoc opened this issue Mar 24, 2025 · 6 comments · May be fixed by linkml/linkml-runtime#378
Open

[owl]: erroneous ':' in generated URIs if no default_prefix #2578

Silvanoc opened this issue Mar 24, 2025 · 6 comments · May be fixed by linkml/linkml-runtime#378
Labels
bug Something that should work but isn't, with an example and a test case. community-generated schemaview

Comments

@Silvanoc
Copy link
Contributor

Silvanoc commented Mar 24, 2025

Describe the bug

Element URIs contained in generated OWL contain erroneous :. For example: https://example.org/my-schema/:MySubclass for the below provided schema. The issue appears only if no default_prefix is explicitly declared.

Version of LinkML you are using

v1.8.7

Please provide a schema (and if applicable, a data file) that replicates the issue

id: https://example.org/my-schema
prefixes:
  linkml: https://w3id.org/linkml/
  rdl: https://rds.posccaesar.org/ontology/lis14/rdl/
imports:
  - linkml:types
default_range: string

classes:
  MySubclass:
    is_a: FunctionalObject
  FunctionalObject:
    class_uri: rdl:FunctionalObject
@Silvanoc Silvanoc added the bug Something that should work but isn't, with an example and a test case. label Mar 24, 2025
@Silvanoc Silvanoc changed the title [owl]: erroneous ':' in generated URIs [owl]: erroneous ':' in generated URIs if no default_prefix Mar 24, 2025
@Silvanoc
Copy link
Contributor Author

Silvanoc commented Mar 24, 2025

@dalito since you appear to know the code probably involved in this issue, could you please have a look at this issue? Thanks!

I'm not blaming you! Your changes are posterior to the version of linkml-runtime (v1.8.3) integrated into the version of linkml (v1.8.7) that is showing this issue.

@dalito
Copy link
Member

dalito commented Mar 24, 2025

@Silvanoc - With which linkml-runtime version did you see this? Did you try the dev version of linkml-runtime?

@Silvanoc
Copy link
Contributor Author

@Silvanoc - With which linkml-runtime version did you see this? Did you try the dev version of linkml-runtime?

I have seen on linkml v1.8.7, which integrates linkml-runtime v1.8.3. I do not know what you mean with "dev version", is it the HEAD of main?

@dalito
Copy link
Member

dalito commented Mar 24, 2025

Yes, with "dev" I meant the current "main" branch. If I remember correctly, there were some changes made after v1.8.3 of linkml-runtime in code that could affect this. I don't have time right now but can have a look later.

@Silvanoc
Copy link
Contributor Author

Yes, there were some changes in dev... done by you 😄 That's why I pulled you in. Because it does not look as if you were fixing the issue in your changes, but you appear to know that code.

@dalito
Copy link
Member

dalito commented Mar 24, 2025

@Silvanoc - I made a PR with a fix and marked you as reviewer. This bug has been present since the creation of schemaview.py.

Silvanoc added a commit to linkml/linkml-runtime that referenced this issue Mar 25, 2025
Add regression test for issue #2578 [^1].

Issue was that SchemaView method `get_uri` was adding an errorneous ':'
when no `default_prefix` was being declared in the schema.

[^1]: linkml/linkml#2578

Signed-off-by: Silvano Cirujano Cuesta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that should work but isn't, with an example and a test case. community-generated schemaview
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants