Metadata-Version: 2.4
Name: mocksql
Version: 0.2.1
Summary: Generate, evaluate, and replay SQL unit tests locally with LLM-created fixtures and DuckDB.
License: MIT
Keywords: sql,testing,analytics,bigquery,duckdb,langgraph
Author: Adel Skhiri
Author-email: skhiriadel92@gmail.com
Requires-Python: >=3.11,<3.14
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Testing
Provides-Extra: all
Provides-Extra: bigquery
Provides-Extra: snowflake
Provides-Extra: trino
Requires-Dist: bcrypt (>=5.0.0,<6.0.0)
Requires-Dist: duckdb (>=1.5.4,<2.0.0)
Requires-Dist: fastapi (>=0.138.0,<1.0.0)
Requires-Dist: google-cloud-bigquery (>=3.42.0,<4.0.0) ; extra == "bigquery" or extra == "all"
Requires-Dist: langchain (>=1.3.10,<2.0.0)
Requires-Dist: langchain-classic (==1.0.8)
Requires-Dist: langchain-google-genai (>=4.2.5,<5.0.0)
Requires-Dist: langchain-openai (>=1.3.5,<2.0.0)
Requires-Dist: langgraph (>=1.2.6,<2.0.0)
Requires-Dist: pandas (>=3.0.3,<4.0.0)
Requires-Dist: pydantic (>=2.13.4,<3.0.0)
Requires-Dist: python-dotenv (>=1.2.2,<2.0.0)
Requires-Dist: pytz
Requires-Dist: pyyaml (>=6.0.3)
Requires-Dist: snowflake-connector-python (>=4.6.0,<5.0.0) ; extra == "snowflake" or extra == "all"
Requires-Dist: sqlglot[c] (>=30.11.0,<31.0.0)
Requires-Dist: trino (>=0.330,<0.331) ; extra == "trino" or extra == "all"
Requires-Dist: typer (>=0.26.7,<0.27.0)
Requires-Dist: uvicorn (>=0.49.0,<0.50.0)
Project-URL: Homepage, https://github.com/skadel/mocksql
Project-URL: Repository, https://github.com/skadel/mocksql
Description-Content-Type: text/markdown

# MockSQL

MockSQL generates SQL unit-test fixtures with an LLM, runs them locally on
DuckDB, evaluates their quality, and saves replayable tests for CI. Install the
CLI with `pip install mocksql`; install `mocksql[bigquery]`,
`mocksql[snowflake]`, or `mocksql[all]` when a source connector is needed.

Generated tests never execute against the source warehouse. See the
[project README](../README.md) for user setup and connector guidance.

## Development

> Pour l'installation, la configuration GCP et le CLI, voir le [README racine](../README.md).

**FastAPI · LangGraph · Python 3.12**

---


```bash
python -m venv .venv
source .venv/bin/activate   # Windows : .\.venv\Scripts\activate
pip install poetry && poetry install --all-extras

cp .env.example .env        # compléter les variables (voir README racine §3)
uvicorn server:app --port 8080 --reload
```

> Les connecteurs sources (BigQuery, Snowflake) sont des **extras** optionnels, exclus de l'install de base pour l'alléger. `poetry install` seul n'installe que le cœur (génération + DuckDB) ; ajoutez `--all-extras` (ou `--extras "bigquery snowflake"`) pour travailler sur le profiling/import.

---

## Commandes

```bash
make style    # ruff check + ruff format --check + vulture (code mort)
make format   # auto-format + auto-fix ruff
make test     # pytest
make check    # style + test
```

Type checking :

```bash
poetry run mypy build_query/ app/
```

---

## Packaging

```bash
poetry build --output dist
```

This produces the `mocksql` wheel and source distribution in `dist/`.

---

## License

MockSQL is released under the [MIT License](../LICENSE).

