feat(t3-2): SourceSpec Pydantic models and load_manifest() loader - #192
Open
JesuFemi-O wants to merge 4 commits into
Open
feat(t3-2): SourceSpec Pydantic models and load_manifest() loader#192JesuFemi-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. |
Pydantic models (CredentialField, ConfigField, SourceSpec) validate every entry in verified_sources.json at load time. SourceSpec.id is injected from the dict key, not stored redundantly in the JSON. credential_defaults() produces the env-var reference dict used by collect_config() in T3-3. Closes #100
…mport; tighten credential_defaults return type to dict[str, str]
- @functools.lru_cache() on load_manifest() so the JSON is parsed once per process — free optimization, no callers mutate the returned dict - test_github_full_entry: assert docs_url and resources fields to close the only unchecked non-None fields on the full entry
…s_dlt() - Remove dlt_source, dlt_init_name, requires_dlt_init as top-level fields - Add provider: str and backend: dict[str, Any] — opaque per-provider bag - Add DltBackend Pydantic model for typed access to dlt-specific fields - Add SourceSpec.as_dlt() — raises ValueError for non-dlt providers so callers can't accidentally treat an Airbyte spec as a dlt one - Update tests: dlt field access via .as_dlt(); add provider/backend coverage; new tests for as_dlt() return type and non-dlt provider guard
JesuFemi-O
force-pushed
the
feat/m3-t3-2
branch
from
August 2, 2026 20:08
860107e to
60a388b
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/manifest.pywithCredentialField,ConfigField, andSourceSpecPydantic modelsload_manifest()readsdata/verified_sources.jsonrelative to the package, validates all entries againstSourceSpec, and returnsdict[str, SourceSpec]keyed by source id@functools.lru_cache()onload_manifest()— JSON parsed once per processSourceSpec.credential_defaults()returns{key: "${ENV_VAR}"}for all credential fieldstests/test_manifest.pycovering roundtrip count, id injection, full github entry (including docs_url and resources), requires_dlt_init=false for generic sources, stripe dlt mapping, credential_defaults, and model construction defaultsTest plan
uv run pytest tests/test_manifest.py— all 17 passCloses #100
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.