Skip to content
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

Warnings generated when run against the current SPDX 3 Model #142

Closed
goneall opened this issue Aug 29, 2024 · 4 comments
Closed

Warnings generated when run against the current SPDX 3 Model #142

goneall opened this issue Aug 29, 2024 · 4 comments
Assignees

Comments

@goneall
Copy link
Member

goneall commented Aug 29, 2024

The following warnings are generated when running against the SPDX 3 model:

C:\Users\gary\git\spec-parser\venv\Lib\site-packages\rdflib\plugins\serializers\rdfxml.py:280: UserWarning: Assertions on rdflib.term.BNode('Nff3935e9f1bc44e4b727a01139b2bb3f') other than RDF.first and RDF.rest are ignored ... including RDF.List
  self.predicate(predicate, object, depth + 1)

Attached is a zip of the model directory:
model.zip

@zvr
Copy link
Member

zvr commented Aug 31, 2024

Yes, it's a RDFlib limitation (RDFlib is the Python library used for handling RDF).
One of the serializers (the "prettyXML" one) does not handle assertions other than first and rest (as it says).

You can check it on the source code upstream at https://rdflib.readthedocs.io/en/stable/_modules/rdflib/plugins/serializers/rdfxml.html
(search for # Warn that any assertions on object to get the exact line)

This started appearing when we introduced blank nodes (I think all warnings are about blank nodes).

I have not had the time to compare all different serialization to establish what is actually missing and how much of a problem it is in practice.

@goneall
Copy link
Member Author

goneall commented Aug 31, 2024

I have not had the time to compare all different serialization to establish what is actually missing and how much of a problem it is in practice.

I have not seen any issue myself in the produced model artifacts.

@zvr
Copy link
Member

zvr commented Sep 10, 2024

OK, after further research, my comment above still holds.

The outcome is that the ontology generated by that specific serializer (the "prettyXML" one) does not contain the RDF that specifies that a property of a Vocabulary type has to take only one the values of the Vocabulary.

Presumably this will be fixed in RDFlib (upstream) at some point.

@zvr
Copy link
Member

zvr commented Jan 17, 2025

Closing this as nothing to do here; waiting for RDFlib fix.

@zvr zvr closed this as completed Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants