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

Bump case-utils to 0.15.0 #98

Merged
merged 1 commit into from
Jan 10, 2024
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
6 changes: 3 additions & 3 deletions case_prov/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import warnings

import case_utils.inherent_uuid
import case_utils.local_uuid
import rdflib
from case_utils.namespace import NS_RDF, NS_UCO_ACTION, NS_XSD
from cdo_local_uuid import local_uuid

NS_PROV = rdflib.PROV
NS_TIME = rdflib.TIME
Expand Down Expand Up @@ -245,7 +245,7 @@ def infer_prov_instantaneous_influence_event(
uuid.uuid5(predicated_uuid_namespace, str(n_prov_related_thing))
)
else:
node_uuid = case_utils.local_uuid.local_uuid()
node_uuid = local_uuid()
n_instantaneous_event = rdf_namespace[slug + node_uuid]
else:
n_instantaneous_event = rdflib.BNode()
Expand Down Expand Up @@ -326,7 +326,7 @@ def infer_interval_terminus(
if use_deterministic_uuids:
node_uuid = str(uuid.uuid5(uuid_namespace, str(n_predicate)))
else:
node_uuid = case_utils.local_uuid.local_uuid()
node_uuid = local_uuid()
n_terminus = rdf_namespace[slug + node_uuid]
else:
n_terminus = rdflib.BNode()
Expand Down
8 changes: 5 additions & 3 deletions case_prov/case_prov_dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@
import typing
import uuid

import case_utils.local_uuid
import case_utils.inherent_uuid
import cdo_local_uuid
import prov.constants # type: ignore
import prov.dot # type: ignore
import pydot # type: ignore
import rdflib.plugins.sparql
from case_utils.namespace import NS_CASE_INVESTIGATION, NS_RDF, NS_RDFS, NS_UCO_CORE
from cdo_local_uuid import local_uuid

import case_prov

Expand Down Expand Up @@ -551,7 +553,7 @@ def _define_witnesses(
uuid_namespace = uuid.uuid5(uuid_namespace, n_thing)
node_uuid = str(uuid_namespace)
else:
node_uuid = case_utils.local_uuid.local_uuid()
node_uuid = local_uuid()
n_witness = ns_kb["Instant-" + node_uuid]
else:
n_witness = rdflib.BNode()
Expand Down Expand Up @@ -674,7 +676,7 @@ def main() -> None:

logging.basicConfig(level=logging.DEBUG if args.debug else logging.INFO)

case_utils.local_uuid.configure()
cdo_local_uuid.configure()

graph = rdflib.Graph()
for in_graph_filename in args.in_graph:
Expand Down
11 changes: 6 additions & 5 deletions case_prov/case_prov_rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import uuid

import case_utils.inherent_uuid
import case_utils.local_uuid
import cdo_local_uuid
import rdflib.plugins.sparql
from case_utils.namespace import (
NS_CASE_INVESTIGATION,
Expand All @@ -34,6 +34,7 @@
NS_UCO_CORE,
NS_UCO_IDENTITY,
)
from cdo_local_uuid import local_uuid

import case_prov

Expand Down Expand Up @@ -88,7 +89,7 @@ def main() -> None:

logging.basicConfig(level=logging.DEBUG if args.debug else logging.INFO)

case_utils.local_uuid.configure()
cdo_local_uuid.configure()

in_graph = rdflib.Graph()
out_graph = rdflib.Graph()
Expand Down Expand Up @@ -206,7 +207,7 @@ def main() -> None:
)
)
else:
association_uuid = case_utils.local_uuid.local_uuid()
association_uuid = local_uuid()
n_association = NS_KB["Association-" + association_uuid]
out_graph.add(
(n_action, NS_PROV.qualifiedAssociation, n_association)
Expand Down Expand Up @@ -248,7 +249,7 @@ def main() -> None:
)
)
else:
delegation_uuid = case_utils.local_uuid.local_uuid()
delegation_uuid = local_uuid()
n_delegation = NS_KB["Delegation-" + delegation_uuid]
out_graph.add(
(n_instrument, NS_PROV.qualifiedDelegation, n_delegation)
Expand Down Expand Up @@ -320,7 +321,7 @@ def main() -> None:
uuid.uuid5(qualifed_attribution_uuid_namespace, str(n_agent))
)
else:
attribution_uuid = case_utils.local_uuid.local_uuid()
attribution_uuid = local_uuid()

n_attribution = NS_KB["Attribution-" + attribution_uuid]
tmp_triples.add((n_entity, NS_PROV.qualifiedAttribution, n_attribution))
Expand Down
38 changes: 19 additions & 19 deletions figures/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ readme-actions-ordered-by-timestamp-expanded.ttl: \
$(top_srcdir)/case_prov/shapes/prov-shapes.ttl \
$(top_srcdir)/dependencies/prov-check/provcheck/provconstraints.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_rdf \
__$@ \
Expand Down Expand Up @@ -138,7 +138,7 @@ readme-actions-ordered-by-timestamp-invisible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--omit-empty-set \
Expand Down Expand Up @@ -173,7 +173,7 @@ readme-actions-ordered-by-timestamp-visible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--display-time-links \
Expand All @@ -188,7 +188,7 @@ readme-activities.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--omit-empty-set \
Expand All @@ -202,7 +202,7 @@ readme-activities-related-by-intervals-invisible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--debug \
Expand All @@ -216,7 +216,7 @@ readme-activities-related-by-intervals-visible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--debug \
Expand All @@ -231,7 +231,7 @@ readme-activities-related-by-intervals-with-intervals.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--debug \
Expand All @@ -246,7 +246,7 @@ readme-activity-vs-proper-interval-visible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--debug \
Expand All @@ -261,7 +261,7 @@ readme-allen-relations-invisible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--debug \
Expand All @@ -275,7 +275,7 @@ readme-allen-relations-visible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--debug \
Expand All @@ -290,7 +290,7 @@ readme-attribution.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--dash-unqualified \
Expand All @@ -304,7 +304,7 @@ readme-eapi-bounded-visible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--display-time-links \
Expand All @@ -318,7 +318,7 @@ readme-eapi-default-visible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--display-time-links \
Expand All @@ -332,7 +332,7 @@ readme-provenance-records.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--omit-empty-set \
Expand All @@ -345,7 +345,7 @@ readme-time-instants-invisible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--debug \
Expand All @@ -359,7 +359,7 @@ readme-time-instants-visible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--debug \
Expand All @@ -378,7 +378,7 @@ readme-two-files-expanded.ttl: \
$(top_srcdir)/case_prov/case_prov_rdf.py \
$(top_srcdir)/case_prov/shapes/prov-shapes.ttl \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_rdf \
__$@ \
Expand Down Expand Up @@ -420,7 +420,7 @@ readme-two-files-invisible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--omit-empty-set \
Expand Down Expand Up @@ -455,7 +455,7 @@ readme-two-files-visible.dot: \
$(top_srcdir)/case_prov/__init__.py \
$(top_srcdir)/case_prov/case_prov_dot.py \
$(top_srcdir)/tests/.venv.done.log
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(top_srcdir)/tests/venv/bin/activate \
&& case_prov_dot \
--display-time-links \
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ license_files =
[options]
include_package_data = true
install_requires =
case_utils >=0.14.0,< 0.15.0
case_utils >=0.15.0,< 0.16.0
prov
pydot
packages = find:
Expand Down
2 changes: 1 addition & 1 deletion tests/casework.github.io/examples/src/example.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $(subjectdir_basename)-prov.ttl: \
$(construct_sparql_files) \
$(tests_srcdir)/.venv.done.log \
$(top_srcdir)/case_prov/case_prov_rdf.py
export CASE_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
export CDO_DEMO_NONRANDOM_UUID_BASE="$(top_srcdir)" \
&& source $(tests_srcdir)/venv/bin/activate \
&& case_prov_rdf \
--allow-empty-results \
Expand Down
Loading