Metadata-Version: 2.4
Name: rich_datatable
Version: 0.1.0
Summary: Core computation modules for scientith
Author: Your Name
License-Expression: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: pandas
Requires-Dist: loguru
Requires-Dist: pydantic
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: mypy; extra == "dev"

Rich DataTable (core)

Minimal, computation-only table library for:
- Loading CSV/Excel into a typed table
- Computing basic statistics
- Inferring column/table metadata
- Running data quality checks (QC) based on metadata

The public API is surfaced via `datatable_core` and is intentionally small.

Install (editable)
- `pip install -e /path/to/rich_datatable` (Python >= 3.8)

Public API (via datatable_core)
- `DataTable`: minimal in-memory table with lazy helpers
- `MetadataInferenceThresholds`: optional inference configuration
- `SeverityText`: QC severity levels (for interpreting results)

Quickstart
1) Load and infer from a CSV/Excel file
```python
from datatable_core import DataTable

dt = DataTable.load(
    "data.csv",
    table_name="my_table",
    sample_keys="id",  # set once here and reuse
)

df = dt.to_pandas()
meta = dt.get_metadata()
```

2) Adjust inference thresholds (optional)
```python
from datatable_core import DataTable, MetadataInferenceThresholds

thresholds = MetadataInferenceThresholds(
    null_threshold=0.05,
    unique_threshold=0.95,
    categorical_threshold=0.75,
    allowed_value_threshold=0.5,
    mad_factor=4.5,
)

dt = DataTable.load("data.xlsx", thresholds=thresholds, sheet_name="Sheet1")
```

3) Run QC (data quality checks)
```python
# Prefer the convenience method (sample_keys stored in DataTable)
results, summaries, cell_errors, column_errors = dt.run_qc()
```

Design notes
- No I/O/report styling/visualization (e.g., Styled Excel, Plotly) is included.
- `datatable_core` is the only recommended import path for consumers.
- Internals (stats/inference/low-level enums/models) are kept private unless needed.

Public surface (kept minimal)
- `DataTable` — load + access data/metadata, run QC
- `MetadataInferenceThresholds` — inference configuration
- `SeverityText` — interpret QC severities

Non-goals
- Styled outputs, report generation, plotting, or persistence APIs are out of scope.
