Add and test single-stub generator script and Facet-by-IRI-pattern support #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR exports some of the functionality from
/generate.py
, adding a script to generate a JSON-LD stub for a single class.Changes in behavior from
generate.py
are:owl:Restriction
s andsh:PropertyShape
s.min(...)
of allsh:maxCount
,owl:cardinality
, andowl:maxCardinality
across the subclass hierarchy betweenowl:Thing
and C.null
.[]
.core:name
onobservable:Observation
, which currently requires being bound to the stringobserve
.Facet
stubs are now inlined under the list foruco-core:hasFacet
. WhichFacet
s are inlined is determined solely by a pattern-match, where if a class has IRII
, andI + "Facet"
is the IRI of a subclass ofuco-core:Facet
, then the object is assumed to expect having an instance ofI + "Facet"
. The OWL spelling for this is encoded with another generating script, and this general expression form will be proposed to UCO soon, with opportunity for further refinement whenUcoObject
s andFacet
s correspond outside of this pattern-match. Thevar/
directory has the generated file.This PR includes CI updates to run the single-stub generating script on a few test classes as a smoke test, and adds type signature review to the supply chain check.
This PR does not include regenerating the stubs under
/templates
.Disclaimer
Participation by NIST in the creation of the documentation of mentioned software is not intended to imply a recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended to imply that any specific software is necessarily the best available for the purpose.