makeprov 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {makeprov-0.2.2 → makeprov-0.2.3}/PKG-INFO +1 -1
- {makeprov-0.2.2 → makeprov-0.2.3}/pyproject.toml +1 -1
- {makeprov-0.2.2 → makeprov-0.2.3}/src/makeprov/config.py +3 -2
- {makeprov-0.2.2 → makeprov-0.2.3}/src/makeprov/core.py +13 -10
- {makeprov-0.2.2 → makeprov-0.2.3}/src/makeprov.egg-info/PKG-INFO +1 -1
- {makeprov-0.2.2 → makeprov-0.2.3}/README.md +0 -0
- {makeprov-0.2.2 → makeprov-0.2.3}/setup.cfg +0 -0
- {makeprov-0.2.2 → makeprov-0.2.3}/src/makeprov/__init__.py +0 -0
- {makeprov-0.2.2 → makeprov-0.2.3}/src/makeprov/jsonld.py +0 -0
- {makeprov-0.2.2 → makeprov-0.2.3}/src/makeprov/paths.py +0 -0
- {makeprov-0.2.2 → makeprov-0.2.3}/src/makeprov/prov.py +0 -0
- {makeprov-0.2.2 → makeprov-0.2.3}/src/makeprov.egg-info/SOURCES.txt +0 -0
- {makeprov-0.2.2 → makeprov-0.2.3}/src/makeprov.egg-info/dependency_links.txt +0 -0
- {makeprov-0.2.2 → makeprov-0.2.3}/src/makeprov.egg-info/requires.txt +0 -0
- {makeprov-0.2.2 → makeprov-0.2.3}/src/makeprov.egg-info/top_level.txt +0 -0
- {makeprov-0.2.2 → makeprov-0.2.3}/tests/test_makeprov.py +0 -0
- {makeprov-0.2.2 → makeprov-0.2.3}/tests/test_prov_shacl.py +0 -0
|
@@ -20,7 +20,8 @@ GLOBAL_CONFIG = ProvenanceConfig()
|
|
|
20
20
|
|
|
21
21
|
def main(subcommands=None, conf_obj=None, parsers=None):
|
|
22
22
|
from .core import COMMANDS, flush_prov_buffer, start_prov_buffer
|
|
23
|
-
|
|
23
|
+
global GLOBAL_CONFIG
|
|
24
|
+
|
|
24
25
|
subcommands = subcommands or COMMANDS
|
|
25
26
|
conf_obj = conf_obj or GLOBAL_CONFIG
|
|
26
27
|
|
|
@@ -64,7 +65,7 @@ def main(subcommands=None, conf_obj=None, parsers=None):
|
|
|
64
65
|
)
|
|
65
66
|
|
|
66
67
|
ns = apply_globals(sys.argv[1:]) # apply effects early
|
|
67
|
-
logging.debug(f"Config: {
|
|
68
|
+
logging.debug(f"Config: {GLOBAL_CONFIG}")
|
|
68
69
|
try:
|
|
69
70
|
if ns.merge_prov:
|
|
70
71
|
start_prov_buffer()
|
|
@@ -110,18 +110,9 @@ def rule(
|
|
|
110
110
|
Decorator that infers inputs/outputs from type annotations
|
|
111
111
|
(InPath / OutPath, including Optional[...] unions) and writes provenance.
|
|
112
112
|
"""
|
|
113
|
-
base_config = config or GLOBAL_CONFIG
|
|
114
|
-
rule_config = ProvenanceConfig(
|
|
115
|
-
base_iri=base_iri if base_iri is not None else base_config.base_iri,
|
|
116
|
-
prov_dir=prov_dir if prov_dir is not None else base_config.prov_dir,
|
|
117
|
-
prov_path=base_config.prov_path,
|
|
118
|
-
force=force if force is not None else base_config.force,
|
|
119
|
-
dry_run=dry_run if dry_run is not None else base_config.dry_run,
|
|
120
|
-
out_fmt=out_fmt if out_fmt is not None else base_config.out_fmt,
|
|
121
|
-
jsonld_with_context=base_config.jsonld_with_context,
|
|
122
|
-
)
|
|
123
113
|
|
|
124
114
|
def decorator(func):
|
|
115
|
+
|
|
125
116
|
sig = inspect.signature(func)
|
|
126
117
|
hints = get_type_hints(func)
|
|
127
118
|
|
|
@@ -168,6 +159,18 @@ def rule(
|
|
|
168
159
|
bound = sig.bind_partial(*args, **kwargs)
|
|
169
160
|
bound.apply_defaults()
|
|
170
161
|
|
|
162
|
+
global GLOBAL_CONFIG
|
|
163
|
+
base_config = config or GLOBAL_CONFIG
|
|
164
|
+
rule_config = ProvenanceConfig(
|
|
165
|
+
base_iri=base_iri if base_iri is not None else base_config.base_iri,
|
|
166
|
+
prov_dir=prov_dir if prov_dir is not None else base_config.prov_dir,
|
|
167
|
+
prov_path=base_config.prov_path,
|
|
168
|
+
force=force if force is not None else base_config.force,
|
|
169
|
+
dry_run=dry_run if dry_run is not None else base_config.dry_run,
|
|
170
|
+
out_fmt=out_fmt if out_fmt is not None else base_config.out_fmt,
|
|
171
|
+
jsonld_with_context=base_config.jsonld_with_context,
|
|
172
|
+
)
|
|
173
|
+
|
|
171
174
|
effective_jsonld_with_context = (
|
|
172
175
|
jsonld_with_context
|
|
173
176
|
if jsonld_with_context is not None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|