-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add more detail to error message * Raise warning on partial template eval Adds a new flag, warn_unused, to Template.evaluate; defaults to True. This raises a warning if not all of the mandatory parameters are provided to the Template when it is evaluated. Will raise warning if optional arguments are required (when using the corresponding flag on Template.evaluate) * Add tests for raising warnings when missing params on Template.evaluate * add a pytest marker for integration tests * fix behavior around inlining dependencies with optional args; add tests * add fixtures for tests * Update buildingmotif/dataclasses/template.py Co-authored-by: Tobias Shapinsky <[email protected]> * fix another edge case in inlining dependencies with optional args; add tests * Fix 223P dependencies in the templates Due to how we have the dependencies structured, the mapsTo relationship needs to refer to a connection point that lies in a dependency's dependency. This makes that relationship explicit * Split template dep mgmt into two phases New problem is when we are testing the libraries for validity, sometimes we want to give an explicit argument to the 'mapsto' optional arg w/n a dependency. However, we currently can't give a binding to a nested dependency. The result is that we end up with multiple mapsto (because the 'optional' mapsto argument gets a newly minted URI from template.fill()), which fails validation. This commit splits template dependency management into 2 phases: an initial phase which adds the dependency links and args to the DB; a second phase which checks that the args/params between the template and its dependencies are all valid and work as expected. * add flag to force adding optional_args when calling fill() * don't treat SHACL warnings as violations * adjust notebook to require optional args for 223P; add test to be sure * Update buildingmotif/database/table_connection.py Co-authored-by: Matt Steen <[email protected]> * Update buildingmotif/database/table_connection.py Co-authored-by: Matt Steen <[email protected]> * Update buildingmotif/utils.py Co-authored-by: Matt Steen <[email protected]> * Update buildingmotif/database/table_connection.py Co-authored-by: Matt Steen <[email protected]> * Update buildingmotif/database/table_connection.py Co-authored-by: Matt Steen <[email protected]> * Update buildingmotif/utils.py Co-authored-by: Matt Steen <[email protected]> * Update buildingmotif/utils.py Co-authored-by: Matt Steen <[email protected]> * update method names + docstrings * Update buildingmotif/dataclasses/template.py * Update buildingmotif/utils.py * add check-dependencies to tests --------- Co-authored-by: Tobias Shapinsky <[email protected]> Co-authored-by: Matt Steen <[email protected]>
- Loading branch information
1 parent
e056e4b
commit 1448e60
Showing
18 changed files
with
498 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.