Metadata-Version: 2.5
Name: reducio
Version: 0.1.1
Summary: Semantic code compression engine
Project-URL: Repository, https://github.com/mementomorri/reducio
Project-URL: Documentation, https://github.com/mementomorri/reducio/blob/main/docs/README.md
Author: Alex Karsten
License: MIT
License-File: LICENSE
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.14
Requires-Dist: gitpython>=3.1.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: typer>=0.12.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: coverage[toml]>=7.10.6; extra == 'dev'
Requires-Dist: hatchling; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
Requires-Dist: pytest>=7.4.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Provides-Extra: embeddings
Requires-Dist: numpy>=1.26; extra == 'embeddings'
Requires-Dist: sentence-transformers>=2.2.0; extra == 'embeddings'
Provides-Extra: llm
Requires-Dist: httpx<1,>=0.28; extra == 'llm'
Provides-Extra: reports
Requires-Dist: plotly<8,>=6; extra == 'reports'
Description-Content-Type: text/markdown

# reducio

Optional model proposals: [API setup and migration](docs/LLM.md).

**Semantic code compression for Python codebases.**

Install, usage, and architecture: **[docs/README.md](docs/README.md)**
What's shipped vs planned: **[ROADMAP.md](ROADMAP.md)**

Start with the [GitHub CI setup guide](docs/GITHUB_CI.md) for reports and revision
comparisons. The other supported routes are PyPI and a GitHub Releases executable;
the distribution, CLI, and Python import are all **`reducio`**.
PyPI publication is configured and the maintainer has confirmed a successful upload.
Counting rules: [Metrics v2](docs/METRICS.md).
Upgrading after the reliability cleanup: [migration notes](docs/MIGRATION.md).
Application uses file snapshots and never commits changes. Tests are opt-in with
`--run-tests`; see [safety and runner setup](docs/SAFETY.md).

Requires **Python 3.14+**. Only **`.py`** files in the target repository are analyzed.

## Everyday workflow

reducio helps reviewers see where Python changes add or reduce complexity.
Use it primarily for **read-only code review**, with optional, manually reviewed
refactoring proposals—not as proof that code is correct.

1. **While coding:** run `reducio check .` for quality findings or
   `reducio analyze .` for complexity hotspots in current files.
2. **On a PR:** compare the branch's common ancestor with `main` against the PR
   head. This covers the whole PR, not just its last commit, measuring complete
   functions in changed Python files. Review the Actions summary or HTML artifact.
3. **After merging:** rebuild history on `main` to explore size, complexity trends
   and persistent hotspots. This repo publishes history to GitHub Pages and keeps
   the latest overview alongside it. PR reports stay in Actions artifacts.

To review your committed branch locally (`reducio[reports]` adds HTML charts):

```bash
git fetch origin main
reducio compare . --against origin/main --report --format all
# Include your current edits and nonignored untracked Python files:
reducio compare . --against origin/main --worktree --report --format all
# Explore up to 100 first-parent commits, rebuilt with today's metric engine:
reducio history . --report --format all
```

Use `--base HEAD~1` instead to inspect only the last commit, or `--base HEAD
--worktree` for uncommitted work only. reducio never fetches refs automatically.
Comparison ignores uncommitted edits unless `--worktree` is explicit. Add
`--fail-on new-hotspots` or `--fail-on regressions` to enforce an optional PR gate;
otherwise complexity increases remain informational.
Reports default to `.reducio/`; open the HTML directly in a browser, without a server.

Start with the [CI setup guide](docs/GITHUB_CI.md). For optional code changes,
preview with `reducio idiomatize . --dry-run` and review before applying with
`--run-tests`. Deduplication remains suggestion-only; it does not rewrite callers.

## License

[MIT](LICENSE) © 2026 Alex Karsten
