Skip to content

Commit c5befed

Browse files
committed
Bump CASE pointer to 1.4.0 release; update inherited tests; remove Vocabulary datatyping
A follow-on patch will regenerate Make-managed files. Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent ad8a860 commit c5befed

File tree

5 files changed

+22
-21
lines changed

5 files changed

+22
-21
lines changed

case_utils/case_file/__init__.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
NS_UCO_CORE,
3939
NS_UCO_OBSERVABLE,
4040
NS_UCO_TYPES,
41-
NS_UCO_VOCABULARY,
4241
NS_XSD,
4342
)
4443

@@ -228,14 +227,9 @@ def create_file_node(
228227

229228
l_hash_method: rdflib.Literal
230229
if key in ("sha3_256", "sha3_512"):
231-
l_hash_method = rdflib.Literal(
232-
key.replace("_", "-").upper(),
233-
datatype=NS_UCO_VOCABULARY.HashNameVocab,
234-
)
230+
l_hash_method = rdflib.Literal(key.replace("_", "-").upper())
235231
else:
236-
l_hash_method = rdflib.Literal(
237-
key.upper(), datatype=NS_UCO_VOCABULARY.HashNameVocab
238-
)
232+
l_hash_method = rdflib.Literal(key.upper())
239233

240234
hash_value: str = getattr(successful_hashdict, key)
241235
l_hash_value = rdflib.Literal(hash_value.upper(), datatype=NS_XSD.hexBinary)
@@ -300,7 +294,6 @@ def main() -> None:
300294
graph.namespace_manager.bind("uco-core", NS_UCO_CORE)
301295
graph.namespace_manager.bind("uco-observable", NS_UCO_OBSERVABLE)
302296
graph.namespace_manager.bind("uco-types", NS_UCO_TYPES)
303-
graph.namespace_manager.bind("uco-vocabulary", NS_UCO_VOCABULARY)
304297
graph.namespace_manager.bind("xsd", NS_XSD)
305298

306299
output_format = None

case_utils/inherent_uuid.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@
6666

6767
from rdflib import Literal, Namespace, URIRef
6868

69-
from case_utils.namespace import NS_UCO_CORE, NS_UCO_VOCABULARY, NS_XSD
70-
71-
L_MD5 = Literal("MD5", datatype=NS_UCO_VOCABULARY.HashNameVocab)
72-
L_SHA1 = Literal("SHA1", datatype=NS_UCO_VOCABULARY.HashNameVocab)
73-
L_SHA256 = Literal("SHA256", datatype=NS_UCO_VOCABULARY.HashNameVocab)
74-
L_SHA3_256 = Literal("SHA3-256", datatype=NS_UCO_VOCABULARY.HashNameVocab)
75-
L_SHA3_512 = Literal("SHA3-512", datatype=NS_UCO_VOCABULARY.HashNameVocab)
76-
L_SHA384 = Literal("SHA384", datatype=NS_UCO_VOCABULARY.HashNameVocab)
77-
L_SHA512 = Literal("SHA512", datatype=NS_UCO_VOCABULARY.HashNameVocab)
78-
L_SSDEEP = Literal("SSDEEP", datatype=NS_UCO_VOCABULARY.HashNameVocab)
69+
from case_utils.namespace import NS_UCO_CORE, NS_XSD
70+
71+
L_MD5 = Literal("MD5")
72+
L_SHA1 = Literal("SHA1")
73+
L_SHA256 = Literal("SHA256")
74+
L_SHA3_256 = Literal("SHA3-256")
75+
L_SHA3_512 = Literal("SHA3-512")
76+
L_SHA384 = Literal("SHA384")
77+
L_SHA512 = Literal("SHA512")
78+
L_SSDEEP = Literal("SSDEEP")
7979

8080
# Key: hashMethod literal.
8181
# Value: Tuple.

case_utils/ontology/version_info.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
__all__ = ["CURRENT_CASE_VERSION", "built_version_choices_list"]
2828

2929
# Tested with CI to match versionInfo of <https://ontology.caseontology.org/case/case>.
30-
CURRENT_CASE_VERSION: str = "1.3.0"
30+
CURRENT_CASE_VERSION: str = "1.4.0"
3131

3232
# Tested with CI to match set of ontology files available.
3333
built_version_choices_list = [
@@ -39,6 +39,7 @@
3939
"case-1.0.0",
4040
"case-1.1.0",
4141
"case-1.2.0",
42+
"case-1.3.0",
4243
"case-" + CURRENT_CASE_VERSION,
4344
]
4445

tests/case_utils/case_validate/uco_test_examples/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ validation_ttls := \
3030
action_inheritance_PASS_validation.ttl \
3131
action_inheritance_XFAIL_validation.ttl \
3232
action_result_PASS_validation.ttl \
33+
alternate_data_stream_PASS_validation.ttl \
3334
co_PASS_validation.ttl \
3435
co_XFAIL_validation.ttl \
3536
configuration_setting_PASS_validation.ttl \
3637
configuration_setting_XFAIL_validation.ttl \
3738
database_records_PASS_validation.ttl \
3839
database_records_XFAIL_validation.ttl \
40+
dictionary_PASS_validation.ttl \
41+
dictionary_XFAIL_validation.ttl \
42+
disjointedness_PASS_validation.ttl \
3943
event_XFAIL_validation.ttl \
4044
file_url_PASS_validation.ttl \
4145
has_facet_inverse_functional_PASS_validation.ttl \
@@ -46,7 +50,10 @@ validation_ttls := \
4650
location_XFAIL_validation.ttl \
4751
message_thread_PASS_validation.ttl \
4852
message_thread_XFAIL_validation.ttl \
53+
object_status_PASS_validation.ttl \
54+
object_status_XFAIL_validation.ttl \
4955
observable_creation_time_PASS_validation.ttl \
56+
operating_system_PASS_validation.ttl \
5057
owl_axiom_PASS_validation.ttl \
5158
owl_axiom_XFAIL_validation.ttl \
5259
owl_properties_PASS_validation.ttl \

0 commit comments

Comments
 (0)