-
Notifications
You must be signed in to change notification settings - Fork 6
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
Create an Interface for programatically creating shapes #165
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking really great! Couple small changes and fixes
Once the API structure seems OK I'll move onto the additional steps |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## develop #165 +/- ##
========================================
Coverage 73.40% 73.40%
========================================
Files 31 31
Lines 2012 2012
========================================
Hits 1477 1477
Misses 535 535 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
694e4c8
to
ad4a00b
Compare
Sometimes pyshacl doesn't interpret the full URIs using the namespace prefixes. This *should* make the test more robust to those kinds of implementation details
@gtfierro Do you have any idea how this PR caused these failures? |
My guess is it is related to the version bumps on rdflib and pyshacl. I've pushed a couple commits which I hoped would solve the issues, but it looks like there's a couple outstanding ones. I should be able to continue work on it this weekend
|
I thought the same thing too. The only thing that wigs me out is that it should be installing dependencies from the poetry.lock not resolving them. And I didn't update the lock |
Regardless of why the deps changed, I think I've almost fixed all of the issues. The last bit I think is due to the prefix declarations for SHACL rules not being handled correctly in the earlier version of Brick that is currently committed to the repo. This is fixed in a more recent version of Brick, but updating to the recent version would also require handling imports correctly in BuildingMOTIF. I've pushed a "quickfix" but eventually we should update Brick and handle ontology imports |
@haneslinger it looks like the last failing test has to do with the Flask API server in
I can't find anything in the logs that suggests what is going wrong. Any ideas? Otherwise I can start adding some logging statements. Can't get it to reproduce locally |
I don't have any ideas about that, I'm digging into some stuff locally |
@gtfierro I was able to reproduce by doing |
It is an "Unknown namespace prefix : sh" error when it attempts to run the shape query. Any ideas? @gtfierro |
Have you pulled latest from this branch? I think I've fixed that so its just the Flask error |
Yeah, that is the flask error I believe, if you just print the response text in the test that is the string you get with the 500 error. |
Were you able to reproduce the Flask error locally? I'm not able to even with installing with |
I think I might have found the bug! We were missing prefixes in the SPARQL query; later versions of RDFlib/pyshacl seem to care more about having prefixes declared rather than inferring them from other graphs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with these changes! Glad we figured out the tests at last
Create initial base classes for shape builders.
Demo:
https://github.com/NREL/BuildingMOTIF/blob/shape_builder/notebooks/Shape_Builder.ipynb
TODO:
closes #116