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

Issue 536: Enforce observable:File and :URL disjointedness #539

Merged
merged 3 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ontology/uco/observable/observable.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -3203,12 +3203,11 @@ observable:File

observable:File-disjointWith-URL-shape
a sh:NodeShape ;
sh:message "observable:File and observable:URL are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ;
sh:message "observable:File and observable:URL are disjoint classes."@en ;
sh:not [
a sh:NodeShape ;
sh:class observable:URL ;
] ;
sh:severity sh:Warning ;
sh:targetClass observable:File ;
.

Expand Down
4 changes: 2 additions & 2 deletions tests/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ all: \
configuration_setting_XFAIL_validation.ttl \
database_records_PASS_validation.ttl \
database_records_XFAIL_validation.ttl \
file_url_PASS_validation.ttl \
file_url_XFAIL_validation.ttl \
has_facet_inverse_functional_PASS_validation.ttl \
has_facet_inverse_functional_XFAIL_validation.ttl \
hash_PASS_validation.ttl \
Expand Down Expand Up @@ -97,7 +97,7 @@ check: \
configuration_setting_XFAIL_validation.ttl \
database_records_PASS_validation.ttl \
database_records_XFAIL_validation.ttl \
file_url_PASS_validation.ttl \
file_url_XFAIL_validation.ttl \
has_facet_inverse_functional_PASS_validation.ttl \
has_facet_inverse_functional_XFAIL_validation.ttl \
hash_PASS_validation.ttl \
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

[]
a sh:ValidationReport ;
sh:conforms "true"^^xsd:boolean ;
sh:conforms "false"^^xsd:boolean ;
sh:result [
a sh:ValidationResult ;
sh:focusNode <http://example.org/kb/Thing-23a38d67-3432-458b-9651-955b418c2a77> ;
sh:resultMessage "observable:File and observable:URL are disjoint classes. Assigning both types to a single node will be an error in UCO 2.0.0."@en ;
sh:resultSeverity sh:Warning ;
sh:resultMessage "observable:File and observable:URL are disjoint classes."@en ;
sh:resultSeverity sh:Violation ;
sh:sourceConstraintComponent sh:NotConstraintComponent ;
sh:sourceShape observable:File-disjointWith-URL-shape ;
sh:value <http://example.org/kb/Thing-23a38d67-3432-458b-9651-955b418c2a77> ;
Expand Down
9 changes: 3 additions & 6 deletions tests/examples/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,10 @@ def test_database_records_XFAIL() -> None:
}
)

def test_file_url_PASS_validation() -> None:
def test_file_url_XFAIL_validation() -> None:
confirm_validation_results(
"file_url_PASS_validation.ttl",
True,
expected_focus_node_severities={
("http://example.org/kb/Thing-23a38d67-3432-458b-9651-955b418c2a77", str(NS_SH.Warning)),
}
"file_url_XFAIL_validation.ttl",
False,
)

def test_has_facet_inverse_functional_PASS() -> None:
Expand Down