coltrace 0.1.0.dev4__tar.gz → 0.1.0.dev5__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.
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/MANIFEST.in +2 -1
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/PKG-INFO +55 -8
- coltrace-0.1.0.dev4/src/coltrace.egg-info/PKG-INFO → coltrace-0.1.0.dev5/README.md +261 -240
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/accuracy.md +6 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/architecture.md +18 -2
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/backlog.md +21 -10
- coltrace-0.1.0.dev5/docs/database-patterns.md +101 -0
- coltrace-0.1.0.dev5/docs/database-sources.md +235 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/decisions.md +11 -1
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/lineage-json.md +35 -4
- coltrace-0.1.0.dev5/docs/pandas-sources-proposal.md +109 -0
- coltrace-0.1.0.dev5/docs/read-capture.md +161 -0
- coltrace-0.1.0.dev5/docs/source-checkpoint.md +63 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/supported-patterns.md +34 -5
- coltrace-0.1.0.dev5/examples/database_pipeline/README.md +34 -0
- coltrace-0.1.0.dev5/examples/database_pipeline/build_query.py +18 -0
- coltrace-0.1.0.dev5/examples/database_pipeline/pipeline.py +11 -0
- coltrace-0.1.0.dev5/examples/database_pipeline/pyproject.toml +11 -0
- coltrace-0.1.0.dev5/examples/notebook_cell.py +128 -0
- coltrace-0.1.0.dev5/examples/read_capture/README.md +29 -0
- coltrace-0.1.0.dev5/examples/read_capture/project/input.csv +3 -0
- coltrace-0.1.0.dev5/examples/read_capture/project/pipeline.py +9 -0
- coltrace-0.1.0.dev5/examples/read_capture/run_capture.py +36 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/pyproject.toml +4 -2
- coltrace-0.1.0.dev5/src/coltrace/__init__.py +22 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/analysis.py +986 -16
- coltrace-0.1.0.dev5/src/coltrace/capture.py +212 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/cli.py +38 -2
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/exporters.py +34 -5
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/graph.py +6 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/journey.py +9 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/lineage_models.py +5 -2
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/models.py +1 -1
- coltrace-0.1.0.dev5/src/coltrace/nosql_sources.py +290 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/scanner.py +56 -4
- coltrace-0.1.0.dev5/src/coltrace/source_models.py +217 -0
- coltrace-0.1.0.dev5/src/coltrace/source_readers.py +83 -0
- coltrace-0.1.0.dev5/src/coltrace/sql_sources.py +355 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/templates/graph.html +26 -0
- coltrace-0.1.0.dev4/README.md → coltrace-0.1.0.dev5/src/coltrace.egg-info/PKG-INFO +287 -219
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace.egg-info/SOURCES.txt +31 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace.egg-info/requires.txt +7 -0
- coltrace-0.1.0.dev5/tests/integration/test_capture_workflow.py +53 -0
- coltrace-0.1.0.dev5/tests/integration/test_database_sources.py +287 -0
- coltrace-0.1.0.dev5/tests/integration/test_nosql_extraction.py +294 -0
- coltrace-0.1.0.dev5/tests/integration/test_reader_inventory.py +93 -0
- coltrace-0.1.0.dev5/tests/integration/test_source_config.py +186 -0
- coltrace-0.1.0.dev5/tests/integration/test_source_precision.py +133 -0
- coltrace-0.1.0.dev5/tests/integration/test_sql_reader_boundaries.py +300 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/unit/test_exporters.py +3 -1
- coltrace-0.1.0.dev5/tests/unit/test_nosql_sources.py +242 -0
- coltrace-0.1.0.dev5/tests/unit/test_read_capture.py +372 -0
- coltrace-0.1.0.dev5/tests/unit/test_source_models.py +283 -0
- coltrace-0.1.0.dev5/tests/unit/test_source_presentation.py +116 -0
- coltrace-0.1.0.dev5/tests/unit/test_sql_sources.py +350 -0
- coltrace-0.1.0.dev4/src/coltrace/__init__.py +0 -9
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/LICENSE +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/column-history.md +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/column-journey-checkpoint.md +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/discovery-json.md +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/graph-workspace-checkpoint.md +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/history-checkpoint.md +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/mvp-checkpoint.md +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/nlp-checkpoint.md +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/other-column-checkpoint.md +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/phase-1.md +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/docs/troubleshooting.md +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/examples/pricing_pipeline/extract/prices.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/examples/pricing_pipeline/features/pricing.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/examples/pricing_pipeline/pipeline.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/examples/pricing_pipeline/transform/pricing.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/examples/sample_pipeline/prices.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/examples/text_pipeline/README.md +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/examples/text_pipeline/pipeline.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/examples/text_pipeline/processing.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/examples/text_pipeline/readers.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/examples/text_pipeline/text.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/setup.cfg +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/__main__.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/callbacks.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/collector.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/history.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/py.typed +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace/visual_layout.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace.egg-info/dependency_links.txt +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace.egg-info/entry_points.txt +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/src/coltrace.egg-info/top_level.txt +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/fixtures/sample_pipeline/extract/prices.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/fixtures/sample_pipeline/features/pricing.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/fixtures/sample_pipeline/pipeline.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/fixtures/sample_pipeline/transform/pricing.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/integration/test_callback_roles.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/integration/test_cli.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/integration/test_column_story.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/integration/test_journey_boundaries.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/integration/test_lineage_acceptance.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/integration/test_other_column_stories.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/integration/test_pandas_boundaries.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/integration/test_resolution_boundaries.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/integration/test_scan_project.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/integration/test_text_pipeline.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/unit/test_analysis.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/unit/test_callbacks.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/unit/test_collector.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/unit/test_graph.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/unit/test_graph_workspace.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/unit/test_history.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/unit/test_journey.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/unit/test_scanner.py +0 -0
- {coltrace-0.1.0.dev4 → coltrace-0.1.0.dev5}/tests/unit/test_visual_layout.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coltrace
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev5
|
|
4
4
|
Summary: Static Pandas column lineage, impact analysis, and local dependency graphs
|
|
5
5
|
Author: Cristiano Diniz
|
|
6
6
|
License-Expression: MIT
|
|
@@ -15,6 +15,11 @@ Requires-Dist: ruff>=0.9; extra == "dev"
|
|
|
15
15
|
Requires-Dist: mypy>=1.14; extra == "dev"
|
|
16
16
|
Requires-Dist: build>=1.2; extra == "dev"
|
|
17
17
|
Requires-Dist: types-networkx>=3.2; extra == "dev"
|
|
18
|
+
Requires-Dist: sqlglot<31,>=30.24; extra == "dev"
|
|
19
|
+
Provides-Extra: sql
|
|
20
|
+
Requires-Dist: sqlglot<31,>=30.24; extra == "sql"
|
|
21
|
+
Provides-Extra: capture
|
|
22
|
+
Requires-Dist: pandas<4,>=2; extra == "capture"
|
|
18
23
|
Provides-Extra: viz
|
|
19
24
|
Requires-Dist: pyvis<0.4,>=0.3.2; extra == "viz"
|
|
20
25
|
Dynamic: license-file
|
|
@@ -23,10 +28,11 @@ Dynamic: license-file
|
|
|
23
28
|
|
|
24
29
|
Static Pandas column lineage and potential impact analysis for Python projects.
|
|
25
30
|
ColTrace reads source files, identifies supported transformations, and connects
|
|
26
|
-
column versions across direct function calls.
|
|
27
|
-
project or reads
|
|
31
|
+
column versions across direct function calls. Static scanning never imports or
|
|
32
|
+
executes the project or reads its input data. Optional read capture observes
|
|
33
|
+
column labels while you explicitly execute your own pipeline.
|
|
28
34
|
|
|
29
|
-
**Development preview: `0.1.0.
|
|
35
|
+
**Development preview: `0.1.0.dev5`.** The supported subset is deliberately small.
|
|
30
36
|
Unsupported operations produce diagnostics and may interrupt lineage. A graph
|
|
31
37
|
with no edge is not proof that a dependency does not exist.
|
|
32
38
|
|
|
@@ -37,15 +43,54 @@ Requires Python 3.11+. From this checkout:
|
|
|
37
43
|
```sh
|
|
38
44
|
python -m venv .venv
|
|
39
45
|
# Activate .venv using your shell, then:
|
|
40
|
-
python -m pip install -e ".[dev,viz]"
|
|
46
|
+
python -m pip install -e ".[dev,viz,sql,capture]"
|
|
41
47
|
coltrace --help
|
|
42
48
|
```
|
|
43
49
|
|
|
44
50
|
On Windows without activation, use `.\.venv\Scripts\python.exe -m coltrace`.
|
|
45
51
|
The `viz` extra supplies PyVis for HTML export; basic analysis and JSON need only
|
|
46
|
-
NetworkX and Typer.
|
|
52
|
+
NetworkX and Typer. `sql` adds SQLGlot for bounded SQL parsing; `capture` adds
|
|
53
|
+
Pandas for optional schema observation. Pandas is not a core dependency.
|
|
54
|
+
Publication to PyPI is a
|
|
47
55
|
separate release step; these commands install the local project.
|
|
48
56
|
|
|
57
|
+
## Start at the data source
|
|
58
|
+
|
|
59
|
+
The local dev5 checkpoint recognizes supported SQL-to-Pandas and NoSQL-to-Pandas
|
|
60
|
+
extractions. Literal SQL projections, aliases and expressions describe source
|
|
61
|
+
fields before their first Python use. Query filters are control metadata rather
|
|
62
|
+
than value dependencies of every output. The supplied
|
|
63
|
+
`spark.sql(build_query(table)).toPandas()` pattern works with a resolved Spark
|
|
64
|
+
session or an explicit source contract for an injected session.
|
|
65
|
+
|
|
66
|
+
`report.readers` inventories resolved `pd.read_*` calls with file, line, context,
|
|
67
|
+
return shape and resulting DataFrame identity. File schemas are unknown unless
|
|
68
|
+
declared or observed. To enumerate actual columns, including those never
|
|
69
|
+
explicitly referenced by the script:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from coltrace import analyze_project, capture_reads
|
|
73
|
+
|
|
74
|
+
with capture_reads(project_root) as capture:
|
|
75
|
+
run_pipeline() # You explicitly execute your existing pipeline.
|
|
76
|
+
|
|
77
|
+
report = analyze_project(project_root, source_schemas=capture.schemas)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Capture retains column names and source locations, not rows or credentials.
|
|
81
|
+
Use `capture_dataframe_schema` for an already-loaded Pandas object, including a
|
|
82
|
+
SQL-to-Pandas conversion. Observations must attach to the corresponding analyzed
|
|
83
|
+
`.py` extraction site; arbitrary notebook-cell lineage remains unsupported.
|
|
84
|
+
Unknown SQL, wildcard schemas, dynamic calls and unsupported transformations
|
|
85
|
+
still produce gaps. Schema observation does not resolve hidden value lineage.
|
|
86
|
+
|
|
87
|
+
See [database source usage](docs/database-sources.md), the
|
|
88
|
+
[researched extraction matrix](docs/database-patterns.md), and
|
|
89
|
+
[read capture](docs/read-capture.md). Try the
|
|
90
|
+
[static SQL example](examples/database_pipeline/README.md) and
|
|
91
|
+
[executable capture example](examples/read_capture/README.md).
|
|
92
|
+
The [source checkpoint](docs/source-checkpoint.md) records validation and limits.
|
|
93
|
+
|
|
49
94
|
## Try the complete example
|
|
50
95
|
|
|
51
96
|
```sh
|
|
@@ -141,7 +186,9 @@ the shortest eligible distance, so a node reached both ways appears as direct.
|
|
|
141
186
|
| Pattern | Support |
|
|
142
187
|
| --- | --- |
|
|
143
188
|
| Explicit Pandas imports and aliases | Recognized origins; names such as `df` alone are insufficient |
|
|
144
|
-
|
|
|
189
|
+
| Resolved `pd.read_*` calls | Located inventory; supported DataFrame readers plus explicit/observed source schemas; iterators/collections remain distinct |
|
|
190
|
+
| SQL-to-Pandas extraction | Bounded SQL projections, aliases, expressions and helpers; documented readers/conversions or explicit contracts |
|
|
191
|
+
| MongoDB / DynamoDB extraction | Literal projections and bounded Mongo expressions; candidate fields stay partial without observed schema |
|
|
145
192
|
| Literal dictionary `DataFrame` construction | String column keys and literal values |
|
|
146
193
|
| `frame["column"]`, `frame.loc[:, "column"]` | Single literal string labels, all rows |
|
|
147
194
|
| `frame["c"] = frame["a"] + frame["b"]` | Arithmetic, scalar constants, temporary values, versions |
|
|
@@ -200,7 +247,7 @@ print(report.to_json())
|
|
|
200
247
|
|
|
201
248
|
The earlier `scan_project` API remains available for raw occurrences and receiver
|
|
202
249
|
evidence. Its discovery report (`0.1`) is a different format from the lineage
|
|
203
|
-
snapshot (`0.
|
|
250
|
+
snapshot (`0.4`). See [discovery JSON](docs/discovery-json.md) and
|
|
204
251
|
[lineage JSON](docs/lineage-json.md). Public facts are dataclasses; their serialized
|
|
205
252
|
form is independent of NetworkX and contains no AST or executable objects.
|
|
206
253
|
|