tracepipe 0.2.0__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.
- tracepipe-0.2.0/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
- tracepipe-0.2.0/.github/ISSUE_TEMPLATE/feature_request.md +30 -0
- tracepipe-0.2.0/.github/PULL_REQUEST_TEMPLATE.md +39 -0
- tracepipe-0.2.0/.github/workflows/ci.yml +144 -0
- tracepipe-0.2.0/.github/workflows/release.yml +31 -0
- tracepipe-0.2.0/.gitignore +67 -0
- tracepipe-0.2.0/.pre-commit-config.yaml +35 -0
- tracepipe-0.2.0/LICENSE +21 -0
- tracepipe-0.2.0/PKG-INFO +508 -0
- tracepipe-0.2.0/README.md +445 -0
- tracepipe-0.2.0/examples/benchmark_fillna_pattern.py +103 -0
- tracepipe-0.2.0/examples/benchmark_overhead.py +240 -0
- tracepipe-0.2.0/examples/demo.py +67 -0
- tracepipe-0.2.0/examples/demo_50k_scale_test.py +313 -0
- tracepipe-0.2.0/examples/demo_5m_stress_test.py +277 -0
- tracepipe-0.2.0/examples/demo_v2.py +134 -0
- tracepipe-0.2.0/examples/ml_preprocessing_demo.py +357 -0
- tracepipe-0.2.0/pyproject.toml +109 -0
- tracepipe-0.2.0/tests/__init__.py +0 -0
- tracepipe-0.2.0/tests/conftest.py +34 -0
- tracepipe-0.2.0/tests/test_api.py +579 -0
- tracepipe-0.2.0/tests/test_core.py +89 -0
- tracepipe-0.2.0/tests/test_html_export.py +89 -0
- tracepipe-0.2.0/tests/test_integration.py +197 -0
- tracepipe-0.2.0/tests/test_lineage_store.py +241 -0
- tracepipe-0.2.0/tests/test_pandas_inst.py +479 -0
- tracepipe-0.2.0/tests/test_row_identity.py +175 -0
- tracepipe-0.2.0/tests/test_safety.py +73 -0
- tracepipe-0.2.0/tests/test_value_capture.py +61 -0
- tracepipe-0.2.0/tracepipe/__init__.py +110 -0
- tracepipe-0.2.0/tracepipe/api.py +563 -0
- tracepipe-0.2.0/tracepipe/context.py +98 -0
- tracepipe-0.2.0/tracepipe/core.py +122 -0
- tracepipe-0.2.0/tracepipe/instrumentation/__init__.py +6 -0
- tracepipe-0.2.0/tracepipe/instrumentation/pandas_inst.py +1024 -0
- tracepipe-0.2.0/tracepipe/safety.py +178 -0
- tracepipe-0.2.0/tracepipe/storage/__init__.py +13 -0
- tracepipe-0.2.0/tracepipe/storage/base.py +174 -0
- tracepipe-0.2.0/tracepipe/storage/lineage_store.py +556 -0
- tracepipe-0.2.0/tracepipe/storage/row_identity.py +217 -0
- tracepipe-0.2.0/tracepipe/utils/__init__.py +6 -0
- tracepipe-0.2.0/tracepipe/utils/value_capture.py +137 -0
- tracepipe-0.2.0/tracepipe/visualization/__init__.py +6 -0
- tracepipe-0.2.0/tracepipe/visualization/html_export.py +1335 -0
- tracepipe-0.2.0/uv.lock +1544 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Report a bug to help us improve TracePipe
|
|
4
|
+
title: '[BUG] '
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Bug Description
|
|
10
|
+
A clear description of what the bug is.
|
|
11
|
+
|
|
12
|
+
## Reproduction Steps
|
|
13
|
+
1. ...
|
|
14
|
+
2. ...
|
|
15
|
+
3. ...
|
|
16
|
+
|
|
17
|
+
## Minimal Reproducible Example
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
import tracepipe
|
|
21
|
+
import pandas as pd
|
|
22
|
+
|
|
23
|
+
tracepipe.enable()
|
|
24
|
+
df = pd.DataFrame({"a": [1, 2, 3]})
|
|
25
|
+
|
|
26
|
+
# Your code here that demonstrates the bug
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Expected Behavior
|
|
30
|
+
What you expected to happen.
|
|
31
|
+
|
|
32
|
+
## Actual Behavior
|
|
33
|
+
What actually happened.
|
|
34
|
+
|
|
35
|
+
## Environment
|
|
36
|
+
- TracePipe version: `tracepipe.__version__`
|
|
37
|
+
- Python version:
|
|
38
|
+
- pandas version:
|
|
39
|
+
- OS:
|
|
40
|
+
|
|
41
|
+
## Traceback (if applicable)
|
|
42
|
+
```
|
|
43
|
+
Paste full traceback here
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Additional Context
|
|
47
|
+
Any other context about the problem.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest an idea for TracePipe
|
|
4
|
+
title: '[FEATURE] '
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Problem Statement
|
|
10
|
+
A clear description of the problem this feature would solve.
|
|
11
|
+
|
|
12
|
+
**Example:** "I'm always frustrated when..."
|
|
13
|
+
|
|
14
|
+
## Proposed Solution
|
|
15
|
+
A clear description of what you want to happen.
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
# Example of how the feature might work
|
|
19
|
+
tracepipe.enable()
|
|
20
|
+
# ...
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Alternatives Considered
|
|
24
|
+
Any alternative solutions or features you've considered.
|
|
25
|
+
|
|
26
|
+
## Use Case
|
|
27
|
+
Who would benefit from this feature and how?
|
|
28
|
+
|
|
29
|
+
## Additional Context
|
|
30
|
+
Any other context, screenshots, or examples.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
Brief description of the changes in this PR.
|
|
4
|
+
|
|
5
|
+
## Type of Change
|
|
6
|
+
|
|
7
|
+
- [ ] 🐛 Bug fix (non-breaking change that fixes an issue)
|
|
8
|
+
- [ ] ✨ New feature (non-breaking change that adds functionality)
|
|
9
|
+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to change)
|
|
10
|
+
- [ ] 📝 Documentation update
|
|
11
|
+
- [ ] 🧹 Refactoring (no functional changes)
|
|
12
|
+
- [ ] 🧪 Test improvements
|
|
13
|
+
|
|
14
|
+
## Related Issues
|
|
15
|
+
|
|
16
|
+
Fixes #(issue number)
|
|
17
|
+
|
|
18
|
+
## Changes Made
|
|
19
|
+
|
|
20
|
+
- Change 1
|
|
21
|
+
- Change 2
|
|
22
|
+
- ...
|
|
23
|
+
|
|
24
|
+
## Testing
|
|
25
|
+
|
|
26
|
+
- [ ] All checks pass (`uv run task check`)
|
|
27
|
+
- [ ] New tests added (if applicable)
|
|
28
|
+
- [ ] Documentation updated (if applicable)
|
|
29
|
+
|
|
30
|
+
## Screenshots (if applicable)
|
|
31
|
+
|
|
32
|
+
## Checklist
|
|
33
|
+
|
|
34
|
+
- [ ] My code follows the project's style guidelines
|
|
35
|
+
- [ ] I have performed a self-review of my code
|
|
36
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
37
|
+
- [ ] I have made corresponding changes to the documentation
|
|
38
|
+
- [ ] My changes generate no new warnings
|
|
39
|
+
- [ ] Any dependent changes have been merged and published
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main, master]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
name: Lint
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Install uv
|
|
17
|
+
uses: astral-sh/setup-uv@v4
|
|
18
|
+
with:
|
|
19
|
+
version: "latest"
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
run: uv python install 3.11
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: uv sync --all-extras
|
|
26
|
+
|
|
27
|
+
- name: Run lint
|
|
28
|
+
run: uv run task lint
|
|
29
|
+
|
|
30
|
+
test:
|
|
31
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
strategy:
|
|
34
|
+
fail-fast: false
|
|
35
|
+
matrix:
|
|
36
|
+
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
|
37
|
+
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
|
|
41
|
+
- name: Install uv
|
|
42
|
+
uses: astral-sh/setup-uv@v4
|
|
43
|
+
with:
|
|
44
|
+
version: "latest"
|
|
45
|
+
|
|
46
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
47
|
+
run: uv python install ${{ matrix.python-version }}
|
|
48
|
+
|
|
49
|
+
- name: Install dependencies
|
|
50
|
+
run: uv sync --all-extras --python ${{ matrix.python-version }}
|
|
51
|
+
|
|
52
|
+
- name: Run tests
|
|
53
|
+
run: uv run pytest tests/ -v --tb=short
|
|
54
|
+
|
|
55
|
+
- name: Run tests with coverage
|
|
56
|
+
if: matrix.python-version == '3.11'
|
|
57
|
+
run: uv run pytest tests/ --cov=tracepipe --cov-report=xml --cov-report=term-missing
|
|
58
|
+
|
|
59
|
+
- name: Upload coverage to Codecov
|
|
60
|
+
if: matrix.python-version == '3.11'
|
|
61
|
+
uses: codecov/codecov-action@v4
|
|
62
|
+
with:
|
|
63
|
+
file: ./coverage.xml
|
|
64
|
+
fail_ci_if_error: false
|
|
65
|
+
env:
|
|
66
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
67
|
+
|
|
68
|
+
test-pandas-versions:
|
|
69
|
+
name: Test (pandas ${{ matrix.pandas-version }})
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
strategy:
|
|
72
|
+
fail-fast: false
|
|
73
|
+
matrix:
|
|
74
|
+
pandas-version: ["1.5", "2.0", "2.1", "2.2"]
|
|
75
|
+
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@v4
|
|
78
|
+
|
|
79
|
+
- name: Install uv
|
|
80
|
+
uses: astral-sh/setup-uv@v4
|
|
81
|
+
with:
|
|
82
|
+
version: "latest"
|
|
83
|
+
|
|
84
|
+
- name: Set up Python
|
|
85
|
+
run: uv python install 3.11
|
|
86
|
+
|
|
87
|
+
- name: Install dependencies
|
|
88
|
+
run: |
|
|
89
|
+
uv sync --all-extras
|
|
90
|
+
uv pip install "pandas~=${{ matrix.pandas-version }}.0"
|
|
91
|
+
|
|
92
|
+
- name: Show pandas version
|
|
93
|
+
run: uv run python -c "import pandas; print(f'pandas {pandas.__version__}')"
|
|
94
|
+
|
|
95
|
+
- name: Run tests
|
|
96
|
+
run: uv run pytest tests/ -v --tb=short
|
|
97
|
+
|
|
98
|
+
demo:
|
|
99
|
+
name: Run Demo
|
|
100
|
+
runs-on: ubuntu-latest
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v4
|
|
103
|
+
|
|
104
|
+
- name: Install uv
|
|
105
|
+
uses: astral-sh/setup-uv@v4
|
|
106
|
+
with:
|
|
107
|
+
version: "latest"
|
|
108
|
+
|
|
109
|
+
- name: Set up Python
|
|
110
|
+
run: uv python install 3.11
|
|
111
|
+
|
|
112
|
+
- name: Install dependencies
|
|
113
|
+
run: uv sync --all-extras
|
|
114
|
+
|
|
115
|
+
- name: Run demo
|
|
116
|
+
run: uv run python examples/demo_v2.py
|
|
117
|
+
|
|
118
|
+
build:
|
|
119
|
+
name: Build Package
|
|
120
|
+
runs-on: ubuntu-latest
|
|
121
|
+
steps:
|
|
122
|
+
- uses: actions/checkout@v4
|
|
123
|
+
|
|
124
|
+
- name: Install uv
|
|
125
|
+
uses: astral-sh/setup-uv@v4
|
|
126
|
+
with:
|
|
127
|
+
version: "latest"
|
|
128
|
+
|
|
129
|
+
- name: Set up Python
|
|
130
|
+
run: uv python install 3.11
|
|
131
|
+
|
|
132
|
+
- name: Build package
|
|
133
|
+
run: uv build
|
|
134
|
+
|
|
135
|
+
- name: Check package
|
|
136
|
+
run: |
|
|
137
|
+
uv tool install twine
|
|
138
|
+
uv tool run twine check dist/*
|
|
139
|
+
|
|
140
|
+
- name: Upload artifacts
|
|
141
|
+
uses: actions/upload-artifact@v4
|
|
142
|
+
with:
|
|
143
|
+
name: dist
|
|
144
|
+
path: dist/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
name: Publish to PyPI
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: release
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write # For trusted publishing
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v4
|
|
20
|
+
with:
|
|
21
|
+
version: "latest"
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
run: uv python install 3.11
|
|
25
|
+
|
|
26
|
+
- name: Build package
|
|
27
|
+
run: uv build
|
|
28
|
+
|
|
29
|
+
- name: Publish to PyPI
|
|
30
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
31
|
+
# No token needed - uses trusted publishing
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
|
|
27
|
+
# PyInstaller
|
|
28
|
+
*.manifest
|
|
29
|
+
*.spec
|
|
30
|
+
|
|
31
|
+
# Unit test / coverage reports
|
|
32
|
+
htmlcov/
|
|
33
|
+
.tox/
|
|
34
|
+
.coverage
|
|
35
|
+
.coverage.*
|
|
36
|
+
.cache
|
|
37
|
+
nosetests.xml
|
|
38
|
+
coverage.xml
|
|
39
|
+
*.cover
|
|
40
|
+
.pytest_cache/
|
|
41
|
+
|
|
42
|
+
# Jupyter Notebook
|
|
43
|
+
.ipynb_checkpoints
|
|
44
|
+
|
|
45
|
+
# pyenv
|
|
46
|
+
.python-version
|
|
47
|
+
|
|
48
|
+
# Environments
|
|
49
|
+
.env
|
|
50
|
+
.venv
|
|
51
|
+
env/
|
|
52
|
+
venv/
|
|
53
|
+
ENV/
|
|
54
|
+
env.bak/
|
|
55
|
+
venv.bak/
|
|
56
|
+
|
|
57
|
+
# IDEs
|
|
58
|
+
.vscode/
|
|
59
|
+
.idea/
|
|
60
|
+
*.swp
|
|
61
|
+
*.swo
|
|
62
|
+
*~
|
|
63
|
+
|
|
64
|
+
# OS
|
|
65
|
+
.DS_Store
|
|
66
|
+
Thumbs.db
|
|
67
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Pre-commit hooks for TracePipe
|
|
2
|
+
# Install: uv pip install pre-commit && pre-commit install
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
6
|
+
rev: v4.5.0
|
|
7
|
+
hooks:
|
|
8
|
+
- id: trailing-whitespace
|
|
9
|
+
- id: end-of-file-fixer
|
|
10
|
+
- id: check-yaml
|
|
11
|
+
- id: check-added-large-files
|
|
12
|
+
args: ['--maxkb=1000']
|
|
13
|
+
- id: check-merge-conflict
|
|
14
|
+
|
|
15
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
16
|
+
rev: v0.1.9
|
|
17
|
+
hooks:
|
|
18
|
+
- id: ruff
|
|
19
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
20
|
+
|
|
21
|
+
- repo: https://github.com/psf/black
|
|
22
|
+
rev: 23.12.1
|
|
23
|
+
hooks:
|
|
24
|
+
- id: black
|
|
25
|
+
args: [--line-length=100]
|
|
26
|
+
|
|
27
|
+
- repo: local
|
|
28
|
+
hooks:
|
|
29
|
+
- id: pytest-check
|
|
30
|
+
name: pytest-check
|
|
31
|
+
entry: bash -c 'uv run pytest tests/ -v --tb=short -q'
|
|
32
|
+
language: system
|
|
33
|
+
pass_filenames: false
|
|
34
|
+
always_run: true
|
|
35
|
+
stages: [push] # Only run on push, not commit
|
tracepipe-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gauthier Piarrette
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|