Conversation
… from ruff 0.16.0 upgrade CI used `uvx ruff` (always latest) while the project had no pinned version, causing CI to fail whenever ruff shipped new default rules. Fix: - Add ruff==0.15.20 to dev extras and update CI to use `uv run ruff` - Auto-fix 194 import-sort and type-annotation violations flagged by 0.16.0 - Add E402 ignore for init.py re-export block (backwards-compat pattern)
… dev Add ruff format --check to the lint job so formatting drift stops leaking into feature PRs. Switch uv sync --all-extras to uv sync --group dev since ruff lives in [dependency-groups].dev, not an optional extra. Run the full format pass to clear all pre-existing formatting violations.
…a fields to TycoonProject (M2 T2-1) Both fields default so all existing tycoon.yml files load without changes. Includes 3 tests: backwards-compat load, runtimes parsing, metadata parsing.
Writes metadata: defaults and bumps version to 0.2.0 in existing tycoon.yml files. Operates on raw YAML so comments and ordering are preserved. Idempotent — second call returns False with no file write.
…ion bump Instantiate MetadataConfig once rather than twice. Guard the version bump so a file already at a future schema version is not written back down to SCHEMA_VERSION. Update docstring to accurately state that comments are not preserved through the yaml round-trip.
…a_version field Switch migrate_project from yaml.safe_load/yaml.dump to ruamel.yaml so comments and blank lines survive the round-trip. Add schema_version as a separate field on TycoonProject so the user's version field is never touched by migration. Add ruamel-yaml==0.19.1 as a runtime dependency. Adds two new tests: comments_preserved and user_version_not_overwritten.
…e versions Change SCHEMA_VERSION from a semver string to an integer (2) so version comparisons are unambiguous — string comparison would incorrectly treat "0.10.0" < "0.2.0" as True. Change schema_version field type to int | None. Add type guard before comparison: a float schema_version (e.g. 0.2 written unquoted in YAML) now raises ValueError with a clear message rather than a TypeError. A schema_version newer than SCHEMA_VERSION also raises rather than silently passing. Add two new tests covering both error paths.
chore(lint): pin ruff 0.15.20, fix pre-existing violations from 0.16.0 upgrade
…onstruction Each ingestion command (sources, run_all, sync_cmd, explore) now constructs TycoonConfig(project_root=_find_project_root()) at invocation time rather than importing the module-level singleton. Tests drop monkeypatch.setattr calls in favour of monkeypatch.chdir so _find_project_root resolves the correct tmp directory without brittle module-level patching. Closes #94
Add load_config() to config.py as a public entry point that wraps TycoonConfig(project_root=_find_project_root()), removing the need for command modules to import the private _find_project_root across module boundaries. Update all four ingestion command files to use it. Drop two dead cfg.reload() calls in sources.py (add_source and remove_source): cfg is function-local and nothing reads from it again after either call. Tracks remaining singleton uses in transform.py / db.py / status.py in issue #175.
load_project now emits a UserWarning when tycoon.yml has no schema_version or one older than SCHEMA_VERSION, pointing users to run the migration. tycoon init --upgrade calls migrate_project and prints whether the file was updated or was already current. Closes #96
… edge cases - Warning moved from load_project() to load_config() and switched to Rich console helper, so it renders in-band and does not appear on fresh projects or on tycoon init --upgrade (neither goes through load_config) - load_project() now raises ValueError for schema_version > SCHEMA_VERSION, mirroring migrate_project's three-way split - save_project() stamps schema_version on every write so a load+save round-trip (sources add/remove) silently upgrades the stamp - scaffold_blank_project() and scaffold_from_template() write schema_version on new projects, eliminating the false-alarm on init - migrate_project() checks isinstance(existing, bool) before int to catch schema_version: true - tycoon init --upgrade wraps migrate_project in try/except ValueError for clean error output instead of a typer traceback
…rsion in save_project - load_project no longer raises for schema_version > SCHEMA_VERSION; the enforcement now lives in load_config() alongside the stale-version warning, keeping the module-level singleton and --help import-safe - load_config errors and raises SystemExit(1) for a future schema_version so any data command fails cleanly rather than tracing through typer internals - save_project preserves whatever schema_version is already in the model instead of unconditionally stamping SCHEMA_VERSION; only migrate_project (via tycoon init --upgrade) advances the stamp - Update tests: load_project future-schema test flipped to assert no raise; save_project tests now assert preservation semantics; new test covers the load_config SystemExit path
Replaces the eight Dependabot PRs (#161-#168), all of which targeted main and are now closed. Carries forward only the four with real reach; pytest, mkdocs-material and syrupy were dev-only noise and are dropped. Runtime pins: dbt-core 1.11.8 -> 1.12.0 typer 0.25.0 -> 0.27.0 SHA-pinned actions (ci, e2e, nightly-e2e, publish): actions/checkout v6.0.3 -> v7.0.1 astral-sh/setup-uv v7.6.0 -> v9.0.0 Verified: uv lock resolves, 683 passed / 3 skipped. Note: dbt-core 1.12.0 reshapes the tree more than the version implies - adds metricflow 0.211.0, drops dbt-semantic-interfaces, and pulls dbt-core-experimental-parser 2.0.0a5 (a prerelease, admitted by the existing prerelease = 'if-necessary-or-explicit' policy). Lockfile grows 109 -> 113 packages. These flow into dogfood, which pins to match. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
feat(t2-4): schema_version enforcement — warn on stale, tycoon init --upgrade to migrate
…emplate layout scaffold_from_template copied the template tycoon.yml verbatim, then immediately flattened it with a yaml.safe_load/dump round-trip to stamp schema_version — blank-line separators stripped, sequence style normalized, schema_version dumped at the bottom. Replace the manual round-trip with migrate_project(), which uses ruamel.yaml for exactly this job and also writes the metadata: defaults in the same pass. Closes #185 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
model_dump(by_alias=True, exclude_none=True) already emits schema_version whenever it is not None — the field has no alias and no exclude, so the conditional re-add changed nothing. The preservation tests hold identically without it. The suggestion was written against a revision where it replaced an unconditional SCHEMA_VERSION stamp; applied to the base branch it became dead weight. Closes #186 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The T2-4 review caught a future schema_version bricking the entire CLI: load_project raised inside the module-level TycoonConfig() at import, and Typer imports every command module before parsing arguments, so --help, --version, and init --upgrade (the documented remedy) all died with a traceback. The fix landed, but nothing guarded the regression class: CliRunner runs in-process, where tycoon.config is imported long before any tmp_path project exists, so import-time failures are unobservable by construction. Add a subprocess-layer test: schema_version: 99 in cwd, then --help and --version must exit 0 and init --upgrade must fail cleanly (rc 1), none with a traceback. Closes #187 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both are user-facing and were undocumented — --upgrade being the remedy named in the warning users actually see, with nowhere to read what it does to their file. - tycoon-yml reference: schema_version in the top-level key table plus its own section, spelling out the version/schema_version split (yours vs tycoon's), the stale-file warning path, and the future-version error - init page: an 'Upgrading an existing project' section — in-place, comment-preserving, idempotent, never downgrades - all-commands + init synopsis: the --upgrade flag Closes #188 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- pyproject + __init__ to 0.1.11, lockfile refreshed - CHANGELOG [0.1.11] entry: M2 schema work (#83/PR #190), ruff pin + format gate (PR #174), release-time dependency review (PR #180), and the four T2-4 review follow-ups closed on this branch (#185-#188) - docs/releases/v0.1.11.md + mkdocs nav entry Release date matches the planned 2026-08-07; adjust before tagging if the train slips. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Concrete feature descriptors, matching v0.1.6-v0.1.9; the GitHub Release and PR #159 titles were already renamed in place. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
karlimess
approved these changes
Aug 7, 2026
karlimess
left a comment
Collaborator
There was a problem hiding this comment.
Approving for v0.1.11
Reviewed for release readiness rather than line-by-line on the schema code:
- Scope matches the notes. The three streams (M2 tycoon.yml schema + config singleton work, ruff pin + format gate, first release-time dependency review) are all present, and the T2-4 follow-ups #185–#188 are closed on the branch.
- Version and date line up: pyproject at 0.1.11, CHANGELOG [0.1.11] - 2026-08-07, release notes dated the same. No date fix needed.
- All checks green, no conflicts with main.
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.
Release-branch merge for v0.1.11. Three streams landed here — the ingestion rewrite's Milestone 2 (
tycoon.ymlschema + config singleton replacement), a lint/format overhaul of CI, and the first release-time dependency review — plus the four T2-4 review follow-ups, closed on the branch before this merge.Rewrite M2:
tycoon.ymlschema + config lifecycle (#83, PR #190)The spine of the release.
tycoon.ymlbecomes a versioned, migratable schema:RuntimeEntryandMetadataConfigmodels, withruntimes:andmetadata:fields onTycoonProject. Both default, so every existingtycoon.ymlloads unchanged.migrate_project()+SCHEMA_VERSION: an in-place, idempotent migration that stampsschema_versionand writesmetadata:defaults. Uses ruamel.yaml so user comments and blank lines survive the round-trip (new runtime dependency:ruamel-yaml).schema_versionis an integer (currently2), not a semver string — string comparison ordered"0.10.0" < "0.2.0".sources,run-all,sync,explore) now constructTycoonConfigat invocation via a newload_config()factory instead of importing the module-level singleton. Deadcfg.reload()calls dropped. Remaining singleton users (transform.py,db.py,status.py) tracked in chore: migrate remaining config singleton uses in transform.py, db.py, status.py #175.schema_versionwarns and points at the newtycoon init --upgrade; a futureschema_versionexits 1 cleanly from any gated data command instead of tracebacking through typer internals. The gate deliberately lives inload_config()rather than at import time — review of an earlier revision caught a futureschema_versionbricking the entire CLI (--helpincluded) via the import-time singleton.Review follow-ups, closed on the branch
All four issues filed from the T2-4 review are fixed here rather than shipped open:
tycoon init --templateno longer flattens the templatetycoon.yml: stamping goes throughmigrate_project()(ruamel-based) instead of ayaml.safe_load/dumpround-trip, preserving blank-line separators and writing themetadata:defaults in the same pass.schema_versionlines insave_projectare gone;model_dump(exclude_none=True)already emits the field.tycoon.ymlbricks the CLI at import time" class: withschema_version: 99in cwd,--help/--versionmust exit 0 andinit --upgrademust fail cleanly. In-processCliRunnercannot observe this failure mode by construction.schema_versionandtycoon init --upgradeare documented: thetycoon.ymlreference spells out theversion(yours) vsschema_version(tycoon's) split, and the init page gains an "Upgrading an existing project" section.Still open by design: #189 — enforcement currently reaches the 4
load_config()callers out of ~18 command modules. Deliberately staged; whether it hoists to the typer root callback or rides with the wider singleton removal (#175) is an open scoping call.CI / lint hygiene (PR #174)
CI ran
uvx ruff(always latest) against an unpinned project, so every ruff release could break CI without a code change. ruff is now pinned (0.15.20) in the dev dependency group, CI usesuv run ruffanduv sync --group dev, andruff format --checkjoins the lint job so formatting drift stops leaking into feature PRs. Includes the one-time repo-wide format pass (~75 files) and auto-fixes for 194 pre-existing violations.Release-time dependency review (PR #180, replaces Dependabot #161–#168)
First run of the new dependency-review process (documented on
mainunder PTC-96). Carries forward the four updates with real reach; dev-only noise (pytest, mkdocs-material, syrupy) dropped:dbt-core1.11.8 → 1.12.0,typer0.25.0 → 0.27.0actions/checkoutv6.0.3 → v7.0.1,astral-sh/setup-uvv7.6.0 → v9.0.0Note: dbt-core 1.12.0 reshapes the tree more than the version implies (adds metricflow 0.211.0, drops dbt-semantic-interfaces, pulls a prerelease experimental parser under the existing
if-necessary-or-explicitpolicy). Lockfile 109 → 113 packages. These pins flow into dogfood, which pins to match.Release chores
pyproject.toml,__init__.py, lockfile), CHANGELOG entry anddocs/releases/v0.1.11.mdadded (dated 2026-08-07 — adjust before tagging if the train slips).the great slimming→metadata backend + a slimmer install) that was stranded on an unmerged branch, so the docs page finally matches the GitHub Release name.Verification
ruff check+ruff format --checkclean;mkdocs build --strictclean.mainis conflict-free, including against the PTC-96 Dependabot-policy commitsmainpicked up after this branch was cut.Closes #83. Closes #90. Closes #92. Closes #94. Closes #96. Closes #185. Closes #186. Closes #187. Closes #188.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.