Skip to content

feat!: move cyclopts and rich behind a new optional [cli] extra - #187

Merged
SkyeAv merged 1 commit into
mainfrom
cli-extra
Sep 15, 2026
Merged

SkyeAv merged 1 commit into
mainfrom
cli-extra

Conversation

@SkyeAv

@SkyeAv SkyeAv commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Moves the Cyclopts/Rich command runtime out of the base Python API and into an opt-in [cli] extra, so library installs stay lean while the tablassert console command keeps its existing behavior.

Packaging

  • Base dependencies: removes cyclopts>=1.0.0 and rich>=13.0.0 from pyproject.toml core requirements.
  • New [cli] extra: declares both packages in pyproject.toml and regenerates uv.lock with extra == 'cli' markers.
  • tablassert launcher: points [project.scripts] at tablassert.cli_entry:main, which preflights extras.require("cli") before importing tablassert.cli.
  • Missing-extra behavior: a base install reports Missing optional dependencies 'cyclopts', 'rich' with pip install "tablassert[cli]" and uv tool install "tablassert[cli]", instead of a bare module error.

Shared error formatting

  • Moves flatten_pydantic_error: now lives in src/tablassert/errors.py, so agent.py, graph_target.py, and library validation paths no longer import Rich-backed tablassert.progress.
  • progress.py keeps Rich UI only: PipelineProgress, format_section_compact, and _truncate remain CLI-runtime imports.
  • Library imports verified: tablassert.agent and tablassert.graph_target import with cyclopts/rich blocked.

Docs

  • README.md, docs/installation.md, docs/cli.md, docs/index.md, docs/development.md, docs/agent.md, llms.txt document [cli] in extra enumerations, install commands, sync commands, the CLI landing requirement, and module index.
  • CHANGELOG.md carries an Unreleased BREAKING entry.
  • CONTRIBUTING.md, Makefile, .github/workflows/ci.yml sync/install --extra cli alongside qc and log; CI cache suffix renamed to ci-cli-qc.

Design

  • Accepted caveat: base installs still ship the tablassert console script, but invoking it without [cli] is now an actionable missing-extra error.
  • Deferred: no extra-specific import shim was added inside cli.py or progress.py; direct Cyclopts/Rich imports there remain correct because the launcher preflights first.

Testing

  • make check -> pass: ruff check, ruff format --check, pyright (0 errors), pytest (1517 passed, 45 skipped), Rust fmt, tests, and clippy --all-targets -- -D warnings.
  • uv run pytest tests/test_extras.py tests/test_progress.py tests/test_cover_misc.py tests/test_docs_source_of_truth.py -q -> 241 passed.
  • Base wheel probe: built release wheel, installed with --no-deps, tablassert --help exits nonzero with the [cli] install command and no installed cyclopts/rich.
  • [cli] wheel probe: wheel[cli] imports cyclopts and rich, and tablassert --help lists all seven live commands.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: aeabdac3-2987-4d67-9deb-3f7cf1be7a71


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SkyeAv SkyeAv changed the title cli extra feat!: move cyclopts and rich behind a new optional [cli] extra Sep 15, 2026
SkyeAv added a commit that referenced this pull request Sep 15, 2026
@SkyeAv
SkyeAv merged commit d026dfc into main Sep 15, 2026
5 checks passed
SkyeAv added a commit that referenced this pull request Sep 15, 2026
Cut 19.0.0 and bump the package version in pyproject.toml, CITATION.cff,
and uv.lock.

Major: five breaking changes ship. The `tablassert` console command now
requires the optional `[cli]` extra, since `cyclopts` and `rich` left the
base install (#187). Level-one normalization redefines fullmap keys as
cleaned Unicode-lowercase, Porter2-normalized, byte-ordered token sets and
moves the database to schema v6, so every schema-v5 fullmap is rejected and
must be rebuilt (#171, #172, #174, #175, #176). `build-fullmap --aria2c`
is gone -- aria2c is used automatically whenever the `[aria2]` extra is
installed (#178) -- and `--taxon-allowlist` is gone because the built-in
top-100 experimental-taxon allowlist now applies to every build, guarding
both reuse paths by `META.taxon_allowlist` identity (#153). Logging now
requires the `[log]` extra and is fully disabled without it (#152).

Features: `tablassert.net` is a new stdlib-only transient/permanent
classification and retry seam shared by the agent and the BABEL downloader
(#163, #164), with one bounded jittered retry layer across the inner agent,
reflexion, and judge (#167) and machine-readable `error_code` values on
skipped checkpoint records (#166). `build-kg` gained an automatic ephemeral
shared-prefix TCode cache keyed by content-addressed XXH64 op digests
(#155-#159, #161). The `--distill` corpus became schema-uniform v2 with a
sibling `outcomes.ndjson`, a deterministic `RewardConfig`-tunable reward,
and the new zero-dependency `tablassert distill-weigh` command (#180-#183).
`CLASS_FIELD_OVERRIDES` grants the DAKP sparse qualifier stack on the pinned
association classes (#188).

Fixes: `distill-export` partitions its corpus by content and unions the
schema across record files, so a mixed v1/v2 directory no longer CastErrors
or silently stringifies a column (#184); BABEL retry warnings survive the
loguru sink; PMC downloads are idempotent, atomic, and bounded-parallel
(#165); reflexion and judge prompts are hard-bounded (#168).

Changelog:
- versioned the Unreleased section as 19.0.0 - 2026-09-15
- merged three duplicate `### Added` blocks into one
- moved the two `BREAKING:` entries from `### Changed` into
  `### Breaking Changes` and added a `**Migration:**` note to all five
- added PR links to all 17 entries, which carried none
- added the missing entries: the distill v2 corpus/reward/distill-weigh
  stack (#180-#183), the distill-export schema-drift fix (#184), the
  TCode run-cache detail (#155-#161), and the README badge removal (#154)

Docs: none needed here. Every shipped doc change landed with its own PR,
and the docs source-of-truth gate passes against the bumped tree.

Testing:
- make check -> exit 0
- uv run ruff check . -> All checks passed!
- uv run pyright -> 0 errors, 0 warnings, 0 informations
- uv run pytest -> 1622 passed, 52 skipped
- cargo test --manifest-path rust/Cargo.toml -> 156 passed, 0 failed
- cargo clippy --all-targets -- -D warnings -> clean
- uv lock --check -> resolved 169 packages, lock current
- uv run mkdocs build --strict -> exit 0
- docs SSOT + CLI coverage after the changelog edit -> 204 passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant