Skip to content

release: v0.1.11 - #199

Merged
karlimess merged 24 commits into
mainfrom
v0.1.11
Aug 7, 2026
Merged

release: v0.1.11#199
karlimess merged 24 commits into
mainfrom
v0.1.11

Conversation

@db-tycoon-stephen

@db-tycoon-stephen db-tycoon-stephen commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Release-branch merge for v0.1.11. Three streams landed here — the ingestion rewrite's Milestone 2 (tycoon.yml schema + 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.yml schema + config lifecycle (#83, PR #190)

The spine of the release. tycoon.yml becomes a versioned, migratable schema:

  • T2-1 (T2-1: Add runtimes: and metadata: to TycoonProject model #90)RuntimeEntry and MetadataConfig models, with runtimes: and metadata: fields on TycoonProject. Both default, so every existing tycoon.yml loads unchanged.
  • T2-2 (T2-2: Schema migration helper #92)migrate_project() + SCHEMA_VERSION: an in-place, idempotent migration that stamps schema_version and writes metadata: defaults. Uses ruamel.yaml so user comments and blank lines survive the round-trip (new runtime dependency: ruamel-yaml). schema_version is an integer (currently 2), not a semver string — string comparison ordered "0.10.0" < "0.2.0".
  • T2-3 (T2-3: Replace config singleton in ingestion commands with load_project() injection #94) — the four ingestion commands (sources, run-all, sync, explore) now construct TycoonConfig at invocation via a new load_config() factory instead of importing the module-level singleton. Dead cfg.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.
  • T2-4 (T2-4: tycoon.yml version field enforcement #96) — schema version enforcement: a stale schema_version warns and points at the new tycoon init --upgrade; a future schema_version exits 1 cleanly from any gated data command instead of tracebacking through typer internals. The gate deliberately lives in load_config() rather than at import time — review of an earlier revision caught a future schema_version bricking the entire CLI (--help included) 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:

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 uses uv run ruff and uv sync --group dev, and ruff format --check joins 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 main under PTC-96). Carries forward the four updates with real reach; dev-only noise (pytest, mkdocs-material, syrupy) dropped:

  • Runtime: dbt-core 1.11.8 → 1.12.0, typer 0.25.0 → 0.27.0
  • SHA-pinned actions: actions/checkout v6.0.3 → v7.0.1, astral-sh/setup-uv v7.6.0 → v9.0.0

Note: 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-explicit policy). Lockfile 109 → 113 packages. These pins flow into dogfood, which pins to match.

Release chores

  • Version bumped to 0.1.11 (pyproject.toml, __init__.py, lockfile), CHANGELOG entry and docs/releases/v0.1.11.md added (dated 2026-08-07 — adjust before tagging if the train slips).
  • Cherry-picked the v0.1.10 release-notes rename (the great slimmingmetadata backend + a slimmer install) that was stranded on an unmerged branch, so the docs page finally matches the GitHub Release name.

Verification

  • Full suite at branch tip: 710 passed / 3 skipped (was 683 before the follow-up fixes and their new tests).
  • ruff check + ruff format --check clean; mkdocs build --strict clean.
  • Test merge into main is conflict-free, including against the PTC-96 Dependabot-policy commits main picked 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


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

JesuFemi-O and others added 24 commits July 27, 2026 23:27
… 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
chore(deps): dependency review for v0.1.11 (replaces #161-#168)
…oad_config enforcement, migrate_project)

All M2 T2 tasks consolidated into the v0.1.11 release branch.
uv.lock regenerated cleanly after resolving conflict with deps-review (#180).

Closes #83
…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>
@db-tycoon-stephen db-tycoon-stephen added this to the v0.1.11 milestone Aug 5, 2026

@karlimess karlimess left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@karlimess
karlimess merged commit e922f38 into main Aug 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment