typedframes 0.13.0__tar.gz → 0.14.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.
Files changed (73) hide show
  1. typedframes-0.14.0/.cargo/config.toml +6 -0
  2. {typedframes-0.13.0 → typedframes-0.14.0}/PKG-INFO +15 -14
  3. {typedframes-0.13.0 → typedframes-0.14.0}/README.md +14 -13
  4. {typedframes-0.13.0 → typedframes-0.14.0}/pyproject.toml +25 -26
  5. {typedframes-0.13.0 → typedframes-0.14.0}/rust/Cargo.lock +97 -75
  6. {typedframes-0.13.0 → typedframes-0.14.0}/rust/Cargo.toml +8 -20
  7. {typedframes-0.13.0 → typedframes-0.14.0}/rust/benches/parser_bench.rs +1 -1
  8. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/apply.rs +1 -1
  9. typedframes-0.14.0/rust/src/cli/args.rs +303 -0
  10. typedframes-0.14.0/rust/src/cli/cache.rs +390 -0
  11. typedframes-0.14.0/rust/src/cli/check.rs +741 -0
  12. typedframes-0.14.0/rust/src/cli/collect.rs +221 -0
  13. typedframes-0.14.0/rust/src/cli/config.rs +423 -0
  14. typedframes-0.14.0/rust/src/cli/coverage.rs +854 -0
  15. typedframes-0.14.0/rust/src/cli/mod.rs +62 -0
  16. typedframes-0.14.0/rust/src/cli/pathutil.rs +141 -0
  17. typedframes-0.14.0/rust/src/cli/pyfmt.rs +176 -0
  18. typedframes-0.14.0/rust/src/cli/report.rs +392 -0
  19. typedframes-0.14.0/rust/src/cli/style.rs +9 -0
  20. typedframes-0.14.0/rust/src/cli/suggest.rs +502 -0
  21. typedframes-0.13.0/rust/src/pyapi.rs → typedframes-0.14.0/rust/src/engine.rs +75 -376
  22. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/lib.rs +15 -30
  23. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/linter.rs +0 -5
  24. typedframes-0.14.0/rust/src/main.rs +3 -0
  25. typedframes-0.14.0/rust/tests/cli.rs +665 -0
  26. {typedframes-0.13.0 → typedframes-0.14.0}/rust/tests/integration_test.rs +1 -1
  27. {typedframes-0.13.0 → typedframes-0.14.0}/src/typedframes/__init__.py +9 -37
  28. typedframes-0.14.0/src/typedframes/__main__.py +5 -0
  29. typedframes-0.14.0/src/typedframes/_binary.py +57 -0
  30. {typedframes-0.13.0 → typedframes-0.14.0}/src/typedframes/mypy.py +45 -41
  31. typedframes-0.13.0/rust/.cargo/config.toml +0 -21
  32. typedframes-0.13.0/rust/src/main.rs +0 -31
  33. typedframes-0.13.0/src/typedframes/_rust_checker.pyi +0 -43
  34. typedframes-0.13.0/src/typedframes/cache.py +0 -134
  35. typedframes-0.13.0/src/typedframes/cli.py +0 -2158
  36. typedframes-0.13.0/src/typedframes/compat.py +0 -28
  37. typedframes-0.13.0/src/typedframes/python315.py +0 -13
  38. {typedframes-0.13.0 → typedframes-0.14.0}/LICENSE +0 -0
  39. {typedframes-0.13.0 → typedframes-0.14.0}/rust/README.md +0 -0
  40. {typedframes-0.13.0 → typedframes-0.14.0}/rust/build.rs +0 -0
  41. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/ast_extract.rs +0 -0
  42. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/call_usage.rs +0 -0
  43. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/column_consuming_methods.rs +0 -0
  44. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/column_usage.rs +0 -0
  45. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/config.rs +0 -0
  46. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/constants.rs +0 -0
  47. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/contract.rs +0 -0
  48. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/errors.rs +0 -0
  49. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/fast_hash.rs +0 -0
  50. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/frame_ops.rs +0 -0
  51. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/helpers.rs +0 -0
  52. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/index.rs +0 -0
  53. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/library_names.txt +0 -0
  54. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/notebook.rs +0 -0
  55. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/parallel.rs +0 -0
  56. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/phrase.rs +0 -0
  57. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/report.rs +0 -0
  58. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/report_minimize.rs +0 -0
  59. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/report_names.rs +0 -0
  60. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/sql.rs +0 -0
  61. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/static_eval.rs +0 -0
  62. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/suggest.rs +0 -0
  63. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/typo.rs +0 -0
  64. {typedframes-0.13.0 → typedframes-0.14.0}/rust/src/words.txt +0 -0
  65. {typedframes-0.13.0 → typedframes-0.14.0}/src/typedframes/base_schema.py +0 -0
  66. {typedframes-0.13.0 → typedframes-0.14.0}/src/typedframes/column.py +0 -0
  67. {typedframes-0.13.0 → typedframes-0.14.0}/src/typedframes/column_group.py +0 -0
  68. {typedframes-0.13.0 → typedframes-0.14.0}/src/typedframes/column_group_error.py +0 -0
  69. {typedframes-0.13.0 → typedframes-0.14.0}/src/typedframes/column_set.py +0 -0
  70. {typedframes-0.13.0 → typedframes-0.14.0}/src/typedframes/missing_dependency_error.py +0 -0
  71. {typedframes-0.13.0 → typedframes-0.14.0}/src/typedframes/pandera.py +0 -0
  72. {typedframes-0.13.0 → typedframes-0.14.0}/src/typedframes/py.typed +0 -0
  73. {typedframes-0.13.0 → typedframes-0.14.0}/src/typedframes/schema_algebra.py +0 -0
@@ -0,0 +1,6 @@
1
+ # jemalloc's defaults suit a long-lived server. A check runs for tens of milliseconds on many
2
+ # threads, so it does better with few arenas and no lingering free memory. The setting is compiled
3
+ # in, which is why it lives here and not in the program: the allocator is running before any code
4
+ # could change it, and the program may not use `unsafe`.
5
+ [env]
6
+ JEMALLOC_SYS_WITH_MALLOC_CONF = "narenas:4,dirty_decay_ms:0,muzzy_decay_ms:0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: typedframes
3
- Version: 0.13.0
3
+ Version: 0.14.0
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -44,7 +44,7 @@ Project-URL: Repository, https://github.com/w-martin/typedframes
44
44
 
45
45
  > ⚠️ **Project Status: Proof of Concept**
46
46
  >
47
- > `typedframes` (v0.13.0) is currently an experimental proof-of-concept. The core static analysis and mypy/Rust
47
+ > `typedframes` (v0.14.0) is currently an experimental proof-of-concept. The core static analysis and mypy/Rust
48
48
  > integrations work, but expect rough edges. The codebase prioritizes demonstrating the viability of static DataFrame
49
49
  > column checking over production-grade stability.
50
50
  >
@@ -131,8 +131,9 @@ or
131
131
  uv add typedframes
132
132
  ```
133
133
 
134
- The Rust-based checker is included — no separate install needed. `typedframes` itself has
135
- no required dependencies; add the extra for whichever backend(s) your code uses:
134
+ The `typedframes` command is a native Rust executable included in the wheel — no separate install
135
+ needed, and no Python process runs when you use it. Python is only needed for the schema classes and the mypy
136
+ plugin. `typedframes` itself has no required dependencies; add the extra for whichever backend(s) your code uses:
136
137
 
137
138
  ```shell
138
139
  pip install typedframes[pandas] # includes pandas
@@ -506,7 +507,7 @@ repos:
506
507
  name: typedframes check
507
508
  entry: typedframes check . --strict
508
509
  language: python
509
- additional_dependencies: ["typedframes==0.13.0"]
510
+ additional_dependencies: ["typedframes==0.14.0"]
510
511
  types_or: [python, jupyter]
511
512
  pass_filenames: false
