consist 0.1.0__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 (93) hide show
  1. consist/.DS_Store +0 -0
  2. consist/__init__.py +187 -0
  3. consist/api.py +2672 -0
  4. consist/cli.py +3882 -0
  5. consist/core/__init__.py +4 -0
  6. consist/core/_coupler_shared.py +266 -0
  7. consist/core/artifact_facets.py +145 -0
  8. consist/core/artifact_schemas.py +658 -0
  9. consist/core/artifacts.py +741 -0
  10. consist/core/cache.py +501 -0
  11. consist/core/cache_output_logging.py +155 -0
  12. consist/core/config_canonicalization.py +543 -0
  13. consist/core/config_facets.py +238 -0
  14. consist/core/context.py +125 -0
  15. consist/core/coupler.py +282 -0
  16. consist/core/decorators.py +163 -0
  17. consist/core/drivers.py +475 -0
  18. consist/core/error_messages.py +6 -0
  19. consist/core/events.py +117 -0
  20. consist/core/facet_common.py +123 -0
  21. consist/core/fs.py +200 -0
  22. consist/core/identity.py +856 -0
  23. consist/core/indexing.py +57 -0
  24. consist/core/ingestion.py +163 -0
  25. consist/core/input_utils.py +21 -0
  26. consist/core/lifecycle.py +44 -0
  27. consist/core/lineage.py +267 -0
  28. consist/core/maintenance.py +3461 -0
  29. consist/core/materialize.py +369 -0
  30. consist/core/matrix.py +182 -0
  31. consist/core/metadata_resolver.py +224 -0
  32. consist/core/netcdf_utils.py +10 -0
  33. consist/core/netcdf_views.py +447 -0
  34. consist/core/noop.py +573 -0
  35. consist/core/openlineage.py +296 -0
  36. consist/core/openmatrix_views.py +454 -0
  37. consist/core/persistence.py +2741 -0
  38. consist/core/queries.py +331 -0
  39. consist/core/run_invocation.py +623 -0
  40. consist/core/run_options.py +156 -0
  41. consist/core/run_resolution.py +200 -0
  42. consist/core/schema_export.py +397 -0
  43. consist/core/settings.py +68 -0
  44. consist/core/spatial_views.py +205 -0
  45. consist/core/step_context.py +166 -0
  46. consist/core/tracker.py +5178 -0
  47. consist/core/tracker_artifact_logging.py +269 -0
  48. consist/core/tracker_config.py +52 -0
  49. consist/core/tracker_lifecycle.py +630 -0
  50. consist/core/tracker_orchestration.py +1706 -0
  51. consist/core/validation.py +140 -0
  52. consist/core/views.py +1026 -0
  53. consist/core/workflow.py +1300 -0
  54. consist/integrations/.DS_Store +0 -0
  55. consist/integrations/__init__.py +5 -0
  56. consist/integrations/_config_adapter_shared.py +375 -0
  57. consist/integrations/activitysim/__init__.py +10 -0
  58. consist/integrations/activitysim/config_adapter.py +2839 -0
  59. consist/integrations/beam/__init__.py +9 -0
  60. consist/integrations/beam/config_adapter.py +1048 -0
  61. consist/integrations/containers/__init__.py +4 -0
  62. consist/integrations/containers/api.py +735 -0
  63. consist/integrations/containers/backends.py +642 -0
  64. consist/integrations/containers/models.py +81 -0
  65. consist/integrations/dlt_loader.py +899 -0
  66. consist/models/__init__.py +51 -0
  67. consist/models/activitysim.py +143 -0
  68. consist/models/artifact.py +367 -0
  69. consist/models/artifact_facet.py +60 -0
  70. consist/models/artifact_kv.py +70 -0
  71. consist/models/artifact_schema.py +151 -0
  72. consist/models/beam.py +49 -0
  73. consist/models/config_facet.py +56 -0
  74. consist/models/run.py +389 -0
  75. consist/models/run_config_kv.py +66 -0
  76. consist/protocols.py +58 -0
  77. consist/py.typed +0 -0
  78. consist/runset.py +644 -0
  79. consist/runtime.py +44 -0
  80. consist/tools/__init__.py +4 -0
  81. consist/tools/file_batches.py +62 -0
  82. consist/tools/generator.py +34 -0
  83. consist/tools/mount_diagnostics.py +153 -0
  84. consist/tools/queries.py +162 -0
  85. consist/tools/schema_profile.py +456 -0
  86. consist/types.py +212 -0
  87. consist/utils/__init__.py +8 -0
  88. consist/utils/introspection.py +108 -0
  89. consist/utils/keys.py +51 -0
  90. consist-0.1.0.dist-info/METADATA +270 -0
  91. consist-0.1.0.dist-info/RECORD +93 -0
  92. consist-0.1.0.dist-info/WHEEL +4 -0
  93. consist-0.1.0.dist-info/entry_points.txt +3 -0
