unnotebook 0.1.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.
- unnotebook-0.1.0/LICENSE +21 -0
- unnotebook-0.1.0/PKG-INFO +131 -0
- unnotebook-0.1.0/README.md +115 -0
- unnotebook-0.1.0/pyproject.toml +73 -0
- unnotebook-0.1.0/rust/Cargo.lock +1101 -0
- unnotebook-0.1.0/rust/Cargo.toml +41 -0
- unnotebook-0.1.0/rust/README.md +115 -0
- unnotebook-0.1.0/rust/src/analyse.rs +2573 -0
- unnotebook-0.1.0/rust/src/cli.rs +404 -0
- unnotebook-0.1.0/rust/src/error.rs +45 -0
- unnotebook-0.1.0/rust/src/finding.rs +32 -0
- unnotebook-0.1.0/rust/src/generate.rs +1158 -0
- unnotebook-0.1.0/rust/src/lib.rs +14 -0
- unnotebook-0.1.0/rust/src/main.rs +3 -0
- unnotebook-0.1.0/rust/src/repo.rs +191 -0
- unnotebook-0.1.0/rust/src/rules/api001.rs +267 -0
- unnotebook-0.1.0/rust/src/rules/mod.rs +22 -0
- unnotebook-0.1.0/rust/src/source.rs +150 -0
- unnotebook-0.1.0/rust/templates/pyproject.toml +93 -0
- unnotebook-0.1.0/rust/templates/sklearn/model_spec.py +22 -0
- unnotebook-0.1.0/rust/templates/sklearn/sklearn_trainer.py +61 -0
- unnotebook-0.1.0/rust/templates/sklearn/test_sklearn_pipeline.py +46 -0
- unnotebook-0.1.0/rust/templates/sklearn/test_sklearn_trainer.py +61 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/__init__.py +4 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/application/__init__.py +1 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/application/config.py +75 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/application/observability.py +37 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/application/ports.py +117 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/application/records.py +34 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/application/use_cases.py +151 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/container.py +151 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/domain/__init__.py +1 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/domain/features.py +20 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/domain/model_spec.py +41 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/domain/prediction.py +13 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/domain/preprocessing.py +210 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/entrypoints/__init__.py +1 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/entrypoints/evaluate.py +21 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/entrypoints/predict.py +20 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/entrypoints/serve.py +113 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/entrypoints/train.py +18 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/infrastructure/__init__.py +1 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/infrastructure/clock.py +18 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/infrastructure/config_loader.py +51 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/infrastructure/keras_trainer.py +58 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/infrastructure/logging.py +29 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/infrastructure/manifest.py +63 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/infrastructure/model_store.py +39 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/infrastructure/tracing.py +36 -0
- unnotebook-0.1.0/rust/templates/src/__PKG__/infrastructure/trackers.py +36 -0
- unnotebook-0.1.0/rust/templates/tasks.py +29 -0
- unnotebook-0.1.0/rust/templates/tests/__init__.py +1 -0
- unnotebook-0.1.0/rust/templates/tests/fakes.py +49 -0
- unnotebook-0.1.0/rust/templates/tests/test_container.py +47 -0
- unnotebook-0.1.0/rust/templates/tests/test_golden_master.py +37 -0
- unnotebook-0.1.0/rust/templates/tests/test_imputation.py +40 -0
- unnotebook-0.1.0/rust/templates/tests/test_keras_trainer.py +24 -0
- unnotebook-0.1.0/rust/templates/tests/test_one_hot.py +54 -0
- unnotebook-0.1.0/rust/templates/tests/test_pipeline.py +89 -0
- unnotebook-0.1.0/rust/templates/tests/test_preprocessing.py +77 -0
- unnotebook-0.1.0/rust/templates/tests/test_serve.py +92 -0
- unnotebook-0.1.0/rust/tests/check_cli.rs +108 -0
- unnotebook-0.1.0/rust/tests/fixtures/chained_inplace.ipynb +14 -0
- unnotebook-0.1.0/rust/tests/rewrite_cli.rs +801 -0
unnotebook-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 William Martin
|
|
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.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: unnotebook
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Development Status :: 1 - Planning
|
|
5
|
+
Classifier: Programming Language :: Rust
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Summary: Deterministic static analysis and refactoring for data-science code.
|
|
8
|
+
Author: William Martin
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
12
|
+
Project-URL: Homepage, https://github.com/w-martin/unnotebook
|
|
13
|
+
Project-URL: Issue Tracker, https://github.com/w-martin/unnotebook/issues
|
|
14
|
+
Project-URL: Repository, https://github.com/w-martin/unnotebook
|
|
15
|
+
|
|
16
|
+
# unnotebook
|
|
17
|
+
|
|
18
|
+
[](https://github.com/w-martin/unnotebook/actions/workflows/ci.yml)
|
|
19
|
+
[](https://pypi.org/project/unnotebook/)
|
|
20
|
+
[](https://opensource.org/licenses/MIT)
|
|
21
|
+
|
|
22
|
+
> ⚠️ **Project status: early proof of concept (v0.1.0).** The recognisers cover a narrow set of notebook shapes, and
|
|
23
|
+
> anything outside them is refused rather than guessed at.
|
|
24
|
+
|
|
25
|
+
**Deterministic static analysis and refactoring for data-science code. `unnotebook` finds bugs in notebooks and
|
|
26
|
+
scripts, fixes the ones it can prove, and rewrites a training notebook as a tested, hexagonal Python project.**
|
|
27
|
+
|
|
28
|
+
- **No LLM, no execution.** Everything is derived from the syntax tree (via the [ruff](https://github.com/astral-sh/ruff)
|
|
29
|
+
parser crates). Your code is never run.
|
|
30
|
+
- **Proven fixes only.** A finding is auto-fixed only when the fix is known to be correct; everything else is reported.
|
|
31
|
+
- **Refuses instead of guessing.** If a stage of the pipeline is not recognised, `rewrite` stops and lists exactly what
|
|
32
|
+
is missing.
|
|
33
|
+
- **A single native binary.** Written in Rust; Python is only the language it analyses.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```shell
|
|
38
|
+
uv tool install unnotebook
|
|
39
|
+
# or
|
|
40
|
+
pip install unnotebook
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The wheel carries only the native executable, so it works with any Python from 3.11. Static Linux executables
|
|
44
|
+
(x86_64 and aarch64, musl) with build-provenance attestations are attached to each
|
|
45
|
+
[GitHub release](https://github.com/w-martin/unnotebook/releases):
|
|
46
|
+
|
|
47
|
+
```shell
|
|
48
|
+
gh attestation verify unnotebook-x86_64-unknown-linux-musl.tar.gz --repo w-martin/unnotebook
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Commands
|
|
52
|
+
|
|
53
|
+
### `check`
|
|
54
|
+
|
|
55
|
+
Reports data-science smells in `.py` files and `.ipynb` notebooks, with notebook cell coordinates.
|
|
56
|
+
|
|
57
|
+
```shell
|
|
58
|
+
unnotebook check analysis.ipynb
|
|
59
|
+
# analysis.ipynb:cell 3:2:1: API001 `.fillna(inplace=True)` on `df['Age']` updates a copy, so the original is never changed (a no-op under pandas >= 3 copy-on-write)
|
|
60
|
+
# analysis.ipynb:cell 3:3:1: API001 `.replace(inplace=True)` on `df['Sex']` updates a copy, so the original is never changed (a no-op under pandas >= 3 copy-on-write)
|
|
61
|
+
# Found 2 findings.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
| Code | Finding |
|
|
65
|
+
|------------|--------------------------------------------------------------------------|
|
|
66
|
+
| `API001` | Chained `inplace=True` call that silently updates a copy (auto-fixable) |
|
|
67
|
+
| `LEAK001` | Test data imputed or standardised with its own statistics, not train's |
|
|
68
|
+
| `LEAK002` | Encoder or dummies fitted separately on train and test |
|
|
69
|
+
| `EVAL001` | Model evaluated on its own training data |
|
|
70
|
+
| `CFG001` | Hard-coded absolute data path |
|
|
71
|
+
| `REPRO001` | No random seed set |
|
|
72
|
+
|
|
73
|
+
### `fix`
|
|
74
|
+
|
|
75
|
+
Rewrites files to remove the findings that have a proven fix, in place or into `--output-dir`.
|
|
76
|
+
|
|
77
|
+
```shell
|
|
78
|
+
unnotebook fix analysis.ipynb
|
|
79
|
+
# Fixed 2, 0 remaining.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### `rewrite`
|
|
83
|
+
|
|
84
|
+
Turns a notebook, a script or a repository into a modular project:
|
|
85
|
+
|
|
86
|
+
```shell
|
|
87
|
+
unnotebook rewrite --output-dir titanic_pipeline titanic.ipynb
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The generated project has:
|
|
91
|
+
|
|
92
|
+
- hexagonal layers (`domain`, `application`, `infrastructure`) with dependencies pointing inward, and thin
|
|
93
|
+
`train`, `evaluate`, `predict` and `serve` entrypoints exposed as console scripts;
|
|
94
|
+
- a lazy composition root (`container.py`), so heavy optional libraries (Keras, MLflow, OpenTelemetry) are imported
|
|
95
|
+
only when used;
|
|
96
|
+
- preprocessing refitted on the training data only, with the leaks it corrected recorded in `plan.toml`;
|
|
97
|
+
- [typedframes](https://github.com/w-martin/typedframes) schemas for the raw inputs, configuration in TOML, structured
|
|
98
|
+
logging, a run manifest and a FastAPI inference service;
|
|
99
|
+
- a stage-wise golden-master test that keeps the notebook's own preprocessing verbatim and checks the new pipeline
|
|
100
|
+
against it on synthetic data.
|
|
101
|
+
|
|
102
|
+
Supported today: Keras `Sequential` models with `Dense` layers and scikit-learn classifiers built from literal
|
|
103
|
+
arguments, with median/mode imputation, `get_dummies` one-hot encoding, row-wise feature engineering, and column
|
|
104
|
+
selection. Given a repository, the one script that matches becomes the pipeline and the remaining scripts are carried
|
|
105
|
+
over verbatim.
|
|
106
|
+
|
|
107
|
+
## Exit codes
|
|
108
|
+
|
|
109
|
+
| Code | Meaning |
|
|
110
|
+
|------|-------------------------------------------------------------------------------|
|
|
111
|
+
| `0` | Clean, or everything was fixed or rewritten |
|
|
112
|
+
| `1` | Findings remain, or `rewrite` could not place some statements |
|
|
113
|
+
| `2` | Error: unreadable input, syntax error, or `rewrite` refused the input |
|
|
114
|
+
|
|
115
|
+
## Building from source
|
|
116
|
+
|
|
117
|
+
Requires a Rust toolchain and [uv](https://docs.astral.sh/uv/).
|
|
118
|
+
|
|
119
|
+
```shell
|
|
120
|
+
git clone https://github.com/w-martin/unnotebook
|
|
121
|
+
cd unnotebook
|
|
122
|
+
uv sync
|
|
123
|
+
uv run unnotebook --help
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The development gate (format, lint, tests) is `uv run inv all`.
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
|
|
130
|
+
[MIT](LICENSE)
|
|
131
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# unnotebook
|
|
2
|
+
|
|
3
|
+
[](https://github.com/w-martin/unnotebook/actions/workflows/ci.yml)
|
|
4
|
+
[](https://pypi.org/project/unnotebook/)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
> ⚠️ **Project status: early proof of concept (v0.1.0).** The recognisers cover a narrow set of notebook shapes, and
|
|
8
|
+
> anything outside them is refused rather than guessed at.
|
|
9
|
+
|
|
10
|
+
**Deterministic static analysis and refactoring for data-science code. `unnotebook` finds bugs in notebooks and
|
|
11
|
+
scripts, fixes the ones it can prove, and rewrites a training notebook as a tested, hexagonal Python project.**
|
|
12
|
+
|
|
13
|
+
- **No LLM, no execution.** Everything is derived from the syntax tree (via the [ruff](https://github.com/astral-sh/ruff)
|
|
14
|
+
parser crates). Your code is never run.
|
|
15
|
+
- **Proven fixes only.** A finding is auto-fixed only when the fix is known to be correct; everything else is reported.
|
|
16
|
+
- **Refuses instead of guessing.** If a stage of the pipeline is not recognised, `rewrite` stops and lists exactly what
|
|
17
|
+
is missing.
|
|
18
|
+
- **A single native binary.** Written in Rust; Python is only the language it analyses.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```shell
|
|
23
|
+
uv tool install unnotebook
|
|
24
|
+
# or
|
|
25
|
+
pip install unnotebook
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The wheel carries only the native executable, so it works with any Python from 3.11. Static Linux executables
|
|
29
|
+
(x86_64 and aarch64, musl) with build-provenance attestations are attached to each
|
|
30
|
+
[GitHub release](https://github.com/w-martin/unnotebook/releases):
|
|
31
|
+
|
|
32
|
+
```shell
|
|
33
|
+
gh attestation verify unnotebook-x86_64-unknown-linux-musl.tar.gz --repo w-martin/unnotebook
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Commands
|
|
37
|
+
|
|
38
|
+
### `check`
|
|
39
|
+
|
|
40
|
+
Reports data-science smells in `.py` files and `.ipynb` notebooks, with notebook cell coordinates.
|
|
41
|
+
|
|
42
|
+
```shell
|
|
43
|
+
unnotebook check analysis.ipynb
|
|
44
|
+
# analysis.ipynb:cell 3:2:1: API001 `.fillna(inplace=True)` on `df['Age']` updates a copy, so the original is never changed (a no-op under pandas >= 3 copy-on-write)
|
|
45
|
+
# analysis.ipynb:cell 3:3:1: API001 `.replace(inplace=True)` on `df['Sex']` updates a copy, so the original is never changed (a no-op under pandas >= 3 copy-on-write)
|
|
46
|
+
# Found 2 findings.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
| Code | Finding |
|
|
50
|
+
|------------|--------------------------------------------------------------------------|
|
|
51
|
+
| `API001` | Chained `inplace=True` call that silently updates a copy (auto-fixable) |
|
|
52
|
+
| `LEAK001` | Test data imputed or standardised with its own statistics, not train's |
|
|
53
|
+
| `LEAK002` | Encoder or dummies fitted separately on train and test |
|
|
54
|
+
| `EVAL001` | Model evaluated on its own training data |
|
|
55
|
+
| `CFG001` | Hard-coded absolute data path |
|
|
56
|
+
| `REPRO001` | No random seed set |
|
|
57
|
+
|
|
58
|
+
### `fix`
|
|
59
|
+
|
|
60
|
+
Rewrites files to remove the findings that have a proven fix, in place or into `--output-dir`.
|
|
61
|
+
|
|
62
|
+
```shell
|
|
63
|
+
unnotebook fix analysis.ipynb
|
|
64
|
+
# Fixed 2, 0 remaining.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### `rewrite`
|
|
68
|
+
|
|
69
|
+
Turns a notebook, a script or a repository into a modular project:
|
|
70
|
+
|
|
71
|
+
```shell
|
|
72
|
+
unnotebook rewrite --output-dir titanic_pipeline titanic.ipynb
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The generated project has:
|
|
76
|
+
|
|
77
|
+
- hexagonal layers (`domain`, `application`, `infrastructure`) with dependencies pointing inward, and thin
|
|
78
|
+
`train`, `evaluate`, `predict` and `serve` entrypoints exposed as console scripts;
|
|
79
|
+
- a lazy composition root (`container.py`), so heavy optional libraries (Keras, MLflow, OpenTelemetry) are imported
|
|
80
|
+
only when used;
|
|
81
|
+
- preprocessing refitted on the training data only, with the leaks it corrected recorded in `plan.toml`;
|
|
82
|
+
- [typedframes](https://github.com/w-martin/typedframes) schemas for the raw inputs, configuration in TOML, structured
|
|
83
|
+
logging, a run manifest and a FastAPI inference service;
|
|
84
|
+
- a stage-wise golden-master test that keeps the notebook's own preprocessing verbatim and checks the new pipeline
|
|
85
|
+
against it on synthetic data.
|
|
86
|
+
|
|
87
|
+
Supported today: Keras `Sequential` models with `Dense` layers and scikit-learn classifiers built from literal
|
|
88
|
+
arguments, with median/mode imputation, `get_dummies` one-hot encoding, row-wise feature engineering, and column
|
|
89
|
+
selection. Given a repository, the one script that matches becomes the pipeline and the remaining scripts are carried
|
|
90
|
+
over verbatim.
|
|
91
|
+
|
|
92
|
+
## Exit codes
|
|
93
|
+
|
|
94
|
+
| Code | Meaning |
|
|
95
|
+
|------|-------------------------------------------------------------------------------|
|
|
96
|
+
| `0` | Clean, or everything was fixed or rewritten |
|
|
97
|
+
| `1` | Findings remain, or `rewrite` could not place some statements |
|
|
98
|
+
| `2` | Error: unreadable input, syntax error, or `rewrite` refused the input |
|
|
99
|
+
|
|
100
|
+
## Building from source
|
|
101
|
+
|
|
102
|
+
Requires a Rust toolchain and [uv](https://docs.astral.sh/uv/).
|
|
103
|
+
|
|
104
|
+
```shell
|
|
105
|
+
git clone https://github.com/w-martin/unnotebook
|
|
106
|
+
cd unnotebook
|
|
107
|
+
uv sync
|
|
108
|
+
uv run unnotebook --help
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The development gate (format, lint, tests) is `uv run inv all`.
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.0,<2.0"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "unnotebook"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Deterministic static analysis and refactoring for data-science code."
|
|
9
|
+
license = "MIT"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "William Martin" }
|
|
13
|
+
]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 1 - Planning",
|
|
16
|
+
"Programming Language :: Rust",
|
|
17
|
+
]
|
|
18
|
+
readme = "README.md"
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
Homepage = "https://github.com/w-martin/unnotebook"
|
|
22
|
+
Repository = "https://github.com/w-martin/unnotebook"
|
|
23
|
+
"Issue Tracker" = "https://github.com/w-martin/unnotebook/issues"
|
|
24
|
+
|
|
25
|
+
[tool.maturin]
|
|
26
|
+
manifest-path = "rust/Cargo.toml"
|
|
27
|
+
# The wheel only carries the Rust executable, as ruff and uv do.
|
|
28
|
+
bindings = "bin"
|
|
29
|
+
# LICENSE and README live outside the crate directory maturin packages for the sdist; PyPI rejects an
|
|
30
|
+
# sdist whose PKG-INFO names a License-File the archive lacks.
|
|
31
|
+
include = [
|
|
32
|
+
{ path = "LICENSE", format = "sdist" },
|
|
33
|
+
{ path = "README.md", format = "sdist" },
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[tool.ruff]
|
|
37
|
+
line-length = 120
|
|
38
|
+
target-version = "py311"
|
|
39
|
+
fix = true
|
|
40
|
+
extend-exclude = ["planning", "rust/tests/fixtures", "rust/templates"]
|
|
41
|
+
|
|
42
|
+
[tool.ruff.format]
|
|
43
|
+
quote-style = "double"
|
|
44
|
+
indent-style = "space"
|
|
45
|
+
|
|
46
|
+
[tool.ruff.lint]
|
|
47
|
+
select = ["ALL"]
|
|
48
|
+
ignore = [
|
|
49
|
+
"D203", # Conflicts with D211
|
|
50
|
+
"D212", # Conflicts with D213
|
|
51
|
+
"COM812", # Conflicts with ruff formatter
|
|
52
|
+
"CPY001", # Project does not use copyright header notices
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
[tool.ruff.lint.per-file-ignores]
|
|
56
|
+
"tasks.py" = ["T201"]
|
|
57
|
+
# Standalone CI helper, run directly rather than imported.
|
|
58
|
+
"scripts/check_wheel.py" = ["INP001"]
|
|
59
|
+
|
|
60
|
+
[tool.ruff.lint.mccabe]
|
|
61
|
+
max-complexity = 10
|
|
62
|
+
|
|
63
|
+
[tool.ruff.lint.pydocstyle]
|
|
64
|
+
convention = "google"
|
|
65
|
+
|
|
66
|
+
[dependency-groups]
|
|
67
|
+
dev = [
|
|
68
|
+
"invoke>=3.0.3",
|
|
69
|
+
"maturin>=1.15.0",
|
|
70
|
+
"notebook>=7.6.3",
|
|
71
|
+
"ruff>=0.17.0",
|
|
72
|
+
"ty>=0.0.87",
|
|
73
|
+
]
|