typedframes 0.11.1__tar.gz → 0.13.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.
- {typedframes-0.11.1 → typedframes-0.13.0}/PKG-INFO +40 -14
- {typedframes-0.11.1 → typedframes-0.13.0}/README.md +39 -13
- {typedframes-0.11.1 → typedframes-0.13.0}/pyproject.toml +9 -21
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/Cargo.lock +41 -1
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/Cargo.toml +10 -1
- typedframes-0.13.0/rust/src/call_usage.rs +425 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/column_usage.rs +36 -16
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/constants.rs +3 -1
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/errors.rs +1 -0
- typedframes-0.13.0/rust/src/fast_hash.rs +106 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/helpers.rs +96 -5
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/index.rs +592 -249
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/lib.rs +29 -2
- typedframes-0.13.0/rust/src/library_names.txt +2852 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/linter.rs +533 -18
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/parallel.rs +76 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/pyapi.rs +327 -84
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/report.rs +233 -18
- typedframes-0.13.0/rust/src/report_minimize.rs +315 -0
- typedframes-0.13.0/rust/src/report_names.rs +311 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/static_eval.rs +372 -124
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/suggest.rs +45 -1
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/__init__.py +37 -13
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/_rust_checker.pyi +19 -7
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/base_schema.py +0 -82
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/cli.py +275 -87
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/column.py +1 -1
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/column_group.py +5 -44
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/column_set.py +2 -8
- typedframes-0.13.0/src/typedframes/compat.py +28 -0
- typedframes-0.13.0/src/typedframes/python315.py +13 -0
- typedframes-0.11.1/rust/src/report_names.rs +0 -631
- typedframes-0.11.1/src/typedframes/pandas.py +0 -284
- typedframes-0.11.1/src/typedframes/polars.py +0 -234
- {typedframes-0.11.1 → typedframes-0.13.0}/LICENSE +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/.cargo/config.toml +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/README.md +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/benches/parser_bench.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/build.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/apply.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/ast_extract.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/column_consuming_methods.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/config.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/contract.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/frame_ops.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/main.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/notebook.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/phrase.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/sql.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/typo.rs +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/src/words.txt +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/rust/tests/integration_test.rs +0 -0
- /typedframes-0.11.1/src/typedframes/_cache.py → /typedframes-0.13.0/src/typedframes/cache.py +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/column_group_error.py +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/missing_dependency_error.py +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/mypy.py +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/pandera.py +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/py.typed +0 -0
- {typedframes-0.11.1 → typedframes-0.13.0}/src/typedframes/schema_algebra.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: typedframes
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.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.
|
|
47
|
+
> `typedframes` (v0.13.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
|
>
|
|
@@ -506,7 +506,7 @@ repos:
|
|
|
506
506
|
name: typedframes check
|
|
507
507
|
entry: typedframes check . --strict
|
|
508
508
|
language: python
|
|
509
|
-
additional_dependencies: ["typedframes==0.
|
|
509
|
+
additional_dependencies: ["typedframes==0.13.0"]
|
|
510
510
|
types_or: [python, jupyter]
|
|
511
511
|
pass_filenames: false
|
|
512
512
|
```
|
|
@@ -555,13 +555,39 @@ The action installs the PyPI wheel into a throwaway virtualenv and runs the chec
|
|
|
555
555
|
| Input | Default | |
|
|
556
556
|
|-------|---------|-|
|
|
557
557
|
| `path` | `.` | File or directory to check |
|
|
558
|
-
| `version` | `latest` | PyPI version to install, e.g. `"0.
|
|
558
|
+
| `version` | `latest` | PyPI version to install, e.g. `"0.13.0"` |
|
|
559
559
|
| `strict` | `true` | Fail the step on errors — `typedframes check` exits 0 without it |
|
|
560
560
|
| `coverage-fail-under` | *(unset)* | Minimum DataFrame schema coverage, e.g. `"90"` |
|
|
561
561
|
| `coverage-detail` | `summary` | Or `term-missing` for the per-file breakdown, `explain` to diagnose a lower-than-expected total |
|
|
562
562
|
| `no-warnings` | `false` | Suppress warning-level diagnostics |
|
|
563
563
|
| `args` | *(empty)* | Escape hatch for `--no-index`, `--lenient-ingest`, `--no-info` |
|
|
564
564
|
|
|
565
|
+
### Fixing Untyped DataFrames (`suggest`)
|
|
566
|
+
|
|
567
|
+
For a DataFrame the checker can't resolve columns for, `typedframes suggest` works out a fix from the columns the rest
|
|
568
|
+
of its scope reads: a `usecols=`/`columns=` added to a plain `read_csv` or `read_parquet`, or else a column selection on
|
|
569
|
+
the line after the load. It is a dry run that prints diffs. Each site has a two-word name (`quiet-amber`) shown next to it.
|
|
570
|
+
|
|
571
|
+
```shell
|
|
572
|
+
typedframes suggest src/ # dry run: prints diffs, changes nothing
|
|
573
|
+
typedframes suggest src/ --apply # write the safe suggestions
|
|
574
|
+
typedframes suggest src/ --apply --only quiet-amber # act on just that site
|
|
575
|
+
typedframes suggest src/ --interactive # ask about each suggestion
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
Edits need a clean git work tree and tracked files, each edited file is re-checked in memory before anything is written,
|
|
579
|
+
and the files are written together or not at all. See the
|
|
580
|
+
[full guide](docs/usage.md#suggesting-fixes-suggest).
|
|
581
|
+
|
|
582
|
+
### Reporting a Problem (`report`)
|
|
583
|
+
|
|
584
|
+
If `check` or `suggest` gets a site wrong and the code can't be shared, `typedframes report quiet-amber src/` prints a
|
|
585
|
+
bug-report body with a redacted copy of the code around that site, checked against the checker so it reproduces the same
|
|
586
|
+
result. `typedframes report --all src/` does this for every untyped site, grouped by why the checker decided as it did.
|
|
587
|
+
Redacted is not anonymous: read it before posting, and don't use it on code you aren't allowed to share. See
|
|
588
|
+
[Reporting a problem](docs/usage.md#reporting-a-problem-report), and
|
|
589
|
+
[Security and data handling](docs/security.md) for what the tool reads, writes and connects to.
|
|
590
|
+
|
|
565
591
|
---
|
|
566
592
|
|
|
567
593
|
## Jupyter Notebooks
|
|
@@ -668,18 +694,18 @@ plus the requested features, so both halves get checked normally. See
|
|
|
668
694
|
|
|
669
695
|
Fast feedback reduces development time. The typedframes Rust binary provides near-instant column checking.
|
|
670
696
|
|
|
671
|
-
**Benchmark results** (
|
|
672
|
-
*2026-10-
|
|
697
|
+
**Benchmark results** (median of 5 runs ± one standard deviation, 3 warmup, caches cleared between runs):
|
|
698
|
+
*2026-10-13 · Darwin 27.0.0 · arm · CPython 3.15.0 · 64GiB RAM · Great Expectations pinned @ 1.23.2*
|
|
673
699
|
|
|
674
700
|
| Tool | Version | What it does | typedframes (14 files) | great_expectations (494 files) |
|
|
675
701
|
|------|---------|--------------|------------------------|--------------------------------|
|
|
676
|
-
| typedframes | 0.
|
|
677
|
-
| ruff | 0.
|
|
678
|
-
| ty | 0.0.84 | Type checker |
|
|
679
|
-
| pyrefly | 1.3.2 | Type checker |
|
|
680
|
-
| mypy | 2.4.0 | Type checker (no plugin) | 1.
|
|
681
|
-
| mypy + typedframes | 2.4.0 | Type checker + column checker | 1.
|
|
682
|
-
| pyright | 1.1.414 | Type checker |
|
|
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 |
|
|
683
709
|
|
|
684
710
|
*Run `uv run python benchmarks/benchmark_checkers.py` to reproduce.*
|
|
685
711
|
|
|
@@ -924,7 +950,7 @@ Comprehensive comparison of pandas/DataFrame typing and validation tools. **type
|
|
|
924
950
|
|
|
925
951
|
| Feature | typedframes | Pandera | Great Expectations | strictly_typed_pandas | pandas-stubs | dataenforce | pandas-type-checks | StaticFrame | narwhals | dataframely | patito |
|
|
926
952
|
|---------------------------------|------------------------|-------------|--------------------|-----------------------|--------------|-------------|--------------------|------------------|----------|------------------|------------------|
|
|
927
|
-
| **Version tested** | 0.
|
|
953
|
+
| **Version tested** | 0.12.0 | 0.34.1 | 1.23.2 | 0.3.7 | 3.0.5.260914 | 0.1.2 | 1.1.3 | 5.1.1 | 2.26.0 | 3.1.2 | 0.8.6 |
|
|
928
954
|
| **Analysis Type** |
|
|
929
955
|
| When errors are caught | **Static (lint-time)** | Runtime | Runtime | Runtime | Static | Runtime | Runtime | Runtime | Runtime | Runtime | Runtime |
|
|
930
956
|
| **Static Analysis (our focus)** |
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> ⚠️ **Project Status: Proof of Concept**
|
|
10
10
|
>
|
|
11
|
-
> `typedframes` (v0.
|
|
11
|
+
> `typedframes` (v0.13.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
|
>
|
|
@@ -470,7 +470,7 @@ repos:
|
|
|
470
470
|
name: typedframes check
|
|
471
471
|
entry: typedframes check . --strict
|
|
472
472
|
language: python
|
|
473
|
-
additional_dependencies: ["typedframes==0.
|
|
473
|
+
additional_dependencies: ["typedframes==0.13.0"]
|
|
474
474
|
types_or: [python, jupyter]
|
|
475
475
|
pass_filenames: false
|
|
476
476
|
```
|
|
@@ -519,13 +519,39 @@ The action installs the PyPI wheel into a throwaway virtualenv and runs the chec
|
|
|
519
519
|
| Input | Default | |
|
|
520
520
|
|-------|---------|-|
|
|
521
521
|
| `path` | `.` | File or directory to check |
|
|
522
|
-
| `version` | `latest` | PyPI version to install, e.g. `"0.
|
|
522
|
+
| `version` | `latest` | PyPI version to install, e.g. `"0.13.0"` |
|
|
523
523
|
| `strict` | `true` | Fail the step on errors — `typedframes check` exits 0 without it |
|
|
524
524
|
| `coverage-fail-under` | *(unset)* | Minimum DataFrame schema coverage, e.g. `"90"` |
|
|
525
525
|
| `coverage-detail` | `summary` | Or `term-missing` for the per-file breakdown, `explain` to diagnose a lower-than-expected total |
|
|
526
526
|
| `no-warnings` | `false` | Suppress warning-level diagnostics |
|
|
527
527
|
| `args` | *(empty)* | Escape hatch for `--no-index`, `--lenient-ingest`, `--no-info` |
|
|
528
528
|
|
|
529
|
+
### Fixing Untyped DataFrames (`suggest`)
|
|
530
|
+
|
|
531
|
+
For a DataFrame the checker can't resolve columns for, `typedframes suggest` works out a fix from the columns the rest
|
|
532
|
+
of its scope reads: a `usecols=`/`columns=` added to a plain `read_csv` or `read_parquet`, or else a column selection on
|
|
533
|
+
the line after the load. It is a dry run that prints diffs. Each site has a two-word name (`quiet-amber`) shown next to it.
|
|
534
|
+
|
|
535
|
+
```shell
|
|
536
|
+
typedframes suggest src/ # dry run: prints diffs, changes nothing
|
|
537
|
+
typedframes suggest src/ --apply # write the safe suggestions
|
|
538
|
+
typedframes suggest src/ --apply --only quiet-amber # act on just that site
|
|
539
|
+
typedframes suggest src/ --interactive # ask about each suggestion
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
Edits need a clean git work tree and tracked files, each edited file is re-checked in memory before anything is written,
|
|
543
|
+
and the files are written together or not at all. See the
|
|
544
|
+
[full guide](docs/usage.md#suggesting-fixes-suggest).
|
|
545
|
+
|
|
546
|
+
### Reporting a Problem (`report`)
|
|
547
|
+
|
|
548
|
+
If `check` or `suggest` gets a site wrong and the code can't be shared, `typedframes report quiet-amber src/` prints a
|
|
549
|
+
bug-report body with a redacted copy of the code around that site, checked against the checker so it reproduces the same
|
|
550
|
+
result. `typedframes report --all src/` does this for every untyped site, grouped by why the checker decided as it did.
|
|
551
|
+
Redacted is not anonymous: read it before posting, and don't use it on code you aren't allowed to share. See
|
|
552
|
+
[Reporting a problem](docs/usage.md#reporting-a-problem-report), and
|
|
553
|
+
[Security and data handling](docs/security.md) for what the tool reads, writes and connects to.
|
|
554
|
+
|
|
529
555
|
---
|
|
530
556
|
|
|
531
557
|
## Jupyter Notebooks
|
|
@@ -632,18 +658,18 @@ plus the requested features, so both halves get checked normally. See
|
|
|
632
658
|
|
|
633
659
|
Fast feedback reduces development time. The typedframes Rust binary provides near-instant column checking.
|
|
634
660
|
|
|
635
|
-
**Benchmark results** (
|
|
636
|
-
*2026-10-
|
|
661
|
+
**Benchmark results** (median of 5 runs ± one standard deviation, 3 warmup, caches cleared between runs):
|
|
662
|
+
*2026-10-13 · Darwin 27.0.0 · arm · CPython 3.15.0 · 64GiB RAM · Great Expectations pinned @ 1.23.2*
|
|
637
663
|
|
|
638
664
|
| Tool | Version | What it does | typedframes (14 files) | great_expectations (494 files) |
|
|
639
665
|
|------|---------|--------------|------------------------|--------------------------------|
|
|
640
|
-
| typedframes | 0.
|
|
641
|
-
| ruff | 0.
|
|
642
|
-
| ty | 0.0.84 | Type checker |
|
|
643
|
-
| pyrefly | 1.3.2 | Type checker |
|
|
644
|
-
| mypy | 2.4.0 | Type checker (no plugin) | 1.
|
|
645
|
-
| mypy + typedframes | 2.4.0 | Type checker + column checker | 1.
|
|
646
|
-
| pyright | 1.1.414 | Type checker |
|
|
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 |
|
|
647
673
|
|
|
648
674
|
*Run `uv run python benchmarks/benchmark_checkers.py` to reproduce.*
|
|
649
675
|
|
|
@@ -888,7 +914,7 @@ Comprehensive comparison of pandas/DataFrame typing and validation tools. **type
|
|
|
888
914
|
|
|
889
915
|
| Feature | typedframes | Pandera | Great Expectations | strictly_typed_pandas | pandas-stubs | dataenforce | pandas-type-checks | StaticFrame | narwhals | dataframely | patito |
|
|
890
916
|
|---------------------------------|------------------------|-------------|--------------------|-----------------------|--------------|-------------|--------------------|------------------|----------|------------------|------------------|
|
|
891
|
-
| **Version tested** | 0.
|
|
917
|
+
| **Version tested** | 0.12.0 | 0.34.1 | 1.23.2 | 0.3.7 | 3.0.5.260914 | 0.1.2 | 1.1.3 | 5.1.1 | 2.26.0 | 3.1.2 | 0.8.6 |
|
|
892
918
|
| **Analysis Type** |
|
|
893
919
|
| When errors are caught | **Static (lint-time)** | Runtime | Runtime | Runtime | Static | Runtime | Runtime | Runtime | Runtime | Runtime | Runtime |
|
|
894
920
|
| **Static Analysis (our focus)** |
|
|
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "typedframes"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.13.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"
|
|
@@ -58,6 +58,7 @@ testpaths = ["tests"]
|
|
|
58
58
|
[tool.coverage.run]
|
|
59
59
|
branch = true
|
|
60
60
|
omit = [
|
|
61
|
+
"src/typedframes/python315.py", # needs 3.15; tests/unit/test_compat.py covers it there
|
|
61
62
|
"benchmarks/*",
|
|
62
63
|
"examples/*",
|
|
63
64
|
"tests/*",
|
|
@@ -73,6 +74,8 @@ ignore_missing_imports = true
|
|
|
73
74
|
line-length = 120
|
|
74
75
|
target-version = "py311"
|
|
75
76
|
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" }
|
|
76
79
|
|
|
77
80
|
[tool.ruff.format]
|
|
78
81
|
# Ensure the formatter respects the limit
|
|
@@ -111,11 +114,6 @@ ignore = [
|
|
|
111
114
|
"tasks.py" = ["T201"]
|
|
112
115
|
"src/typedframes/cli.py" = ["T201"]
|
|
113
116
|
"benchmarks/*" = ["T201", "S603", "S607", "PLR2004", "PLR0912", "PLR0913", "TRY300"]
|
|
114
|
-
# Deprecated PolarsFrame classmethod stubs (read_csv/read_parquet/read_json/read_excel)
|
|
115
|
-
# intentionally don't use `source`/`schema` -- they exist only to raise a deprecation
|
|
116
|
-
# warning and forward to the real pandas/polars call, matching the real signatures
|
|
117
|
-
# they stand in for.
|
|
118
|
-
"src/typedframes/polars.py" = ["ARG003"]
|
|
119
117
|
|
|
120
118
|
[tool.ruff.lint.mccabe]
|
|
121
119
|
max-complexity = 10
|
|
@@ -144,7 +142,7 @@ dev = [
|
|
|
144
142
|
"pytest>=9.1.1",
|
|
145
143
|
"pytest-cov>=7.1.0",
|
|
146
144
|
"pytest-xdist>=3.8.0",
|
|
147
|
-
"ruff>=0.
|
|
145
|
+
"ruff>=0.17.0",
|
|
148
146
|
"ty>=0.0.84",
|
|
149
147
|
"openpyxl>=3.1.5",
|
|
150
148
|
"pyarrow>=25.0.1",
|
|
@@ -174,6 +172,10 @@ branch_coverage_min = 100
|
|
|
174
172
|
file_line_coverage_min = 100
|
|
175
173
|
file_branch_coverage_min = 100
|
|
176
174
|
|
|
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
|
+
|
|
177
179
|
[tool.ty.terminal]
|
|
178
180
|
output-format = "concise"
|
|
179
181
|
|
|
@@ -224,20 +226,6 @@ include = ["benchmarks/**/*.py"]
|
|
|
224
226
|
[tool.ty.overrides.rules]
|
|
225
227
|
no-matching-overload = "ignore"
|
|
226
228
|
|
|
227
|
-
# PandasFrame is deprecated (see its module docstring): it subclasses pd.DataFrame to
|
|
228
|
-
# attach schema-aware __getitem__/groupby overrides, which structurally can't satisfy
|
|
229
|
-
# pd.DataFrame's own signatures -- that mismatch is the reason the class is deprecated
|
|
230
|
-
# in favor of Annotated[pd.DataFrame, Schema], not a bug to work around case-by-case.
|
|
231
|
-
[[tool.ty.overrides]]
|
|
232
|
-
include = ["src/typedframes/pandas.py"]
|
|
233
|
-
|
|
234
|
-
[tool.ty.overrides.rules]
|
|
235
|
-
invalid-method-override = "ignore"
|
|
236
|
-
no-matching-overload = "ignore"
|
|
237
|
-
invalid-argument-type = "ignore"
|
|
238
|
-
too-many-positional-arguments = "ignore"
|
|
239
|
-
invalid-return-type = "ignore"
|
|
240
|
-
|
|
241
229
|
[tool.typedframes]
|
|
242
230
|
enabled = true
|
|
243
231
|
warnings = true
|
|
@@ -535,6 +535,15 @@ version = "0.2.189"
|
|
|
535
535
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
536
536
|
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
537
537
|
|
|
538
|
+
[[package]]
|
|
539
|
+
name = "libmimalloc-sys"
|
|
540
|
+
version = "0.1.49"
|
|
541
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
542
|
+
checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9"
|
|
543
|
+
dependencies = [
|
|
544
|
+
"cc",
|
|
545
|
+
]
|
|
546
|
+
|
|
538
547
|
[[package]]
|
|
539
548
|
name = "linux-raw-sys"
|
|
540
549
|
version = "0.12.1"
|
|
@@ -576,6 +585,15 @@ version = "2.8.3"
|
|
|
576
585
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
577
586
|
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
578
587
|
|
|
588
|
+
[[package]]
|
|
589
|
+
name = "mimalloc"
|
|
590
|
+
version = "0.1.52"
|
|
591
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
592
|
+
checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862"
|
|
593
|
+
dependencies = [
|
|
594
|
+
"libmimalloc-sys",
|
|
595
|
+
]
|
|
596
|
+
|
|
579
597
|
[[package]]
|
|
580
598
|
name = "num-traits"
|
|
581
599
|
version = "0.2.19"
|
|
@@ -1281,6 +1299,26 @@ dependencies = [
|
|
|
1281
1299
|
"syn 3.0.3",
|
|
1282
1300
|
]
|
|
1283
1301
|
|
|
1302
|
+
[[package]]
|
|
1303
|
+
name = "tikv-jemalloc-sys"
|
|
1304
|
+
version = "0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8"
|
|
1305
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1306
|
+
checksum = "1a2825c78386b4ae0314074867860ba9577875de945f05992c38815cbec327f0"
|
|
1307
|
+
dependencies = [
|
|
1308
|
+
"cc",
|
|
1309
|
+
"libc",
|
|
1310
|
+
]
|
|
1311
|
+
|
|
1312
|
+
[[package]]
|
|
1313
|
+
name = "tikv-jemallocator"
|
|
1314
|
+
version = "0.7.0"
|
|
1315
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1316
|
+
checksum = "249f09e49ab1609436f34c776e84231bead18d6a955f119f939bdc1d847561bd"
|
|
1317
|
+
dependencies = [
|
|
1318
|
+
"libc",
|
|
1319
|
+
"tikv-jemalloc-sys",
|
|
1320
|
+
]
|
|
1321
|
+
|
|
1284
1322
|
[[package]]
|
|
1285
1323
|
name = "tinytemplate"
|
|
1286
1324
|
version = "1.2.1"
|
|
@@ -1347,10 +1385,11 @@ checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2"
|
|
|
1347
1385
|
|
|
1348
1386
|
[[package]]
|
|
1349
1387
|
name = "typedframes_checker"
|
|
1350
|
-
version = "0.
|
|
1388
|
+
version = "0.13.0"
|
|
1351
1389
|
dependencies = [
|
|
1352
1390
|
"anyhow",
|
|
1353
1391
|
"criterion",
|
|
1392
|
+
"mimalloc",
|
|
1354
1393
|
"pyo3",
|
|
1355
1394
|
"rmp-serde",
|
|
1356
1395
|
"ruff_notebook",
|
|
@@ -1362,6 +1401,7 @@ dependencies = [
|
|
|
1362
1401
|
"serde_json",
|
|
1363
1402
|
"sqlparser",
|
|
1364
1403
|
"tempfile",
|
|
1404
|
+
"tikv-jemallocator",
|
|
1365
1405
|
"toml",
|
|
1366
1406
|
]
|
|
1367
1407
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "typedframes_checker"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.13.0"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
description = "A high-performance Rust-based checker for typedframes DataFrame column schemas"
|
|
6
6
|
license = "MIT"
|
|
@@ -52,6 +52,15 @@ sqlparser = "0.62"
|
|
|
52
52
|
# stayed green while local macOS runs did not.
|
|
53
53
|
pyo3 = { version = "0.29", features = ["abi3-py311"] }
|
|
54
54
|
|
|
55
|
+
# The allocator split ruff and ty use: jemalloc where it builds, mimalloc on Windows (jemalloc
|
|
56
|
+
# 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`.
|
|
58
|
+
[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"] }
|
|
60
|
+
|
|
61
|
+
[target.'cfg(target_os = "windows")'.dependencies]
|
|
62
|
+
mimalloc = { version = "0.1.52", default-features = false }
|
|
63
|
+
|
|
55
64
|
[dev-dependencies]
|
|
56
65
|
tempfile = "3.8"
|
|
57
66
|
criterion = { version = "0.8", features = ["html_reports"] }
|