512
513
  ```
@@ -555,7 +556,7 @@ The action installs the PyPI wheel into a throwaway virtualenv and runs the chec
555
556
  | Input | Default | |
556
557
  |-------|---------|-|
557
558
  | `path` | `.` | File or directory to check |
558
- | `version` | `latest` | PyPI version to install, e.g. `"0.13.0"` |
559
+ | `version` | `latest` | PyPI version to install, e.g. `"0.14.0"` |
559
560
  | `strict` | `true` | Fail the step on errors — `typedframes check` exits 0 without it |
560
561
  | `coverage-fail-under` | *(unset)* | Minimum DataFrame schema coverage, e.g. `"90"` |
561
562
  | `coverage-detail` | `summary` | Or `term-missing` for the per-file breakdown, `explain` to diagnose a lower-than-expected total |
@@ -697,15 +698,15 @@ Fast feedback reduces development time. The typedframes Rust binary provides nea
697
698
  **Benchmark results** (median of 5 runs ± one standard deviation, 3 warmup, caches cleared between runs):
698
699
  *2026-10-13 · Darwin 27.0.0 · arm · CPython 3.15.0 · 64GiB RAM · Great Expectations pinned @ 1.23.2*
699
700
 
700
- | Tool | Version | What it does | typedframes (14 files) | great_expectations (494 files) |
701
+ | Tool | Version | What it does | typedframes (12 files) | great_expectations (494 files) |
701
702
  |------|---------|--------------|------------------------|--------------------------------|
702
- | typedframes | 0.13.0 | DataFrame column checker | 42.8 ± 0.3 ms | 72.4 ± 0.8 ms |
703
- | ruff | 0.17.0 | Linter (no type checking) | 27.6 ± 1.0 ms | 222.1 ± 2.7 ms |
704
- | ty | 0.0.84 | Type checker | 59.6 ± 1.4 ms | 761.4 ± 9.4 ms |
705
- | pyrefly | 1.3.2 | Type checker | 98.0 ± 12.2 ms | 276.6 ± 7.3 ms |
706
- | mypy | 2.4.0 | Type checker (no plugin) | 1.83 ± 0.13 s | 3.08 ± 0.03 s |
707
- | mypy + typedframes | 2.4.0 | Type checker + column checker | 1.84 ± 0.03 s | 3.32 ± 0.09 s |
708
- | pyright | 1.1.414 | Type checker | 812.0 ± 12.3 ms | 3.91 ± 0.04 s |
703
+ | typedframes | 0.14.0 | DataFrame column checker | 18.1 ± 0.2 ms | 48.6 ± 0.1 ms |
704
+ | ruff | 0.17.0 | Linter (no type checking) | 25.1 ± 1.7 ms | 214.6 ± 2.0 ms |
705
+ | ty | 0.0.84 | Type checker | 51.1 ± 10.3 ms | 754.2 ± 9.0 ms |
706
+ | pyrefly | 1.3.2 | Type checker | 99.3 ± 11.0 ms | 299.0 ± 6.4 ms |
707
+ | mypy | 2.4.0 | Type checker (no plugin) | 1.79 ± 0.01 s | 2.99 ± 0.03 s |
708
+ | mypy + typedframes | 2.4.0 | Type checker + column checker | 1.81 ± 0.01 s | 3.16 ± 0.01 s |
709
+ | pyright | 1.1.414 | Type checker | 656.8 ± 5.8 ms | 3.86 ± 0.07 s |
709
710
 
710
711
  *Run `uv run python benchmarks/benchmark_checkers.py` to reproduce.*
711
712
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  > ⚠️ **Project Status: Proof of Concept**
10
10
  >
11
- > `typedframes` (v0.13.0) is currently an experimental proof-of-concept. The core static analysis and mypy/Rust
11
+ > `typedframes` (v0.14.0) is currently an experimental proof-of-concept. The core static analysis and mypy/Rust
12
12
  > integrations work, but expect rough edges. The codebase prioritizes demonstrating the viability of static DataFrame
13
13
  > column checking over production-grade stability.
14
14
  >
@@ -95,8 +95,9 @@ or
95
95
  uv add typedframes
96
96
  ```
97
97
 
98
- The Rust-based checker is included — no separate install needed. `typedframes` itself has
99
- no required dependencies; add the extra for whichever backend(s) your code uses:
98
+ The `typedframes` command is a native Rust executable included in the wheel — no separate install
99
+ needed, and no Python process runs when you use it. Python is only needed for the schema classes and the mypy
100
+ plugin. `typedframes` itself has no required dependencies; add the extra for whichever backend(s) your code uses:
100
101
 
101
102
  ```shell
102
103
  pip install typedframes[pandas] # includes pandas
@@ -470,7 +471,7 @@ repos:
470
471
  name: typedframes check
471
472
  entry: typedframes check . --strict
472
473
  language: python
473
- additional_dependencies: ["typedframes==0.13.0"]
474
+ additional_dependencies: ["typedframes==0.14.0"]
474
475
  types_or: [python, jupyter]
475
476
  pass_filenames: false
476
477
  ```
@@ -519,7 +520,7 @@ The action installs the PyPI wheel into a throwaway virtualenv and runs the chec
519
520
  | Input | Default | |
520
521
  |-------|---------|-|
521
522
  | `path` | `.` | File or directory to check |
522
- | `version` | `latest` | PyPI version to install, e.g. `"0.13.0"` |
523
+ | `version` | `latest` | PyPI version to install, e.g. `"0.14.0"` |
523
524
  | `strict` | `true` | Fail the step on errors — `typedframes check` exits 0 without it |
524
525
  | `coverage-fail-under` | *(unset)* | Minimum DataFrame schema coverage, e.g. `"90"` |
525
526
  | `coverage-detail` | `summary` | Or `term-missing` for the per-file breakdown, `explain` to diagnose a lower-than-expected total |
