tabalyst 0.1.1__tar.gz → 0.2.1__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 (47) hide show
  1. tabalyst-0.2.1/PKG-INFO +265 -0
  2. tabalyst-0.2.1/README.md +231 -0
  3. {tabalyst-0.1.1 → tabalyst-0.2.1}/examples/README.md +2 -2
  4. {tabalyst-0.1.1 → tabalyst-0.2.1}/pyproject.toml +2 -2
  5. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst/__init__.py +2 -0
  6. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst/analysis.py +102 -5
  7. tabalyst-0.2.1/src/tabalyst/cli/__init__.py +5 -0
  8. tabalyst-0.2.1/src/tabalyst/cli/app.py +44 -0
  9. tabalyst-0.2.1/src/tabalyst/cli/report.py +189 -0
  10. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst/models.py +38 -1
  11. tabalyst-0.2.1/src/tabalyst/progress.py +48 -0
  12. tabalyst-0.2.1/src/tabalyst/report_service.py +244 -0
  13. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst/reporting.py +21 -2
  14. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst/service.py +73 -25
  15. tabalyst-0.2.1/src/tabalyst/static/report.js +442 -0
  16. tabalyst-0.2.1/src/tabalyst/static/theme.css +484 -0
  17. tabalyst-0.2.1/src/tabalyst/templates/report.html +83 -0
  18. tabalyst-0.2.1/src/tabalyst.egg-info/PKG-INFO +265 -0
  19. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst.egg-info/SOURCES.txt +5 -1
  20. {tabalyst-0.1.1 → tabalyst-0.2.1}/tests/test_analysis.py +21 -1
  21. tabalyst-0.2.1/tests/test_cli.py +430 -0
  22. {tabalyst-0.1.1 → tabalyst-0.2.1}/tests/test_public_api.py +76 -12
  23. {tabalyst-0.1.1 → tabalyst-0.2.1}/tests/test_reporting.py +30 -20
  24. tabalyst-0.1.1/PKG-INFO +0 -210
  25. tabalyst-0.1.1/README.md +0 -176
  26. tabalyst-0.1.1/src/tabalyst/cli.py +0 -208
  27. tabalyst-0.1.1/src/tabalyst/static/report.js +0 -502
  28. tabalyst-0.1.1/src/tabalyst/static/theme.css +0 -427
  29. tabalyst-0.1.1/src/tabalyst/templates/report.html +0 -370
  30. tabalyst-0.1.1/src/tabalyst.egg-info/PKG-INFO +0 -210
  31. tabalyst-0.1.1/tests/test_cli.py +0 -258
  32. {tabalyst-0.1.1 → tabalyst-0.2.1}/LICENSE +0 -0
  33. {tabalyst-0.1.1 → tabalyst-0.2.1}/MANIFEST.in +0 -0
  34. {tabalyst-0.1.1 → tabalyst-0.2.1}/examples/config.json +0 -0
  35. {tabalyst-0.1.1 → tabalyst-0.2.1}/examples/input/basic.csv +0 -0
  36. {tabalyst-0.1.1 → tabalyst-0.2.1}/examples/input/insurance-customers.csv +0 -0
  37. {tabalyst-0.1.1 → tabalyst-0.2.1}/setup.cfg +0 -0
  38. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst/__main__.py +0 -0
  39. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst/_version.py +0 -0
  40. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst/config.py +0 -0
  41. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst/errors.py +0 -0
  42. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst/execution_log.py +0 -0
  43. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst/ingestion.py +0 -0
  44. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst.egg-info/dependency_links.txt +0 -0
  45. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst.egg-info/entry_points.txt +0 -0
  46. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst.egg-info/requires.txt +0 -0
  47. {tabalyst-0.1.1 → tabalyst-0.2.1}/src/tabalyst.egg-info/top_level.txt +0 -0
