nipact 0.0.1a1__py3-none-any.whl

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.
Files changed (59) hide show
  1. nipact/__init__.py +5 -0
  2. nipact/_version.py +3 -0
  3. nipact/artifacts.py +44 -0
  4. nipact/cli.py +708 -0
  5. nipact/cli_feedback.py +145 -0
  6. nipact/context_index.py +211 -0
  7. nipact/errors.py +11 -0
  8. nipact/examples/__init__.py +1 -0
  9. nipact/examples/colors_processing_demo/__init__.py +1 -0
  10. nipact/examples/colors_processing_demo/demo_names.py +18 -0
  11. nipact/examples/colors_processing_demo/model.py +401 -0
  12. nipact/examples/colors_processing_demo/project_template.py +386 -0
  13. nipact/examples/colors_processing_demo/runtime.py +339 -0
  14. nipact/examples/dynamic_functional_connectivity_demo/__init__.py +2 -0
  15. nipact/examples/dynamic_functional_connectivity_demo/project_template.py +185 -0
  16. nipact/examples/dynamic_functional_connectivity_demo/runtime.py +95 -0
  17. nipact/examples/fmri_preprocessing_demo/__init__.py +2 -0
  18. nipact/examples/fmri_preprocessing_demo/project_template.py +192 -0
  19. nipact/examples/fmri_preprocessing_demo/runtime.py +75 -0
  20. nipact/execution.py +1426 -0
  21. nipact/gui/__init__.py +11 -0
  22. nipact/gui/app.py +229 -0
  23. nipact/gui/models.py +186 -0
  24. nipact/gui/project.py +36 -0
  25. nipact/gui/service.py +235 -0
  26. nipact/gui/static/assets/ArtifactDetailPage-CeAvjVeR.js +1 -0
  27. nipact/gui/static/assets/ArtifactsPage-DPqK4hm-.js +1 -0
  28. nipact/gui/static/assets/DataTable-IIdX9zwr.js +1 -0
  29. nipact/gui/static/assets/EmptyPanel-ffwe1tSg.js +1 -0
  30. nipact/gui/static/assets/IdentifierValue-LV-Kl1jV.js +1 -0
  31. nipact/gui/static/assets/KeyValueGrid-Hn5u373-.js +1 -0
  32. nipact/gui/static/assets/LineageGraphCanvas-o0o1apQF.js +1 -0
  33. nipact/gui/static/assets/LineagePage-CJVkAo6F.js +2 -0
  34. nipact/gui/static/assets/ManifestDetailPage-C-Cx9uQg.js +1 -0
  35. nipact/gui/static/assets/ManifestsPage-SrWN8IbW.js +1 -0
  36. nipact/gui/static/assets/OverviewPage-D9_rWqoS.js +1 -0
  37. nipact/gui/static/assets/PathValue-DSQSuYC6.js +1 -0
  38. nipact/gui/static/assets/WorkflowsPage-DFWdUE1P.js +1 -0
  39. nipact/gui/static/assets/graph-layout-CpJM1p_x.js +1 -0
  40. nipact/gui/static/assets/graph-renderer-CxxVBMBR.js +322 -0
  41. nipact/gui/static/assets/index-BOTDQ-sh.js +12 -0
  42. nipact/gui/static/assets/index-Dw9U6Qx1.css +1 -0
  43. nipact/gui/static/assets/queryKeys-DOSXcu0s.js +1 -0
  44. nipact/gui/static/index.html +14 -0
  45. nipact/hashing.py +44 -0
  46. nipact/identity.py +48 -0
  47. nipact/manifest.py +118 -0
  48. nipact/project_context.py +80 -0
  49. nipact/project_setup.py +663 -0
  50. nipact/registry.py +2736 -0
  51. nipact/runtime.py +247 -0
  52. nipact/trace.py +447 -0
  53. nipact/workflow.py +1600 -0
  54. nipact-0.0.1a1.dist-info/METADATA +169 -0
  55. nipact-0.0.1a1.dist-info/RECORD +59 -0
  56. nipact-0.0.1a1.dist-info/WHEEL +5 -0
  57. nipact-0.0.1a1.dist-info/entry_points.txt +2 -0
  58. nipact-0.0.1a1.dist-info/licenses/LICENSE +21 -0
  59. nipact-0.0.1a1.dist-info/top_level.txt +1 -0
nipact/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ """NIPACT package."""
2
+
3
+ from ._version import __version__
4
+
5
+ __all__ = ["__version__"]
nipact/_version.py ADDED
@@ -0,0 +1,3 @@
1
+ """Package version."""
2
+
3
+ __version__ = "0.0.1a1"
nipact/artifacts.py ADDED
@@ -0,0 +1,44 @@
1
+ """Small helpers for published artifact filenames."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from .errors import ValidationError
6
+ from .identity import validate_hash_alias, validate_path_token
7
+
8
+
9
+ def output_filename(*, address: str, output_hash: str, declared_extension: str) -> str:
10
+ """Return the final hash-named output filename."""
11
+ address = validate_path_token(address, label="output address")
12
+ output_hash = validate_hash_alias(output_hash)
13
+ _validate_declared_extension(declared_extension)
14
+ return f"{address}.{output_hash}{declared_extension}"
15
+
16
+
17
+ def parse_output_filename(
18
+ filename: str,
19
+ *,
20
+ declared_extension: str,
21
+ ) -> tuple[str, str]:
22
+ """Parse a final output filename using the declared extension, not Path.suffix."""
23
+ if not isinstance(filename, str) or not filename:
24
+ raise ValidationError("output filename must be a non-empty string")
25
+ _validate_declared_extension(declared_extension)
26
+ if not filename.endswith(declared_extension):
27
+ raise ValidationError("output filename does not end with declared extension")
28
+ stem = filename[: -len(declared_extension)]
29
+ try:
30
+ address, output_hash = stem.rsplit(".", maxsplit=1)
31
+ except ValueError as exc:
32
+ raise ValidationError("output filename must include output_hash") from exc
33
+ return (
34
+ validate_path_token(address, label="output address"),
35
+ validate_hash_alias(output_hash),
36
+ )
37
+
38
+
39
+ def _validate_declared_extension(value: object) -> str:
40
+ if not isinstance(value, str) or not value.startswith("."):
41
+ raise ValidationError("declared extension must start with '.'")
42
+ if "/" in value or "\\" in value or value in {".", ".."}:
43
+ raise ValidationError("declared extension must be a file extension")
44
+ return value