@@ -661,15 +662,15 @@ Fast feedback reduces development time. The typedframes Rust binary provides nea
661
662
  **Benchmark results** (median of 5 runs ± one standard deviation, 3 warmup, caches cleared between runs):
662
663
  *2026-10-13 · Darwin 27.0.0 · arm · CPython 3.15.0 · 64GiB RAM · Great Expectations pinned @ 1.23.2*
663
664
 
664
- | Tool | Version | What it does | typedframes (14 files) | great_expectations (494 files) |
665
+ | Tool | Version | What it does | typedframes (12 files) | great_expectations (494 files) |
665
666
  |------|---------|--------------|------------------------|--------------------------------|
666
- | typedframes | 0.13.0 | DataFrame column checker | 42.8 ± 0.3 ms | 72.4 ± 0.8 ms |
667
- | ruff | 0.17.0 | Linter (no type checking) | 27.6 ± 1.0 ms | 222.1 ± 2.7 ms |
668
- | ty | 0.0.84 | Type checker | 59.6 ± 1.4 ms | 761.4 ± 9.4 ms |
669
- | pyrefly | 1.3.2 | Type checker | 98.0 ± 12.2 ms | 276.6 ± 7.3 ms |
670
- | mypy | 2.4.0 | Type checker (no plugin) | 1.83 ± 0.13 s | 3.08 ± 0.03 s |
671
- | mypy + typedframes | 2.4.0 | Type checker + column checker | 1.84 ± 0.03 s | 3.32 ± 0.09 s |
672
- | pyright | 1.1.414 | Type checker | 812.0 ± 12.3 ms | 3.91 ± 0.04 s |
667
+ | typedframes | 0.14.0 | DataFrame column checker | 18.1 ± 0.2 ms | 48.6 ± 0.1 ms |
668
+ | ruff | 0.17.0 | Linter (no type checking) | 25.1 ± 1.7 ms | 214.6 ± 2.0 ms |
669
+ | ty | 0.0.84 | Type checker | 51.1 ± 10.3 ms | 754.2 ± 9.0 ms |
670
+ | pyrefly | 1.3.2 | Type checker | 99.3 ± 11.0 ms | 299.0 ± 6.4 ms |
671
+ | mypy | 2.4.0 | Type checker (no plugin) | 1.79 ± 0.01 s | 2.99 ± 0.03 s |
672
+ | mypy + typedframes | 2.4.0 | Type checker + column checker | 1.81 ± 0.01 s | 3.16 ± 0.01 s |
673
+ | pyright | 1.1.414 | Type checker | 656.8 ± 5.8 ms | 3.86 ± 0.07 s |
673
674
 
674
675
  *Run `uv run python benchmarks/benchmark_checkers.py` to reproduce.*
675
676
 
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "typedframes"
7
- version = "0.13.0"
7
+ version = "0.14.0"
8
8
  description = "Static analysis for pandas and polars DataFrames. Catch column errors at lint-time, not runtime."
9
9
  keywords = ["pandas", "polars", "type-checking", "static-analysis", "dataframe", "linter", "mypy-plugin"]
10
10
  readme = "README.md"
@@ -35,9 +35,6 @@ Documentation = "https://typedframes.readthedocs.io/en/latest/"
35
35
  Repository = "https://github.com/w-martin/typedframes"
36
36
  "Issue Tracker" = "https://github.com/w-martin/typedframes/issues"
37
37
 
38
- [project.scripts]
39
- typedframes = "typedframes.cli:main"
40
-
41
38
  [project.optional-dependencies]
42
39
  pandas = ["pandas>=2.0"]
43
40
  pandera = ["pandera>=0.20.0"]
@@ -47,9 +44,14 @@ mypy = ["mypy"]
47
44
  [tool.maturin]
48
45
  manifest-path = "rust/Cargo.toml"
49
46
  python-source = "src"
50
- module-name = "typedframes._rust_checker"
51
- features = ["pyo3/extension-module"]
52
- include = [{ path = "LICENSE", format = "sdist" }]
47
+ # The wheel carries the Rust `typedframes` executable (installed as a script) next to the Python package.
48
+ bindings = "bin"
49
+ module-name = "typedframes"
50
+ # The cargo config carries the allocator tuning, so a build from the sdist is tuned too.
51
+ include = [
52
+ { path = "LICENSE", format = "sdist" },
53
+ { path = ".cargo/config.toml", format = "sdist" },
54
+ ]
53
55
 
54
56
  [tool.pytest.ini_options]
55
57
  addopts = "--cov=. --cov-report=term-missing --cov-report=json --cov-report=lcov --cov-branch -n auto"
@@ -58,7 +60,6 @@ testpaths = ["tests"]
58
60
  [tool.coverage.run]
59
61
  branch = true
60
62
  omit = [
61
- "src/typedframes/python315.py", # needs 3.15; tests/unit/test_compat.py covers it there
62
63
  "benchmarks/*",
63
64
  "examples/*",
64
65
  "tests/*",
@@ -74,8 +75,6 @@ ignore_missing_imports = true
74
75
  line-length = 120
75
76
  target-version = "py311"
76
77
  fix = true
77
- # Files that use syntax newer than the oldest supported Python (see typedframes/compat.py).
78
- per-file-target-version = { "src/typedframes/python315.py" = "py315" }
79
78
 
80
79
  [tool.ruff.format]
81
80
  # Ensure the formatter respects the limit
@@ -112,7 +111,9 @@ ignore = [
112
111
  # join raises a tz-naive/tz-aware mismatch against that fixture.
113
112
  "examples/sql_connectors/feast/*" = ["DTZ005"]
114
113
  "tasks.py" = ["T201"]
115
- "src/typedframes/cli.py" = ["T201"]
114
+ # The one module that starts the Rust executable (the mypy plugin and `python -m typedframes` use it).
115
+ # Its command is always the installed `typedframes` executable, never user-supplied text.
116
+ "src/typedframes/_binary.py" = ["S603", "S606"]
116
117
  "benchmarks/*" = ["T201", "S603", "S607", "PLR2004", "PLR0912", "PLR0913", "TRY300"]
117
118
 
118
119
  [tool.ruff.lint.mccabe]
@@ -124,37 +125,39 @@ convention = "google"
124
125
  [dependency-groups]
125
126
  docs = [
126
127
  "mkdocs-material>=9.7.7",
127
- "mkdocstrings-python>=2.0.5",
128
+ "mkdocstrings-python>=2.0.9",
128
129
  ]
129
130
  dev = [
130
- "pandas>=3.0.5",
131
+ "pandas>=3.0.6",
131
132
  "pandera>=0.34.1",
132
133
  "pip-audit>=2.10.1",
133
- "polars>=1.43.2",
134
+ "polars>=2.0.0",
134
135
  "bandit>=1.9.4",
135
- "complexipy>=6.2.0",
136
+ "complexipy>=7.0.1,<8",
136
137
  "coverage-threshold>=0.6.2",
137
138
  "invoke>=3.0.3",
138
- "maturin>=1.14.1",
139
- "pre-commit>=4.6.1",
139
+ "maturin>=1.15.0",
140
+ "pre-commit>=4.7.0",
140
141
  "pyrefly>=1.3.2",
141
142
  "pyright>=1.1.414",
142
143
  "pytest>=9.1.1",
143
144
  "pytest-cov>=7.1.0",
144
145
  "pytest-xdist>=3.8.0",
145
146
  "ruff>=0.17.0",
146
- "ty>=0.0.84",
147
+ "ty>=0.0.87",
147
148
  "openpyxl>=3.1.5",
148
- "pyarrow>=25.0.1",
149
+ "pyarrow>=26.0.0",
149
150
  "xlsxwriter>=3.2.9",
150
- "fastexcel>=0.20.2",
151
+ "fastexcel>=0.21.0",
151
152
  "pandas-stubs>=3.0.5.260914",
152
153
  "mypy>=2.4.0",
153
- "trustedlicenses>=0.1.1",
154
+ "trustedlicenses>=0.3.4",
154
155
  ]
155
156
 
156
157
  [tool.bandit]
157
- exclude_dirs = ["tests", "examples"]
158
+ # bandit cannot skip one rule for one file, so the module that starts the Rust executable (B404, B603, B606;
159
+ # see `_binary.py`) is excluded whole. It does nothing else.
160
+ exclude_dirs = ["tests", "examples", "src/typedframes/_binary.py"]
158
161
 
159
162
  [tool.trustedlicenses]
160
163
  allowed-categories = ["Permissive", "Public Domain", "Copyleft Limited"]
@@ -172,10 +175,6 @@ branch_coverage_min = 100
172
175
  file_line_coverage_min = 100
173
176
  file_branch_coverage_min = 100
174
177
 
175
- [tool.ty.src]
176
- # Uses syntax newer than requires-python (see typedframes/compat.py); ruff still checks it.
177
- exclude = ["src/typedframes/python315.py"]
178
-
179
178
  [tool.ty.terminal]
180
179
  output-format = "concise"
181
180
 
@@ -26,12 +26,56 @@ version = "0.1.6"
26
26
  source = "registry+https://github.com/rust-lang/crates.io-index"
27
27
  checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
28
28
 
29
+ [[package]]
30
+ name = "anstream"
31
+ version = "1.0.0"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
34
+ dependencies = [
35
+ "anstyle",
36
+ "anstyle-parse",
37
+ "anstyle-query",
38
+ "anstyle-wincon",
39
+ "colorchoice",
40
+ "is_terminal_polyfill",
41
+ "utf8parse",
42
+ ]
43
+
29
44
  [[package]]
30
45
  name = "anstyle"
31
46
  version = "1.0.14"
32
47
  source = "registry+https://github.com/rust-lang/crates.io-index"
33
48
  checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
34
49
 
50
+ [[package]]
51
+ name = "anstyle-parse"
52
+ version = "1.0.0"
53
+ source = "registry+https://github.com/rust-lang/crates.io-index"
54
+ checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
55
+ dependencies = [
56
+ "utf8parse",
57
+ ]
58
+
59
+ [[package]]
60
+ name = "anstyle-query"
61
+ version = "1.1.5"
62
+ source = "registry+https://github.com/rust-lang/crates.io-index"
63
+ checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
64
+ dependencies = [
65
+ "windows-sys",
66
+ ]
67
+
68
+ [[package]]
69
+ name = "anstyle-wincon"
70
+ version = "3.0.11"
71
+ source = "registry+https://github.com/rust-lang/crates.io-index"
72
+ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
73
+ dependencies = [
74
+ "anstyle",
75
+ "once_cell_polyfill",
76
+ "windows-sys",
77
+ ]
78
+
35
79
  [[package]]
36
80
  name = "anyhow"
37
81
  version = "1.0.104"
@@ -195,21 +239,36 @@ dependencies = [
195
239
 
196
240
  [[package]]
197
241
  name = "clap"
198
- version = "4.6.6"
242
+ version = "4.6.7"
199
243
  source = "registry+https://github.com/rust-lang/crates.io-index"
200
- checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca"
244
+ checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946"
201
245
  dependencies = [
202
246
  "clap_builder",
247
+ "clap_derive",
203
248
  ]
204
249
 
205
250
  [[package]]
206
251
  name = "clap_builder"
207
- version = "4.6.6"
252
+ version = "4.6.7"
208
253
  source = "registry+https://github.com/rust-lang/crates.io-index"
209
- checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889"
254
+ checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
210
255
  dependencies = [
256
+ "anstream",
211
257
  "anstyle",
212
258
  "clap_lex",
259
+ "strsim",
260
+ ]
261
+
262
+ [[package]]
263
+ name = "clap_derive"
264
+ version = "4.6.7"
265
+ source = "registry+https://github.com/rust-lang/crates.io-index"
266
+ checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0"
267
+ dependencies = [
268
+ "heck",
269
+ "proc-macro2",
270
+ "quote",
271
+ "syn 3.0.3",
213
272
  ]
214
273
 
215
274
  [[package]]
@@ -224,6 +283,12 @@ version = "1.0.3"
224
283
  source = "registry+https://github.com/rust-lang/crates.io-index"
225
284
  checksum = "2550f75b8cfac212855f6b1885455df8eaee8fe8e246b647d69146142e016084"
226
285
 
286
+ [[package]]
287
+ name = "colorchoice"
288
+ version = "1.0.5"
289
+ source = "registry+https://github.com/rust-lang/crates.io-index"
290
+ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
291
+
227
292
  [[package]]
228
293
  name = "compact_str"
229
294
  version = "0.10.0"
@@ -494,6 +559,12 @@ dependencies = [
494
559
  "syn 2.0.119",
495
560
  ]
496
561
 
562
+ [[package]]
563
+ name = "is_terminal_polyfill"
564
+ version = "1.70.2"
565
+ source = "registry+https://github.com/rust-lang/crates.io-index"
566
+ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
567
+
497
568
  [[package]]
498
569
  name = "itertools"
499
570
  version = "0.13.0"
@@ -618,6 +689,12 @@ version = "1.21.4"
618
689
  source = "registry+https://github.com/rust-lang/crates.io-index"
619
690
  checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
620
691
 
692
+ [[package]]
693
+ name = "once_cell_polyfill"
694
+ version = "1.70.2"
695
+ source = "registry+https://github.com/rust-lang/crates.io-index"
696
+ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
697
+
621
698
  [[package]]
622
699
  name = "oorandom"
623
700
  version = "11.1.5"
@@ -715,12 +792,6 @@ dependencies = [
715
792
  "plotters-backend",
716
793
  ]
717
794
 
718
- [[package]]
719
- name = "portable-atomic"
720
- version = "1.14.0"
721
- source = "registry+https://github.com/rust-lang/crates.io-index"
722
- checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3"
723
-
724
795
  [[package]]
725
796
  name = "ppv-lite86"
726
797
  version = "0.2.21"
@@ -760,63 +831,6 @@ dependencies = [
760
831
  "cc",
761
832
  ]
762
833
 
763
- [[package]]
764
- name = "pyo3"
765
- version = "0.29.2"
766
- source = "registry+https://github.com/rust-lang/crates.io-index"
767
- checksum = "4688ddedf473e32662b9b067670129a8afb8c18e351482c70d62ba4a88171e8b"
768
- dependencies = [
769
- "libc",
770
- "once_cell",
771
- "portable-atomic",
772
- "pyo3-build-config",
773
- "pyo3-ffi",
774
- "pyo3-macros",
775
- ]
776
-
777
- [[package]]
778
- name = "pyo3-build-config"
779
- version = "0.29.2"
780
- source = "registry+https://github.com/rust-lang/crates.io-index"
781
- checksum = "f41027e41b4bd03f6e60f9f417fe24a6341a6bb744edd62b6f709f2a52ea30e9"
782
- dependencies = [
783
- "target-lexicon",
784
- ]
785
-
786
- [[package]]
787
- name = "pyo3-ffi"
788
- version = "0.29.2"
789
- source = "registry+https://github.com/rust-lang/crates.io-index"
790
- checksum = "e591a95526fead067432c3b3a33fc74770b87b1e04e73671090d9c2055a2b327"
791
- dependencies = [
792
- "libc",
793
- "pyo3-build-config",
794
- ]
795
-
796
- [[package]]
797
- name = "pyo3-macros"
798
- version = "0.29.2"
799
- source = "registry+https://github.com/rust-lang/crates.io-index"
800
- checksum = "73225868fc1cd84eef2c3c230ddb91273bf1de46aeb8a4248da76d32a0924a1c"
801
- dependencies = [
802
- "proc-macro2",
803
- "pyo3-macros-backend",
804
- "quote",
805
- "syn 2.0.119",
806
- ]
807
-
808
- [[package]]
809
- name = "pyo3-macros-backend"
810
- version = "0.29.2"
811
- source = "registry+https://github.com/rust-lang/crates.io-index"
812
- checksum = "571575aa3749fa6216757dd47d2a3e7ef360f329a40f0666a9fbd14889024952"
813
- dependencies = [
814
- "heck",
815
- "proc-macro2",
816
- "quote",
817
- "syn 2.0.119",
818
- ]
819
-
820
834
  [[package]]
821
835
  name = "quote"
822
836
  version = "1.0.47"
@@ -1163,6 +1177,7 @@ version = "1.0.151"
1163
1177
  source = "registry+https://github.com/rust-lang/crates.io-index"
1164
1178
  checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
1165
1179
  dependencies = [
1180
+ "indexmap",
1166
1181
  "itoa",
1167
1182
  "memchr",
1168
1183
  "serde",
@@ -1232,6 +1247,12 @@ version = "1.1.0"
1232
1247
  source = "registry+https://github.com/rust-lang/crates.io-index"
1233
1248
  checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
1234
1249
 
1250
+ [[package]]
1251
+ name = "strsim"
1252
+ version = "0.11.1"
1253
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1254
+ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
1255
+
1235
1256
  [[package]]
1236
1257
  name = "syn"
1237
1258
  version = "2.0.119"
@@ -1254,12 +1275,6 @@ dependencies = [
1254
1275
  "unicode-ident",
1255
1276
  ]
1256
1277
 
1257
- [[package]]
1258
- name = "target-lexicon"
1259
- version = "0.13.5"
1260
- source = "registry+https://github.com/rust-lang/crates.io-index"
1261
- checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
1262
-
1263
1278
  [[package]]
1264
1279
  name = "tempfile"
1265
1280
  version = "3.27.0"
@@ -1385,12 +1400,13 @@ checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2"
1385
1400
 
1386
1401
  [[package]]
1387
1402
  name = "typedframes_checker"
1388
- version = "0.13.0"
1403
+ version = "0.14.0"
1389
1404
  dependencies = [
1390
1405
  "anyhow",
1406
+ "clap",
1391
1407
  "criterion",
1392
1408
  "mimalloc",
1393
- "pyo3",
1409
+ "regex",
1394
1410
  "rmp-serde",
1395
1411
  "ruff_notebook",
1396
1412
  "ruff_python_ast",
@@ -1448,6 +1464,12 @@ dependencies = [
1448
1464
  "rand 0.8.7",
1449
1465
  ]
1450
1466
 
1467
+ [[package]]
1468
+ name = "utf8parse"
1469
+ version = "0.2.2"
1470
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1471
+ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
1472
+
1451
1473
  [[package]]
1452
1474
  name = "uuid"
1453
1475
  version = "1.24.0"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "typedframes_checker"
3
- version = "0.13.0"
3
+ version = "0.14.0"
4
4
  edition = "2021"
5
5
  description = "A high-performance Rust-based checker for typedframes DataFrame column schemas"
6
6
  license = "MIT"
@@ -9,12 +9,8 @@ homepage = "https://github.com/w-martin/typedframes"
9
9
  documentation = "https://github.com/w-martin/typedframes"
10
10
  readme = "README.md"
11
11
 
12
- [lib]
13
- name = "_rust_checker"
14
- crate-type = ["cdylib", "rlib"]
15
-
16
12
  [[bin]]
17
- name = "typedframes_checker"
13
+ name = "typedframes"
18
14
  path = "src/main.rs"
19
15
 
20
16
  [profile.release]
@@ -37,26 +33,18 @@ ruff_source_file = { git = "https://github.com/astral-sh/ruff", tag = "0.16.2" }
37
33
  ruff_text_size = { git = "https://github.com/astral-sh/ruff", tag = "0.16.2" }
38
34
  ruff_notebook = { git = "https://github.com/astral-sh/ruff", tag = "0.16.2" }
39
35
  serde = { version = "1.0", features = ["derive"] }
40
- serde_json = "1.0"
36
+ serde_json = { version = "1.0", features = ["preserve_order"] }
41
37
  rmp-serde = "1"
42
38
  anyhow = "1.0"
43
- toml = "1.1"
39
+ toml = { version = "1.1", features = ["preserve_order"] }
44
40
  sqlparser = "0.62"
45
- # `extension-module` is deliberately NOT enabled here. maturin turns it on for the
46
- # builds that need it (`features = ["pyo3/extension-module"]` in pyproject.toml), and
47
- # enabling it unconditionally breaks `cargo test` on macOS: the feature tells pyo3 not
48
- # to link libpython, leaving the CPython symbols to be resolved by the interpreter that
49
- # loads the extension. `cargo test` also builds the cdylib, and macOS's linker rejects
50
- # a dylib with undefined symbols, so the whole test run failed with
51
- # "Undefined symbols ... _PyByteArray_AsString". Linux tolerates it, which is why CI
52
- # stayed green while local macOS runs did not.
53
- pyo3 = { version = "0.29", features = ["abi3-py311"] }
54
-
41
+ clap = { version = "4.6.7", features = ["derive"] }
42
+ regex = "1.13.1"
55
43
  # The allocator split ruff and ty use: jemalloc where it builds, mimalloc on Windows (jemalloc
56
44
  # has no MSVC support), the platform allocator elsewhere. Keep the `cfg`s in `src/lib.rs` in
57
- # step with these. `disable_initial_exec_tls` lets the library be loaded with `dlopen`.
45
+ # step with these. jemalloc is tuned for a short run on many threads in `../.cargo/config.toml`.
58
46
  [target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), not(target_os = "aix"), not(target_os = "android"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64")))'.dependencies]
59
- tikv-jemallocator = { version = "0.7", features = ["disable_initial_exec_tls"] }
47
+ tikv-jemallocator = "0.7"
60
48
 
61
49
  [target.'cfg(target_os = "windows")'.dependencies]
62
50
  mimalloc = { version = "0.1.52", default-features = false }
@@ -1,7 +1,7 @@
1
1
  use criterion::{criterion_group, criterion_main, Criterion};
2
2
  use std::path::Path;
3
3
 
4
- use _rust_checker::Linter;
4
+ use typedframes_checker::Linter;
5
5
 
6
6
  fn bench_check_file(c: &mut Criterion) {
7
7
  let source = include_str!("../../examples/features/typedframes_example.py");
@@ -3,9 +3,9 @@
3
3
  //! before writing and left alone if it changed.
4
4
 
5
5
  use crate::config::{find_project_root, load_linter_config};
6
+ use crate::engine::{linter_with_index, CheckError};
6
7
  use crate::errors::LintError;
7
8
  use crate::index::ProjectIndex;
8
- use crate::pyapi::{linter_with_index, CheckError};
9
9
  use crate::suggest::{Edit, Suggestion};
10
10
  use ruff_python_parser::parse_module;
11
11
  use serde::Serialize;