-
Notifications
You must be signed in to change notification settings - Fork 16
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
Graph.validate() fails when Brick ontology is preloaded to the graph #106
Comments
This is due to recent changes in QUDT, which caught some insufficient extensions of QUDT we were doing in Brick. As long as you just have these QUDT results in your validation result, you should be ok. We are working on fixing these validation issues in the main Brick repo |
Is there a recommended workaround? Currently, I'm using this hard-coded if condition ...
valid, _, results_text = g.validate()
qudt_errors = True if results_text.count("Result Path: brick:hasQUDTReference") == 38 else False
if valid or qudt_errors:
print("Graph is valid")
else:
print("Graph is not valid")
print(results_text)
... |
Hi @Maghnie the reason this is failing is because you do not have the QUDT ontology loaded in. You can use https://github.com/gtfierro/ontoenv-rs?tab=readme-ov-file#python-library to load the dependency ontologies into the same graph before you validate, and that should address the issues. I will also make a note to update the tutorial and address these issues for future users! Please let me know if this addresses your issue and if you ahve any other questions |
Thanks for the quick reply! Can the pyontoenv package work on Windows? When I try to run the example from the pyontoenv readme, I get this error
And sure enough, my virtual environment doesn't have any source files for pyontoenv, even though I tried to install the package with |
Yes, it should work on Windows. If you update to |
Still won't work - I'm not sure if I'm missing something 😅. I updated the pyontoenv version and the
|
For a simple graph that only includes the Brick ontology, validation appears to fail.
The resulting report:
The text was updated successfully, but these errors were encountered: