pycheck-neuron 1.1.1__tar.gz → 1.1.2__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.
Files changed (24) hide show
  1. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/PKG-INFO +5 -64
  2. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/README.md +321 -381
  3. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck/__init__.py +1 -2
  4. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck/cli.py +6 -29
  5. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck/flow.py +6 -30
  6. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck/rules.py +22 -30
  7. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck_neuron.egg-info/PKG-INFO +5 -64
  8. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck_neuron.egg-info/SOURCES.txt +0 -1
  9. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck_neuron.egg-info/requires.txt +3 -0
  10. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pyproject.toml +7 -5
  11. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/tests/test_cli.py +0 -78
  12. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/tests/test_rules.py +0 -73
  13. pycheck_neuron-1.1.1/pycheck/sarif.py +0 -123
  14. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/LICENSE +0 -0
  15. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck/__main__.py +0 -0
  16. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck/analyzer.py +0 -0
  17. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck/audit.py +0 -0
  18. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck/server.py +0 -0
  19. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck_neuron.egg-info/dependency_links.txt +0 -0
  20. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck_neuron.egg-info/entry_points.txt +0 -0
  21. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/pycheck_neuron.egg-info/top_level.txt +0 -0
  22. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/setup.cfg +0 -0
  23. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/tests/test_audit.py +0 -0
  24. {pycheck_neuron-1.1.1 → pycheck_neuron-1.1.2}/tests/test_regression.py +0 -0
@@ -1,15 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pycheck-neuron
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: 37-rule static AST analyzer catching temporal lookahead bias, causal confusion, and uncertainty bugs in Python ML code. Zero dependencies.
5
- Author: NEURON Team
6
- Author-email: Fayo Ibrahim <fayo@neuron-lab.org>
5
+ Author-email: Fayo Ibrahim <contact@neuron-lab.org>
7
6
  License-Expression: MIT
8
7
  Project-URL: Homepage, https://github.com/neuronlabs-ai/pycheck
9
8
  Project-URL: Documentation, https://github.com/neuronlabs-ai/pycheck#readme
10
9
  Project-URL: Repository, https://github.com/neuronlabs-ai/pycheck
11
10
  Project-URL: Bug Tracker, https://github.com/neuronlabs-ai/pycheck/issues
12
- Keywords: machine-learning,data-leakage,temporal-bias,lookahead-bias,backtesting,quantitative-finance,algorithmic-trading,linter,static-analysis,causal-inference,time-series,pandas,polars,sarif,github-actions,sklearn,scikit-learn,uncertainty,neuron,ml-safety,data-science,feature-engineering
11
+ Keywords: machine-learning,data-leakage,temporal-bias,lookahead-bias,backtesting,quantitative-finance,algorithmic-trading,linter,static-analysis,causal-inference,time-series,pandas,sklearn,scikit-learn,uncertainty,neuron,ml-safety,data-science,feature-engineering
13
12
  Classifier: Programming Language :: Python :: 3
14
13
  Classifier: Programming Language :: Python :: 3.7
15
14
  Classifier: Programming Language :: Python :: 3.8
@@ -30,6 +29,8 @@ Classifier: Environment :: Console
30
29
  Requires-Python: >=3.7
31
30
  Description-Content-Type: text/markdown
32
31
  License-File: LICENSE
32
+ Provides-Extra: test
33
+ Requires-Dist: pytest>=7.0; extra == "test"
33
34
  Provides-Extra: dev
34
35
  Requires-Dist: pytest>=7.0; extra == "dev"
35
36
  Requires-Dist: build; extra == "dev"
@@ -123,9 +124,6 @@ PyCheck catches all three before execution:
123
124
  | `T017` | Target laundering & un-split target encoding (`regime_success_rate`) | **Error** |
124
125
  | `T018` | In-sample target encoding via `.transform()` or un-split group means | **Error** |
125
126
  | `T019` | `np.roll(arr, -k)` — negative shift rotates future data into present position | **Error** |
126
- | `T020` | `KFold(shuffle=True)` or `StratifiedKFold` on chronologically sorted series | **Error** |
127
- | `T021` | `CalibratedClassifierCV` initialized without a temporal cross-validation splitter | Warning |
128
- | `T022` | `cross_val_predict()` using shuffled cross-validation on temporal data | Warning |
129
127
 
130
128
  ### Causal Confusion Rules (7 rules — `C001`–`C007`)
131
129
 
@@ -289,63 +287,6 @@ GitLab will automatically annotate the Merge Request diff with red warnings on e
289
287
 
290
288
  ---
291
289
 
292
- ## GitHub Code Scanning & SARIF Integration
293
-
294
- PyCheck natively exports standard **SARIF v2.1.0** (Static Analysis Results Interchange Format) and GitHub Actions workflow commands, enabling turnkey integration into GitHub Code Scanning and PR annotations.
295
-
296
- ```bash
297
- # Export standard SARIF v2.1.0 for GitHub Code Scanning
298
- pycheck . --sarif -o pycheck.sarif
299
-
300
- # Emit GitHub Actions workflow annotations directly in CI logs
301
- pycheck . --github-actions
302
- ```
303
-
304
- ### Turnkey `.github/workflows/pycheck.yml`
305
-
306
- ```yaml
307
- name: PyCheck ML Safety Guard
308
-
309
- on: [push, pull_request]
310
-
311
- jobs:
312
- pycheck:
313
- name: PyCheck Temporal Leak Scan
314
- runs-on: ubuntu-latest
315
- steps:
316
- - uses: actions/checkout@v4
317
-
318
- - name: Set up Python
319
- uses: actions/setup-python@v5
320
- with:
321
- python-version: "3.11"
322
-
323
- - name: Install PyCheck
324
- run: pip install pycheck-neuron
325
-
326
- - name: Run PyCheck
327
- run: pycheck . --sarif -o pycheck.sarif
328
-
329
- - name: Upload SARIF to GitHub Code Scanning
330
- uses: github/codeql-action/upload-sarif@v3
331
- if: always()
332
- with:
333
- sarif_file: pycheck.sarif
334
- ```
335
-
336
- ---
337
-
338
- ## Polars First-Class Support
339
-
340
- PyCheck v1.1.1 includes native AST detection and taint tracking for **Polars** pipelines:
341
-
342
- - **Lookahead Fill**: Catches `pl.col().backward_fill()`, `.backward_fill()`, and `.fill_null(strategy="backward")` (`T007`).
343
- - **Centered Windows**: Catches `rolling_mean(center=True)`, `rolling_std(center=True)`, `rolling_median(center=True)`, etc. (`T009`).
344
- - **Event Merges**: Catches `.join_asof(strategy="forward")` and `.join_asof(strategy="nearest")` (`T016`).
345
- - **Dataflow Taint Tracking**: Traces future-tainted Polars expressions into downstream feature matrices and `.fit()` sinks (`F001`).
346
-
347
- ---
348
-
349
290
  ## Real-World Examples
350
291
 
351
292
  The `examples/` directory contains recreations of actual ML disasters: