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

Reduce redundant case_validate analysis #72

Merged
merged 3 commits into from
Aug 24, 2023
Merged

Conversation

ajnelson-nist
Copy link
Member

@ajnelson-nist ajnelson-nist commented Sep 16, 2022

This PR should not be merged before some further discussion on pySHACL Issue 170.

There may also be need for some sh:deactivated statements to be applied to the uco-owl namespace's shapes. A CLI interface may be necessary to toggle those. Design for that will come after the first patch.

References:
* RDFLib/pySHACL#89

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
@ajnelson-nist ajnelson-nist added this to the 0.8.0 milestone Sep 20, 2022
@ajnelson-nist ajnelson-nist removed this from the 0.8.0 milestone Nov 22, 2022
@ajnelson-nist
Copy link
Member Author

From discussion in the Ontology Committees meeting yesterday, it seems the way forward for speeding up UCO SHACL validation might include moving the OWL review shapes to their own repository, and further separating "ABox" shapes from "TBox" shapes.

ajnelson-nist added a commit to casework/CASE-Corpora that referenced this pull request Jan 30, 2023
This patch consolidates the review of CASE-Corpora's knowledge base
graph against prerelease states of CASE and UCO.  The current
implementation reviews each dataset against CASE's `develop` and
`unstable` states.  Before resolution of the slowdown noted in
`case-utils` PR 72, this is a significant time cost that can be
decreased by instead reviewing the consolidated knowledge base graph at
`/catalog/kb-all.ttl`.  This will be a more significant time cost if
CASE-Corpora starts reviewing against the `-2.0.0` prerelease builds,
using the review scheme outlined in UCO Issue 493.

This patch also speeds up CI's review of each dataset by only running
per-dataset validation against the current CASE release when not
operating in a GitHub Action.  This supports local (offline) development
still running review in a focused dataset directory.  (The Bash syntax
used for variable definition detection is compatible with Bash's
`set -u`.  See tldp.org reference.)

A follow-on patch will regenerate Make-managed files.

References:
* casework/CASE-Utilities-Python#72
* ucoProject/UCO#493
* https://tldp.org/LDP/abs/html/parameter-substitution.html

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
ajnelson-nist added a commit to casework/CASE-Corpora that referenced this pull request Jan 30, 2023
This patch consolidates the review of CASE-Corpora's knowledge base
graph against prerelease states of CASE and UCO.  The current
implementation reviews each dataset against CASE's `develop` and
`unstable` states.  Before resolution of the slowdown noted in
`case-utils` PR 72, this is a significant time cost that can be
decreased by instead reviewing the consolidated knowledge base graph at
`/catalog/kb-all.ttl`.  This will be a more significant time cost if
CASE-Corpora starts reviewing against the `-2.0.0` prerelease builds,
using the review scheme outlined in UCO Issue 493.

This patch also speeds up CI's review of each dataset by only running
per-dataset validation against the current CASE release when not
operating in a GitHub Action.  This supports local (offline) development
still running review in a focused dataset directory.  (The Bash syntax
used for variable definition detection is compatible with Bash's
`set -u`.  See tldp.org reference.)

A follow-on patch will regenerate Make-managed files.

References:
* casework/CASE-Utilities-Python#72
* ucoProject/UCO#493
* https://tldp.org/LDP/abs/html/parameter-substitution.html

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
This is part of addressing what originally inspired pySHACL Issue 170.

This patch modifies the behavior of `case_validate`, that reviews OWL
syntax and OWL-SHACL interactions.  With this patch, that functionality
is now **opt-in** at call time.

Further work on separating the OWL review shapes from UCO into a general
CDO repository (originally started for CDOTSC-34) is currently believed
to not have an impact on the user interface element where the user opts
in to the more extensive review.

References:
* [CDOTSC-34] CDO should provide shapes for external ontologies and
  other RDF models, including OWL
* RDFLib/pySHACL#170

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
@ajnelson-nist
Copy link
Member Author

A new backwards-incompatible default behavior has been introduced with 4186363. This will require some workflow adjustments in the current repositories that rely on drafting.ttl ontology extension-testing files. But, the advantage in runtime reduction seems well worth it to me.

I am fine with this being merged after CI passes.

@ajnelson-nist ajnelson-nist marked this pull request as ready for review August 24, 2023 20:20
@ajnelson-nist ajnelson-nist requested a review from a team as a code owner August 24, 2023 20:20
@ajnelson-nist ajnelson-nist added this to the 0.12.0 milestone Aug 24, 2023
@kchason kchason merged commit 4d4b720 into develop Aug 24, 2023
2 checks passed
@kchason kchason deleted the reduce_redundant_analysis branch August 24, 2023 23:35
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

Successfully merging this pull request may close these issues.

2 participants