dtypeflow 1.0.0__tar.gz → 1.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.
Files changed (43) hide show
  1. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/LICENSE +21 -21
  2. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/PKG-INFO +93 -69
  3. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/README.md +92 -68
  4. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/pyproject.toml +1 -1
  5. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/pyproject.toml.orig +1 -1
  6. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/__init__.py +5 -5
  7. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/__init__.py +1 -1
  8. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/candidate/__init__.py +40 -40
  9. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/candidate/base.py +37 -37
  10. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/candidate/factory.py +258 -258
  11. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/candidate/primitive.py +79 -79
  12. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dataset.py +58 -46
  13. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/__init__.py +70 -70
  14. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/base.py +14 -14
  15. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/hierachy.md +51 -51
  16. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/nested/__init__.py +5 -5
  17. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/nested/dictionary.py +14 -14
  18. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/primitive/__init__.py +39 -39
  19. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/primitive/base.py +6 -6
  20. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/primitive/boolean.py +20 -20
  21. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/primitive/float.py +40 -40
  22. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/primitive/integer/__init__.py +31 -31
  23. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/primitive/integer/base.py +17 -17
  24. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/primitive/integer/signed.py +37 -37
  25. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/primitive/integer/unsigned.py +37 -37
  26. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/dtype/primitive/string.py +14 -14
  27. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/override/__init__.py +41 -41
  28. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/override/base.py +22 -22
  29. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/override/primitive.py +158 -158
  30. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/profile/__init__.py +39 -39
  31. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/profile/base.py +50 -50
  32. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/profile/primitive.py +166 -166
  33. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/profiler.py +170 -169
  34. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/schema.py +44 -33
  35. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/core/table.py +29 -29
  36. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/tui/__init__.py +17 -17
  37. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/tui/app.py +852 -747
  38. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/tui/app.tcss +261 -220
  39. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/tui/compatibility.py +38 -38
  40. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/tui/dto.py +44 -44
  41. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/tui/service.py +215 -213
  42. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/utils.py +16 -5
  43. {dtypeflow-1.0.0 → dtypeflow-1.1.0}/src/dtypeflow/py.typed +0 -0
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Pedro José Mora Gallegos
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pedro José Mora Gallegos
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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dtypeflow
3
- Version: 1.0.0
3
+ Version: 1.1.0
4
4
  Summary: Terminal UI to infer CSV column dtypes and convert CSV to Parquet, locally.
5
5
  Keywords: csv,parquet,dtype,tui,textual,arrow
6
6
  Author: Pedro José Mora Gallegos
@@ -23,71 +23,95 @@ Project-URL: Repository, https://github.com/pedrojosemoragallegos/dtypeflow
23
23
  Project-URL: Issues, https://github.com/pedrojosemoragallegos/dtypeflow/issues
24
24
  Description-Content-Type: text/markdown
25
25
 
26
- # dtypeflow
27
-
28
- `dtypeflow` is a terminal UI to convert a CSV file to Parquet.
29
-
30
- Point it at a CSV file, and for each column it infers the tightest-fitting
31
- dtype (`Boolean`, unsigned/signed integers `UInt8`…`UInt64`/`Int8`…`Int64`,
32
- floats `Float16`/`Float32`/`Float64`, `String`, or `Dictionary`), shows the
33
- observed statistics, and lets you review or override the choice before
34
- writing the result to Parquet — all locally, no data leaves your machine.
35
-
36
- ## Installation
37
-
38
- ```bash
39
- uv tool install dtypeflow
40
- ```
41
-
42
- Or with `pipx`:
43
-
44
- ```bash
45
- pipx install dtypeflow
46
- ```
47
-
48
- Or with `pip`:
49
-
50
- ```bash
51
- pip install dtypeflow
52
- ```
53
-
54
- ## Usage
55
-
56
- Launch the picker and choose a CSV file interactively:
57
-
58
- ```bash
59
- dtypeflow
60
- ```
61
-
62
- Or pass a path directly to skip straight to configuring column types:
63
-
64
- ```bash
65
- dtypeflow path/to/data.csv
66
- ```
67
-
68
- The workflow has three steps:
69
-
70
- 1. **Pick a file** — enter or browse for a CSV path.
71
- 2. **Configure types** — for each column, review the recommended dtype, its
72
- stats (unique values, samples, range/precision/scale), and pick from
73
- compatible alternatives grouped by safety (Safe / Too small / Discouraged).
74
- 3. **Export** — write the configured dataset to a Parquet file.
75
-
76
- ## Development
77
-
78
- This project uses [uv](https://docs.astral.sh/uv/) for dependency management.
79
-
80
- ```bash
81
- uv sync
82
- uv run dtypeflow
83
- ```
84
-
85
- Lint:
86
-
87
- ```bash
88
- uv run --with ruff ruff check src/
89
- ```
90
-
91
- ## License
92
-
93
- [MIT](LICENSE)
26
+ # dtypeflow
27
+
28
+ [![PyPI version](https://img.shields.io/pypi/v/dtypeflow)](https://pypi.org/project/dtypeflow/)
29
+ [![Python Versions](https://img.shields.io/pypi/pyversions/dtypeflow)](https://pypi.org/project/dtypeflow/)
30
+ [![Downloads](https://pepy.tech/badge/dtypeflow)](https://pepy.tech/project/dtypeflow)
31
+ [![Wheel](https://img.shields.io/pypi/wheel/dtypeflow)](https://pypi.org/project/dtypeflow/)
32
+
33
+ `dtypeflow` is a terminal UI to convert a CSV file to Parquet.
34
+
35
+ Point it at a CSV file, and for each column it infers the tightest-fitting
36
+ dtype (`Boolean`, unsigned/signed integers `UInt8`…`UInt64`/`Int8`…`Int64`,
37
+ floats `Float16`/`Float32`/`Float64`, `String`, or `Dictionary`), shows the
38
+ observed statistics, and lets you review or override the choice before
39
+ writing the result to Parquet — all locally, no data leaves your machine.
40
+
41
+ ## Installation
42
+
43
+ ```bash
44
+ uv tool install dtypeflow
45
+ ```
46
+
47
+ Or with `pipx`:
48
+
49
+ ```bash
50
+ pipx install dtypeflow
51
+ ```
52
+
53
+ Or with `pip`:
54
+
55
+ ```bash
56
+ pip install dtypeflow
57
+ ```
58
+
59
+ ## Usage
60
+
61
+ Launch the picker and choose a CSV file interactively:
62
+
63
+ ```bash
64
+ dtypeflow
65
+ ```
66
+
67
+ Or pass a path directly to skip straight to configuring column types:
68
+
69
+ ```bash
70
+ dtypeflow path/to/data.csv
71
+ ```
72
+
73
+ The workflow has three steps:
74
+
75
+ 1. **Pick a file** — enter or browse for a CSV path. The delimiter is
76
+ auto-detected from the first 64 KiB; you can also pick comma, semicolon,
77
+ tab, pipe, or a custom single character.
78
+ 2. **Configure types** — for each column, review the recommended dtype, its
79
+ stats (unique values, samples, range/precision/scale), and pick from
80
+ compatible alternatives grouped by safety (Safe / Too small / Discouraged).
81
+ 3. **Export** — write the configured dataset to a Parquet file.
82
+
83
+ ### Screenshots
84
+
85
+ Alternatives for a column are grouped by how safe they are to apply:
86
+
87
+ <table>
88
+ <tr>
89
+ <td align="center"><b>Safe</b></td>
90
+ <td align="center"><b>Too small</b></td>
91
+ <td align="center"><b>Discouraged</b></td>
92
+ </tr>
93
+ <tr>
94
+ <td><img src="screenshots/26_warehouse_stock_safe.svg" alt="Safe dtype options for warehouse_stock" width="280"></td>
95
+ <td><img src="screenshots/26_warehouse_stock_too_small.svg" alt="Too small dtype options for warehouse_stock" width="280"></td>
96
+ <td><img src="screenshots/26_warehouse_stock_discouraged.svg" alt="Discouraged dtype options for warehouse_stock" width="280"></td>
97
+ </tr>
98
+ </table>
99
+
100
+ ## Development
101
+
102
+ This project uses [uv](https://docs.astral.sh/uv/) for dependency management.
103
+
104
+ ```bash
105
+ uv sync
106
+ uv run dtypeflow
107
+ ```
108
+
109
+ Lint:
110
+
111
+ ```bash
112
+ uv run --with ruff ruff check src/
113
+ ```
114
+
115
+ ## License
116
+
117
+ [MIT](LICENSE)
@@ -1,68 +1,92 @@
1
- # dtypeflow
2
-
3
- `dtypeflow` is a terminal UI to convert a CSV file to Parquet.
4
-
5
- Point it at a CSV file, and for each column it infers the tightest-fitting
6
- dtype (`Boolean`, unsigned/signed integers `UInt8`…`UInt64`/`Int8`…`Int64`,
7
- floats `Float16`/`Float32`/`Float64`, `String`, or `Dictionary`), shows the
8
- observed statistics, and lets you review or override the choice before
9
- writing the result to Parquet — all locally, no data leaves your machine.
10
-
11
- ## Installation
12
-
13
- ```bash
14
- uv tool install dtypeflow
15
- ```
16
-
17
- Or with `pipx`:
18
-
19
- ```bash
20
- pipx install dtypeflow
21
- ```
22
-
23
- Or with `pip`:
24
-
25
- ```bash
26
- pip install dtypeflow
27
- ```
28
-
29
- ## Usage
30
-
31
- Launch the picker and choose a CSV file interactively:
32
-
33
- ```bash
34
- dtypeflow
35
- ```
36
-
37
- Or pass a path directly to skip straight to configuring column types:
38
-
39
- ```bash
40
- dtypeflow path/to/data.csv
41
- ```
42
-
43
- The workflow has three steps:
44
-
45
- 1. **Pick a file** — enter or browse for a CSV path.
46
- 2. **Configure types** — for each column, review the recommended dtype, its
47
- stats (unique values, samples, range/precision/scale), and pick from
48
- compatible alternatives grouped by safety (Safe / Too small / Discouraged).
49
- 3. **Export** — write the configured dataset to a Parquet file.
50
-
51
- ## Development
52
-
53
- This project uses [uv](https://docs.astral.sh/uv/) for dependency management.
54
-
55
- ```bash
56
- uv sync
57
- uv run dtypeflow
58
- ```
59
-
60
- Lint:
61
-
62
- ```bash
63
- uv run --with ruff ruff check src/
64
- ```
65
-
66
- ## License
67
-
68
- [MIT](LICENSE)
1
+ # dtypeflow
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/dtypeflow)](https://pypi.org/project/dtypeflow/)
4
+ [![Python Versions](https://img.shields.io/pypi/pyversions/dtypeflow)](https://pypi.org/project/dtypeflow/)
5
+ [![Downloads](https://pepy.tech/badge/dtypeflow)](https://pepy.tech/project/dtypeflow)
6
+ [![Wheel](https://img.shields.io/pypi/wheel/dtypeflow)](https://pypi.org/project/dtypeflow/)
7
+
8
+ `dtypeflow` is a terminal UI to convert a CSV file to Parquet.
9
+
10
+ Point it at a CSV file, and for each column it infers the tightest-fitting
11
+ dtype (`Boolean`, unsigned/signed integers `UInt8`…`UInt64`/`Int8`…`Int64`,
12
+ floats `Float16`/`Float32`/`Float64`, `String`, or `Dictionary`), shows the
13
+ observed statistics, and lets you review or override the choice before
14
+ writing the result to Parquet — all locally, no data leaves your machine.
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ uv tool install dtypeflow
20
+ ```
21
+
22
+ Or with `pipx`:
23
+
24
+ ```bash
25
+ pipx install dtypeflow
26
+ ```
27
+
28
+ Or with `pip`:
29
+
30
+ ```bash
31
+ pip install dtypeflow
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ Launch the picker and choose a CSV file interactively:
37
+
38
+ ```bash
39
+ dtypeflow
40
+ ```
41
+
42
+ Or pass a path directly to skip straight to configuring column types:
43
+
44
+ ```bash
45
+ dtypeflow path/to/data.csv
46
+ ```
47
+
48
+ The workflow has three steps:
49
+
50
+ 1. **Pick a file** — enter or browse for a CSV path. The delimiter is
51
+ auto-detected from the first 64 KiB; you can also pick comma, semicolon,
52
+ tab, pipe, or a custom single character.
53
+ 2. **Configure types** — for each column, review the recommended dtype, its
54
+ stats (unique values, samples, range/precision/scale), and pick from
55
+ compatible alternatives grouped by safety (Safe / Too small / Discouraged).
56
+ 3. **Export** — write the configured dataset to a Parquet file.
57
+
58
+ ### Screenshots
59
+
60
+ Alternatives for a column are grouped by how safe they are to apply:
61
+
62
+ <table>
63
+ <tr>
64
+ <td align="center"><b>Safe</b></td>
65
+ <td align="center"><b>Too small</b></td>
66
+ <td align="center"><b>Discouraged</b></td>
67
+ </tr>
68
+ <tr>
69
+ <td><img src="screenshots/26_warehouse_stock_safe.svg" alt="Safe dtype options for warehouse_stock" width="280"></td>
70
+ <td><img src="screenshots/26_warehouse_stock_too_small.svg" alt="Too small dtype options for warehouse_stock" width="280"></td>
71
+ <td><img src="screenshots/26_warehouse_stock_discouraged.svg" alt="Discouraged dtype options for warehouse_stock" width="280"></td>
72
+ </tr>
73
+ </table>
74
+
75
+ ## Development
76
+
77
+ This project uses [uv](https://docs.astral.sh/uv/) for dependency management.
78
+
79
+ ```bash
80
+ uv sync
81
+ uv run dtypeflow
82
+ ```
83
+
84
+ Lint:
85
+
86
+ ```bash
87
+ uv run --with ruff ruff check src/
88
+ ```
89
+
90
+ ## License
91
+
92
+ [MIT](LICENSE)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dtypeflow"
3
- version = "1.0.0"
3
+ version = "1.1.0"
4
4
  description = "Terminal UI to infer CSV column dtypes and convert CSV to Parquet, locally."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dtypeflow"
3
- version = "1.0.0"
3
+ version = "1.1.0"
4
4
  description = "Terminal UI to infer CSV column dtypes and convert CSV to Parquet, locally."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -1,5 +1,5 @@
1
- from __future__ import annotations
2
-
3
- from dtypeflow.core.profiler import profile
4
-
5
- __all__: list[str] = ["profile"]
1
+ from __future__ import annotations
2
+
3
+ from dtypeflow.core.profiler import profile
4
+
5
+ __all__: list[str] = ["profile"]
@@ -1 +1 @@
1
- from __future__ import annotations
1
+ from __future__ import annotations
@@ -1,40 +1,40 @@
1
- from __future__ import annotations
2
-
3
- from .base import Candidate, Compatibility
4
- from .factory import candidate_factory
5
- from .primitive import (
6
- Boolean as BooleanCandidate,
7
- Dictionary as DictionaryCandidate,
8
- Float16 as Float16Candidate,
9
- Float32 as Float32Candidate,
10
- Float64 as Float64Candidate,
11
- Int8 as Int8Candidate,
12
- Int16 as Int16Candidate,
13
- Int32 as Int32Candidate,
14
- Int64 as Int64Candidate,
15
- String as StringCandidate,
16
- UInt8 as UInt8Candidate,
17
- UInt16 as UInt16Candidate,
18
- UInt32 as UInt32Candidate,
19
- UInt64 as UInt64Candidate,
20
- )
21
-
22
- __all__: list[str] = [
23
- "BooleanCandidate",
24
- "Candidate",
25
- "Compatibility",
26
- "DictionaryCandidate",
27
- "Float16Candidate",
28
- "Float32Candidate",
29
- "Float64Candidate",
30
- "Int8Candidate",
31
- "Int16Candidate",
32
- "Int32Candidate",
33
- "Int64Candidate",
34
- "StringCandidate",
35
- "UInt8Candidate",
36
- "UInt16Candidate",
37
- "UInt32Candidate",
38
- "UInt64Candidate",
39
- "candidate_factory",
40
- ]
1
+ from __future__ import annotations
2
+
3
+ from .base import Candidate, Compatibility
4
+ from .factory import candidate_factory
5
+ from .primitive import (
6
+ Boolean as BooleanCandidate,
7
+ Dictionary as DictionaryCandidate,
8
+ Float16 as Float16Candidate,
9
+ Float32 as Float32Candidate,
10
+ Float64 as Float64Candidate,
11
+ Int8 as Int8Candidate,
12
+ Int16 as Int16Candidate,
13
+ Int32 as Int32Candidate,
14
+ Int64 as Int64Candidate,
15
+ String as StringCandidate,
16
+ UInt8 as UInt8Candidate,
17
+ UInt16 as UInt16Candidate,
18
+ UInt32 as UInt32Candidate,
19
+ UInt64 as UInt64Candidate,
20
+ )
21
+
22
+ __all__: list[str] = [
23
+ "BooleanCandidate",
24
+ "Candidate",
25
+ "Compatibility",
26
+ "DictionaryCandidate",
27
+ "Float16Candidate",
28
+ "Float32Candidate",
29
+ "Float64Candidate",
30
+ "Int8Candidate",
31
+ "Int16Candidate",
32
+ "Int32Candidate",
33
+ "Int64Candidate",
34
+ "StringCandidate",
35
+ "UInt8Candidate",
36
+ "UInt16Candidate",
37
+ "UInt32Candidate",
38
+ "UInt64Candidate",
39
+ "candidate_factory",
40
+ ]
@@ -1,37 +1,37 @@
1
- from __future__ import annotations
2
-
3
- from abc import ABC
4
- from enum import Enum, auto
5
- from typing import TYPE_CHECKING, ClassVar
6
-
7
- if TYPE_CHECKING:
8
- from dtypeflow.core.dtype import Dtype
9
-
10
-
11
- class Compatibility(Enum):
12
- FULL_RANGE_FIT = auto()
13
- VALUES_PRESERVED = auto()
14
- VALUES_NO_FIT = auto()
15
- RANGE_NO_FIT = auto()
16
- UNEVALUATED_NO_FIT = auto()
17
- NOT_NUMERIC = auto()
18
- OBSERVED_ONLY_FIT = auto()
19
- DECIMAL_TRUNCATION = auto()
20
- PRECISION_REDUCTION = auto()
21
- BOOLEAN_MAPPING = auto()
22
- DICTIONARY_ENCODING = auto()
23
- DICTIONARY_INEFFICIENT = auto()
24
-
25
-
26
- class Candidate(ABC):
27
- DTYPE: ClassVar[type[Dtype]]
28
-
29
- def __init__(self, compatibility: Compatibility, /) -> None:
30
- self._compatibility: Compatibility = compatibility
31
-
32
- @property
33
- def compatibility(self) -> Compatibility:
34
- return self._compatibility
35
-
36
- def __repr__(self) -> str:
37
- return f"{type(self).__name__}(compatibility={self._compatibility.name})"
1
+ from __future__ import annotations
2
+
3
+ from abc import ABC
4
+ from enum import Enum, auto
5
+ from typing import TYPE_CHECKING, ClassVar
6
+
7
+ if TYPE_CHECKING:
8
+ from dtypeflow.core.dtype import Dtype
9
+
10
+
11
+ class Compatibility(Enum):
12
+ FULL_RANGE_FIT = auto()
13
+ VALUES_PRESERVED = auto()
14
+ VALUES_NO_FIT = auto()
15
+ RANGE_NO_FIT = auto()
16
+ UNEVALUATED_NO_FIT = auto()
17
+ NOT_NUMERIC = auto()
18
+ OBSERVED_ONLY_FIT = auto()
19
+ DECIMAL_TRUNCATION = auto()
20
+ PRECISION_REDUCTION = auto()
21
+ BOOLEAN_MAPPING = auto()
22
+ DICTIONARY_ENCODING = auto()
23
+ DICTIONARY_INEFFICIENT = auto()
24
+
25
+
26
+ class Candidate(ABC):
27
+ DTYPE: ClassVar[type[Dtype]]
28
+
29
+ def __init__(self, compatibility: Compatibility, /) -> None:
30
+ self._compatibility: Compatibility = compatibility
31
+
32
+ @property
33
+ def compatibility(self) -> Compatibility:
34
+ return self._compatibility
35
+
36
+ def __repr__(self) -> str:
37
+ return f"{type(self).__name__}(compatibility={self._compatibility.name})"