@@ -0,0 +1,265 @@
1
+ Metadata-Version: 2.4
2
+ Name: tabalyst
3
+ Version: 0.2.1
4
+ Summary: Open-source toolkit for understanding and working with unfamiliar data.
5
+ Author: Gregory Borelli
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/loribel-labs/tabalyst
8
+ Project-URL: Repository, https://github.com/loribel-labs/tabalyst.git
9
+ Project-URL: Issues, https://github.com/loribel-labs/tabalyst/issues
10
+ Keywords: csv,data-analysis,data-profiling,data-quality,eda,html-report,json
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: jinja2>=3.1
25
+ Requires-Dist: pandas>=2.2
26
+ Requires-Dist: pydantic>=2.10
27
+ Requires-Dist: typer>=0.12
28
+ Provides-Extra: dev
29
+ Requires-Dist: build>=1.2; extra == "dev"
30
+ Requires-Dist: pytest>=8; extra == "dev"
31
+ Requires-Dist: pytest-cov>=6; extra == "dev"
32
+ Requires-Dist: ruff>=0.11; extra == "dev"
33
+ Dynamic: license-file
34
+
35
+ # Tabalyst
36
+
37
+ **Tools for unfamiliar data.**
38
+
39
+ Tabalyst is an open-source, local-first toolkit for understanding and working
40
+ with structured data.
41
+
42
+ Its first tool is **Tabalyst Report**. The current CSV implementation,
43
+ **Tabalyst CSV Report**, analyzes a CSV file and produces both a structured JSON
44
+ profile and a self-contained interactive HTML report.
45
+
46
+ Tabalyst is in active alpha development. Its interfaces may still change while
47
+ the shared toolkit architecture is being established.
48
+
49
+ ## Install
50
+
51
+ Tabalyst supports Python 3.11, 3.12, 3.13, and 3.14.
52
+
53
+ ```console
54
+ pip install tabalyst
55
+ ```
56
+
57
+ ## Tabalyst Report
58
+
59
+ | Use case | Command | Destination |
60
+ | --- | --- | --- |
61
+ | One file, automatic name | `tabalyst report data.csv` | `data.html` beside the source |
62
+ | One file, custom name | `tabalyst report data.csv -o report.html` | The file `report.html` |
63
+ | Several files, automatic names | `tabalyst report *.csv` | Beside each source |
64
+ | Several files, one directory | `tabalyst report *.csv -d reports/` | The directory `reports/` |
65
+
66
+ The simplest command keeps the source filename:
67
+
68
+ ```console
69
+ tabalyst report customers.csv
70
+ ```
71
+
72
+ It creates these files beside the source:
73
+
74
+ ```text
75
+ customers.csv
76
+ customers.html
77
+ customers.json
78
+ executions.json
79
+ ```
80
+
81
+ Use `-o` to choose a different HTML filename for one source:
82
+
83
+ ```console
84
+ tabalyst report customers.csv -o customer-analysis.html
85
+ ```
86
+
87
+ ### Multiple files
88
+
89
+ Report several CSV files at once:
90
+
91
+ ```console
92
+ tabalyst report *.csv
93
+ ```
94
+
95
+ Each report is created beside its source and keeps the source stem:
96
+
97
+ ```text
98
+ customers.csv → customers.html
99
+ orders.csv → orders.html
100
+ products.csv → products.html
101
+ ```
102
+
103
+ Use `-d` to place all reports in one directory:
104
+
105
+ ```console
106
+ tabalyst report *.csv -d reports/
107
+ ```
108
+
109
+ This produces:
110
+
111
+ ```text
112
+ reports/
113
+ ├── customers.html
114
+ ├── customers.json
115
+ ├── orders.html
116
+ ├── orders.json
117
+ ├── products.html
118
+ ├── products.json
119
+ └── executions.json
120
+ ```
121
+
122
+ Both `-d reports/` and `-d reports` are accepted. Quotes are only needed when a
123
+ path contains spaces.
124
+
125
+ `-o` always names one output file and therefore accepts only one input. `-d`
126
+ always names an output directory and accepts one or many inputs.
127
+
128
+ This is invalid because several inputs cannot share one output file:
129
+
130
+ ```console
131
+ tabalyst report *.csv -o report.html
132
+ ```
133
+
134
+ Tabalyst rejects the command before processing any file. Use `-d reports/`
135
+ instead.
136
+
137
+ ### Safe batch behavior
138
+
139
+ Before processing begins, Tabalyst resolves every input and planned output. It
140
+ stops the entire batch if output names collide or if an output already exists.
141
+ Use `--force` only when replacing all matching report artifacts is intentional:
142
+
143
+ ```console
144
+ tabalyst report *.csv -d reports/ --force
145
+ ```
146
+
147
+ If one CSV is malformed during analysis, Tabalyst reports that error, continues
148
+ with the remaining files, and returns a non-zero exit code at the end.
149
+
150
+ Interactive terminals show accurate file and phase progress:
151
+
152
+ ```text
153
+ [2/8] orders.csv - Analyzing
154
+ ```
155
+
156
+ Progress and diagnostics use standard error. Progress is disabled automatically
157
+ outside a terminal and can be disabled explicitly with `--no-progress` or
158
+ `--quiet`.
159
+
160
+ ### Useful options
161
+
162
+ ```console
163
+ tabalyst report data.csv --delimiter ";"
164
+ tabalyst report data.csv --encoding cp1252
165
+ tabalyst report data.csv --config tabalyst.json
166
+ tabalyst report data.csv --verbose
167
+ tabalyst report --help
168
+ tabalyst --version
169
+ ```
170
+
171
+ `python -m tabalyst` accepts the same commands.
172
+
173
+ ## What the report analyzes
174
+
175
+ - Dataset dimensions, missing cells, duplicates, and quality observations.
176
+ - Physical and semantic types with confidence and error rates.
177
+ - Numeric, date, string-length, normalization, and value distributions.
178
+ - Distinct values, representative examples, enum candidates, and date formats.
179
+ - CSV record widths, quoting, encoding, and delimiter configuration.
180
+ - A bounded raw-data preview while every record is analyzed.
181
+
182
+ The HTML report is self-contained and works without a CDN or network connection.
183
+ The JSON profile contains the same canonical analysis result for scripts and
184
+ future Tabalyst tools.
185
+
186
+ ## Python API
187
+
188
+ The same operations are available without the CLI:
189
+
190
+ ```python
191
+ import tabalyst
192
+
193
+ result = tabalyst.analyze(
194
+ "customers.csv",
195
+ "customers.html",
196
+ separator=";",
197
+ )
198
+
199
+ batch = tabalyst.generate_reports(
200
+ ["*.csv"],
201
+ output_dir="reports",
202
+ )
203
+ ```
204
+
205
+ `analyze()` returns the JSON-serializable profile for one report.
206
+ `generate_reports()` returns the complete batch plan, successes, and failures.
207
+ Expected failures derive from `tabalyst.TabalystError`.
208
+
209
+ Existing artifacts are never replaced silently. Pass `force=True` when
210
+ replacement is intentional.
211
+
212
+ ## Configuration
213
+
214
+ Configuration files are strict JSON. A minimal file is:
215
+
216
+ ```json
217
+ {
218
+ "csv": {
219
+ "delimiter": ";",
220
+ "encoding": "cp1252"
221
+ }
222
+ }
223
+ ```
224
+
225
+ Explicit CLI or Python arguments override the configuration file, which overrides
226
+ Tabalyst defaults. See the
227
+ [configuration reference](https://github.com/loribel-labs/tabalyst/blob/main/docs/configuration.md)
228
+ for all analysis settings.
229
+
230
+ ## Local-first behavior and current limits
231
+
232
+ Tabalyst performs analysis locally and adds no telemetry or remote processing.
233
+ Generated JSON and HTML may contain source values and should be shared
234
+ accordingly.
235
+
236
+ The complete CSV is currently loaded into memory. File and phase progress is
237
+ available now; row percentages, throughput estimates, recursive directory input,
238
+ and parallel batch execution will require later ingestion work.
239
+
240
+ ## Examples and development
241
+
242
+ The repository includes small and synthetic public examples under `examples/`.
243
+ See the [examples README](https://github.com/loribel-labs/tabalyst/blob/main/examples/README.md)
244
+ for regeneration commands.
245
+
246
+ ```console
247
+ python -m pytest
248
+ python -m ruff check .
249
+ python -m build
250
+ ```
251
+
252
+ Additional documentation:
253
+
254
+ - [Architecture](https://github.com/loribel-labs/tabalyst/blob/main/docs/architecture.md)
255
+ - [Configuration](https://github.com/loribel-labs/tabalyst/blob/main/docs/configuration.md)
256
+ - [Release procedure](https://github.com/loribel-labs/tabalyst/blob/main/RELEASING.md)
257
+
258
+ Please report defects and feature requests through the
259
+ [GitHub issue tracker](https://github.com/loribel-labs/tabalyst/issues).
260
+
261
+ ## License
262
+
263
+ Tabalyst is released under the [MIT License](LICENSE).
264
+
265
+ Created by Gregory Borelli — Catalyseur Numérique.
@@ -0,0 +1,231 @@
1
+ # Tabalyst
2
+
3
+ **Tools for unfamiliar data.**
4
+
5
+ Tabalyst is an open-source, local-first toolkit for understanding and working
6
+ with structured data.
7
+
8
+ Its first tool is **Tabalyst Report**. The current CSV implementation,
9
+ **Tabalyst CSV Report**, analyzes a CSV file and produces both a structured JSON
10
+ profile and a self-contained interactive HTML report.
11
+
12
+ Tabalyst is in active alpha development. Its interfaces may still change while
13
+ the shared toolkit architecture is being established.
14
+
15
+ ## Install
16
+
17
+ Tabalyst supports Python 3.11, 3.12, 3.13, and 3.14.
18
+
19
+ ```console
20
+ pip install tabalyst
21
+ ```
22
+
23
+ ## Tabalyst Report
24
+
25
+ | Use case | Command | Destination |
26
+ | --- | --- | --- |
27
+ | One file, automatic name | `tabalyst report data.csv` | `data.html` beside the source |
28
+ | One file, custom name | `tabalyst report data.csv -o report.html` | The file `report.html` |
29
+ | Several files, automatic names | `tabalyst report *.csv` | Beside each source |
30
+ | Several files, one directory | `tabalyst report *.csv -d reports/` | The directory `reports/` |
31
+
32
+ The simplest command keeps the source filename:
33
+
34
+ ```console
35
+ tabalyst report customers.csv
36
+ ```
37
+
38
+ It creates these files beside the source:
39
+
40
+ ```text
41
+ customers.csv
42
+ customers.html
43
+ customers.json
44
+ executions.json
45
+ ```
46
+
47
+ Use `-o` to choose a different HTML filename for one source:
48
+
49
+ ```console
50
+ tabalyst report customers.csv -o customer-analysis.html
51
+ ```
52
+
53
+ ### Multiple files
54
+
55
+ Report several CSV files at once:
56
+
57
+ ```console
58
+ tabalyst report *.csv
59
+ ```
60
+
61
+ Each report is created beside its source and keeps the source stem:
62
+
63
+ ```text
64
+ customers.csv → customers.html
65
+ orders.csv → orders.html
66
+ products.csv → products.html
67
+ ```
68
+
69
+ Use `-d` to place all reports in one directory:
70
+
71
+ ```console
72
+ tabalyst report *.csv -d reports/
73
+ ```
74
+
75
+ This produces:
76
+
77
+ ```text
78
+ reports/
79
+ ├── customers.html
80
+ ├── customers.json
81
+ ├── orders.html
82
+ ├── orders.json
83
+ ├── products.html
84
+ ├── products.json
85
+ └── executions.json
86
+ ```
87
+
88
+ Both `-d reports/` and `-d reports` are accepted. Quotes are only needed when a
89
+ path contains spaces.
90
+
91
+ `-o` always names one output file and therefore accepts only one input. `-d`
92
+ always names an output directory and accepts one or many inputs.
93
+
94
+ This is invalid because several inputs cannot share one output file:
95
+
96
+ ```console
97
+ tabalyst report *.csv -o report.html
98
+ ```
99
+
100
+ Tabalyst rejects the command before processing any file. Use `-d reports/`
101
+ instead.
102
+
103
+ ### Safe batch behavior
104
+
105
+ Before processing begins, Tabalyst resolves every input and planned output. It
106
+ stops the entire batch if output names collide or if an output already exists.
107
+ Use `--force` only when replacing all matching report artifacts is intentional:
108
+
109
+ ```console
110
+ tabalyst report *.csv -d reports/ --force
111
+ ```
112
+
113
+ If one CSV is malformed during analysis, Tabalyst reports that error, continues
114
+ with the remaining files, and returns a non-zero exit code at the end.
115
+
116
+ Interactive terminals show accurate file and phase progress:
117
+
118
+ ```text
119
+ [2/8] orders.csv - Analyzing
120
+ ```
121
+
122
+ Progress and diagnostics use standard error. Progress is disabled automatically
123
+ outside a terminal and can be disabled explicitly with `--no-progress` or
124
+ `--quiet`.
125
+
126
+ ### Useful options
127
+
128
+ ```console
129
+ tabalyst report data.csv --delimiter ";"
130
+ tabalyst report data.csv --encoding cp1252
131
+ tabalyst report data.csv --config tabalyst.json
132
+ tabalyst report data.csv --verbose
133
+ tabalyst report --help
134
+ tabalyst --version
135
+ ```
136
+
137
+ `python -m tabalyst` accepts the same commands.
138
+
139
+ ## What the report analyzes
140
+
141
+ - Dataset dimensions, missing cells, duplicates, and quality observations.
142
+ - Physical and semantic types with confidence and error rates.
143
+ - Numeric, date, string-length, normalization, and value distributions.
144
+ - Distinct values, representative examples, enum candidates, and date formats.
145
+ - CSV record widths, quoting, encoding, and delimiter configuration.
146
+ - A bounded raw-data preview while every record is analyzed.
147
+
148
+ The HTML report is self-contained and works without a CDN or network connection.
149
+ The JSON profile contains the same canonical analysis result for scripts and
150
+ future Tabalyst tools.
151
+
152
+ ## Python API
153
+
154
+ The same operations are available without the CLI:
155
+
156
+ ```python
157
+ import tabalyst
158
+
159
+ result = tabalyst.analyze(
160
+ "customers.csv",
161
+ "customers.html",
162
+ separator=";",
163
+ )
164
+
165
+ batch = tabalyst.generate_reports(
166
+ ["*.csv"],
167
+ output_dir="reports",
168
+ )
169
+ ```
170
+
171
+ `analyze()` returns the JSON-serializable profile for one report.
172
+ `generate_reports()` returns the complete batch plan, successes, and failures.
173
+ Expected failures derive from `tabalyst.TabalystError`.
174
+
175
+ Existing artifacts are never replaced silently. Pass `force=True` when
176
+ replacement is intentional.
177
+
178
+ ## Configuration
179
+
180
+ Configuration files are strict JSON. A minimal file is:
181
+
182
+ ```json
183
+ {
184
+ "csv": {
185
+ "delimiter": ";",
186
+ "encoding": "cp1252"
187
+ }
188
+ }
189
+ ```
190
+
191
+ Explicit CLI or Python arguments override the configuration file, which overrides
192
+ Tabalyst defaults. See the
193
+ [configuration reference](https://github.com/loribel-labs/tabalyst/blob/main/docs/configuration.md)
194
+ for all analysis settings.
195
+
196
+ ## Local-first behavior and current limits
197
+
198
+ Tabalyst performs analysis locally and adds no telemetry or remote processing.
199
+ Generated JSON and HTML may contain source values and should be shared
200
+ accordingly.
201
+
202
+ The complete CSV is currently loaded into memory. File and phase progress is
203
+ available now; row percentages, throughput estimates, recursive directory input,
204
+ and parallel batch execution will require later ingestion work.
205
+
206
+ ## Examples and development
207
+
208
+ The repository includes small and synthetic public examples under `examples/`.
209
+ See the [examples README](https://github.com/loribel-labs/tabalyst/blob/main/examples/README.md)
210
+ for regeneration commands.
211
+
212
+ ```console
213
+ python -m pytest
214
+ python -m ruff check .
215
+ python -m build
216
+ ```
217
+
218
+ Additional documentation:
219
+
220
+ - [Architecture](https://github.com/loribel-labs/tabalyst/blob/main/docs/architecture.md)
221
+ - [Configuration](https://github.com/loribel-labs/tabalyst/blob/main/docs/configuration.md)
222
+ - [Release procedure](https://github.com/loribel-labs/tabalyst/blob/main/RELEASING.md)
223
+
224
+ Please report defects and feature requests through the
225
+ [GitHub issue tracker](https://github.com/loribel-labs/tabalyst/issues).
226
+
227
+ ## License
228
+
229
+ Tabalyst is released under the [MIT License](LICENSE).
230
+
231
+ Created by Gregory Borelli — Catalyseur Numérique.
@@ -28,8 +28,8 @@ domains.
28
28
  From the repository root, regenerate both outputs with:
29
29
 
30
30
  ```console
31
- tabalyst examples/input/basic.csv examples/output/basic/report.html --config examples/config.json
32
- tabalyst examples/input/insurance-customers.csv examples/output/insurance-customers/report.html --config examples/config.json
31
+ tabalyst report examples/input/basic.csv -o examples/output/basic/report.html --config examples/config.json --force
32
+ tabalyst report examples/input/insurance-customers.csv -o examples/output/insurance-customers/report.html --config examples/config.json --force
33
33
  ```
34
34
 
35
35
  Every output folder is independent and contains its own HTML report, canonical
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tabalyst"
7
- version = "0.1.1"
8
- description = "Open-source data profiling engine for structured JSON and customizable HTML reports."
7
+ version = "0.2.1"
8
+ description = "Open-source toolkit for understanding and working with unfamiliar data."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
11
11
  license = "MIT"
@@ -4,6 +4,7 @@ from tabalyst._version import __version__
4
4
  from tabalyst.analysis import analyze_column as analyze_column
5
5
  from tabalyst.config import AnalysisConfig as AnalysisConfig
6
6
  from tabalyst.errors import ConfigurationError, InputError, ReportError, TabalystError
7
+ from tabalyst.report_service import generate_reports as generate_reports
7
8
  from tabalyst.reporting import render_report as render_report
8
9
  from tabalyst.service import analyze
9
10
  from tabalyst.service import analyze_csv as analyze_csv
@@ -15,6 +16,7 @@ __all__ = [
15
16
  "TabalystError",
16
17
  "__version__",
17
18
  "analyze",
19
+ "generate_reports",
18
20
  ]
19
21
 
20
22
  # Alpha compatibility imports remain available, but are not part of the 0.1.0 API.