consist/.DS_Store ADDED
Binary file
consist/__init__.py ADDED
@@ -0,0 +1,187 @@
1
+ """
2
+ Consist: Automatic provenance tracking and intelligent caching for scientific simulation workflows.
3
+
4
+ This package provides the main public API for Consist, allowing users to interact with
5
+ the Tracker for managing runs, logging artifacts, and ingesting data.
6
+ """
7
+
8
+ # Models
9
+ from consist.models.run import Run, RunResult
10
+ from consist.models.artifact import Artifact
11
+ from consist.runset import AlignedPair, RunSet
12
+
13
+ # Core
14
+ from consist.core.tracker import Tracker
15
+ from consist.core.coupler import Coupler
16
+ from consist.core.indexing import (
17
+ FacetIndex,
18
+ RunFieldIndex,
19
+ index_by_facet,
20
+ index_by_field,
21
+ )
22
+
23
+ # API
24
+ from consist.api import (
25
+ load,
26
+ load_df,
27
+ load_relation,
28
+ active_relation_count,
29
+ RelationConnectionLeakWarning,
30
+ to_df,
31
+ run,
32
+ ref,
33
+ refs,
34
+ trace,
35
+ start_run,
36
+ log_artifact,
37
+ log_input,
38
+ log_output,
39
+ log_artifacts,
40
+ log_dataframe,
41
+ define_step,
42
+ require_runtime_kwargs,
43
+ ingest,
44
+ capture_outputs,
45
+ use_tracker,
46
+ set_current_tracker,
47
+ current_tracker,
48
+ current_run,
49
+ current_consist,
50
+ output_dir,
51
+ output_path,
52
+ log_meta,
53
+ view,
54
+ cached_output,
55
+ cached_artifacts,
56
+ get_run_result,
57
+ get_artifact,
58
+ register_artifact_facet_parser,
59
+ scenario,
60
+ noop_scenario,
61
+ single_step_scenario,
62
+ register_views,
63
+ find_run,
64
+ find_runs,
65
+ run_set,
66
+ db_session,
67
+ run_query,
68
+ config_run_query,
69
+ config_run_rows,
70
+ pivot_facets,
71
+ # Type guards for artifact narrowing
72
+ is_dataframe_artifact,
73
+ is_tabular_artifact,
74
+ is_json_artifact,
75
+ is_zarr_artifact,
76
+ is_hdf_artifact,
77
+ is_spatial_artifact,
78
+ )
79
+
80
+ # Types
81
+ from consist.types import (
82
+ CacheOptions,
83
+ DriverType,
84
+ ExecutionOptions,
85
+ OutputPolicyOptions,
86
+ )
87
+ from consist.core.noop import (
88
+ NoopArtifact,
89
+ NoopCoupler,
90
+ NoopRunResult,
91
+ NoopScenarioContext,
92
+ NoopTracker,
93
+ )
94
+ from consist.runtime import create_tracker
95
+ from consist.protocols import (
96
+ ArtifactLike,
97
+ RunIdentifiedResultLike,
98
+ RunResultLike,
99
+ ScenarioLike,
100
+ TrackerLike,
101
+ )
102
+
103
+ __all__ = [
104
+ # Core objects
105
+ "Tracker",
106
+ "Coupler",
107
+ "Run",
108
+ "RunResult",
109
+ "Artifact",
110
+ "RunSet",
111
+ "AlignedPair",
112
+ # Types
113
+ "DriverType",
114
+ "CacheOptions",
115
+ "OutputPolicyOptions",
116
+ "ExecutionOptions",
117
+ "NoopArtifact",
118
+ "NoopCoupler",
119
+ "NoopRunResult",
120
+ "NoopScenarioContext",
121
+ "NoopTracker",
122
+ "create_tracker",
123
+ "ArtifactLike",
124
+ "RunIdentifiedResultLike",
125
+ "RunResultLike",
126
+ "ScenarioLike",
127
+ "TrackerLike",
128
+ # Indexing helpers
129
+ "FacetIndex",
130
+ "RunFieldIndex",
131
+ "index_by_facet",
132
+ "index_by_field",
133
+ # Functional helpers
134
+ "load",
135
+ "load_df",
136
+ "load_relation",
137
+ "active_relation_count",
138
+ "RelationConnectionLeakWarning",
139
+ "to_df",
140
+ "run",
141
+ "ref",
142
+ "refs",
143
+ "trace",
144
+ "start_run",
145
+ "log_artifact",
146
+ "log_input",
147
+ "log_output",
148
+ "log_artifacts",
149
+ "log_dataframe",
150
+ "define_step",
151
+ "require_runtime_kwargs",
152
+ "ingest",
153
+ "capture_outputs",
154
+ "use_tracker",
155
+ "set_current_tracker",
156
+ "current_tracker",
157
+ "current_run",
158
+ "current_consist",
159
+ "output_dir",
160
+ "output_path",
161
+ "log_meta",
162
+ "view",
163
+ "cached_output",
164
+ "cached_artifacts",
165
+ "get_run_result",
166
+ "get_artifact",
167
+ "register_artifact_facet_parser",
168
+ "scenario",
169
+ "noop_scenario",
170
+ "single_step_scenario",
171
+ "register_views",
172
+ "find_run",
173
+ "find_runs",
174
+ "run_set",
175
+ "db_session",
176
+ "run_query",
177
+ "config_run_query",
178
+ "config_run_rows",
179
+ "pivot_facets",
180
+ # Type guards for artifact narrowing
181
+ "is_dataframe_artifact",
182
+ "is_tabular_artifact",
183
+ "is_json_artifact",
184
+ "is_zarr_artifact",
185
+ "is_hdf_artifact",
186
+ "is_spatial_artifact",
187
+ ]