feat(t3-3): SourceFactory.collect_config() — spec-driven, no per-source branching - #193
Open
JesuFemi-O wants to merge 4 commits into
Open
feat(t3-3): SourceFactory.collect_config() — spec-driven, no per-source branching#193JesuFemi-O wants to merge 4 commits into
JesuFemi-O wants to merge 4 commits into
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
…ce branching Interactive mode: prompts credentials with hide_input and env-var default; prompts config_fields respecting required/optional. Non-interactive: reads from flags dict, falls back to env-var refs for credentials, raises SystemExit(1) for missing required config fields. Closes #102
…l defaults on real manifest entry, cover default=None path, use explicit None-check instead of or-empty
- error() instead of info() for missing required field — writes to stderr with red prefix, correct for fatal failures - Collect all missing required fields before exiting so --no-prompt users see every missing flag in one run instead of one per re-run - raise typer.Exit(1) instead of SystemExit(1) — consistent with the rest of the Typer command layer; update tests accordingly - Section headers (Credentials / Configuration) in interactive mode when both blocks are non-empty, matching _prompt_catalog_config style - Append '(optional)' to non-required field prompts — system-level cue rather than relying on label wording alone - Print explanatory message when source has no fields (interactive path) so users don't see an abrupt silence after source selection - Single-line module docstring (4-line block condensed)
JesuFemi-O
force-pushed
the
feat/m3-t3-3
branch
from
August 2, 2026 20:08
7774851 to
38da53c
Compare
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.
Summary
src/tycoon/ingestion/factory.pywithSourceFactory.collect_config()— produces a flat config dict for any source via itsSourceSpec, with noif self.spec.id == "github"branching(optional)and excluded if left blank); section headersCredentials/Configurationwhen both blocks are non-empty; informational message when source has no fields--no-prompt): credentials default to${ENV_VAR}; required config_fields raisetyper.Exit(1)witherror()(stderr) after reporting all missing flags at once; optional fields use their non-empty default or are omittedtests/test_factory.py: non-interactive (credential defaults, flag overrides, required/optional paths, multi-missing report, rest_api real defaults, None/empty defaults) and interactive (credential default, explicit value, required field, optional blank/filled, no-fields)Test plan
uv run pytest tests/test_factory.py— all 20 passuv run pytest— full suite 743 passed, 3 skippedCloses #102
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.