test: cover augmentation CLIs + fix broken console-script entry points (Tier B)#330
Merged
Conversation
…ipt paths Add tests driving the real `main()` of the `basic-aug` and `evolution-aug` CLIs (previously 0%). Every collaborator (load_dataset, Generator, synthesizer templates, UtteranceGenerator/UtteranceEvolver/IncrementalUtteranceEvolver) is mocked at the cli module namespace, so argument parsing and control flow run for real without any dataset, network, or LLM access. Covers the en/ru template branches, the regular-vs-incremental evolver branch, async-mode forwarding, and the optional push-to-hub path. Also fix the `[project.scripts]` entry points, which pointed at `...utterances.basic.cli` / `...utterances.evolution.cli` — modules that do not exist (the packages are `_basic` / `_evolution`). As shipped, both console scripts fail with ModuleNotFoundError; corrected to the real `_`-prefixed paths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Coverage series (follow-up to #325), Tier B — CLI entry points.
Adds tests driving the real
main()of both augmentation CLIs (previously 0%):autointent.generation.utterances._basic.cli(basic-aug)autointent.generation.utterances._evolution.cli(evolution-aug)Every collaborator (
load_dataset,Generator, synthesizer templates,UtteranceGenerator/UtteranceEvolver/IncrementalUtteranceEvolver) is mocked at the cli module namespace, so argument parsing and control flow run for real with no dataset, network, or LLM access. Covered: en/ru template selection, regular-vs-incremental evolver branch,--async-modeforwarding, and the optional--output-repopush path.Bonus fix (please review)
While writing these I found the
[project.scripts]entry points are broken: they point at...utterances.basic.cli/...utterances.evolution.cli, but those modules don't exist — the packages are_basic/_evolution. As shipped,basic-augandevolution-augboth fail withModuleNotFoundError. Corrected to the real_-prefixed paths. This is a one-line-each packaging fix; happy to split it into its own PR if you'd prefer.Notes
unit-testsCI job.ruff check,ruff format --check, andmypy --strict(Python 3.10). Execution left to CI.🤖 Generated with Claude Code