Skip to content

Release v0.1.1#2

Merged
db-tycoon-stephen merged 4 commits into
mainfrom
v0.1.1
Apr 16, 2026
Merged

Release v0.1.1#2
db-tycoon-stephen merged 4 commits into
mainfrom
v0.1.1

Conversation

@db-tycoon-stephen

Copy link
Copy Markdown
Contributor

Summary

Cleanup release + a real onboarding wizard. Full details in docs/releases/v0.1.1.md.

Key additions:

  • Per-component tycoon init wizard (ingestion → warehouse → dbt → Rill → orchestrator) with auto-detection, register-existing (path or GitHub URL with clone), and explicit skip.
  • tycoon register dbt and tycoon register rill subcommands.
  • tycoon data query gains --source and --db flags. Closes tycoon data db query cannot reach per-source raw databases #1.
  • Warehouse-alignment check when registering external dbt projects.
  • tycoon data db <sub> flattened into tycoon data schema / query / clean.

Fixes:

  • tycoon data analyze / tycoon data sources run no longer crash with AttributeError when invoked without a source argument (typer.Choiceclick.Choice).
  • tycoon doctor no longer falsely claims tycoon data analyze scaffolds dbt.
  • server/check-updates queries the correct PyPI package.

Test plan

  • Full pytest suite green locally (202 passing, 1 skipped)
  • New: 16 template smoke tests, 17 wizard tests, 7 register tests, 1 regression test
  • tycoon --version returns 0.1.1
  • tycoon --help shows register in Project section
  • CI runs pytest on this PR
  • After merge + tag: verify publish workflow runs and database-tycoon==0.1.1 appears on PyPI

Release notes live at docs/releases/v0.1.1.md.

db-tycoon-stephen and others added 4 commits April 14, 2026 07:14
- `tycoon data query` replaces `tycoon data db query`
- `tycoon data schema` replaces `tycoon data db stats` (shows all DBs in data/)
- `tycoon data clean` replaces `tycoon data db clean`
- Add --source and --db flags to `tycoon data query` so per-source
  raw databases can be queried (fixes #1)
- `tycoon doctor` dbt check is now a warning, not an error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Per-component init wizard with inline + sibling detection of existing
  dbt / Rill projects, register-existing (path or GitHub URL with clone),
  and explicit skip as a first-class option for each component.
- Flattened tycoon data db <sub> into tycoon data schema / query / clean.
- tycoon data query gains --source and --db flags (closes #1).
- tycoon data analyze --rill now scaffolds the Rill project directory on
  demand instead of silently skipping.
- New TransformationTool enum + stack.transformation field so "skip dbt"
  is recorded explicitly in tycoon.yml.
- tycoon doctor reports "skipped by choice" for intentionally-off
  components instead of warning about them.
- tycoon data transform falls back to ~/.dbt/profiles.yml when an
  externally-registered dbt project has no co-located profiles file.
- server/check-updates now queries the correct PyPI package name via httpx.

Release notes: docs/releases/v0.1.1.md
Tests: 174 passing (was 162; added 12 wizard tests).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…late smoke tests

- tycoon register dbt / tycoon register rill subcommands: attach existing
  projects to tycoon.yml without re-running init. Supports local paths and
  GitHub URLs (clone-on-register). Prompts before overwriting.
- Warehouse-alignment check: when a registered dbt project's profiles.yml
  targets a different DuckDB than tycoon's warehouse, warn and offer to
  adopt the dbt path. Prevents silent dbt-writes-here, query-reads-there
  divergence.
- Smoke tests for all four built-in templates (csv-import, github-analytics,
  nyc-transit, weather-station): init + doctor must run cleanly.

Tests: 201 passing, 1 skipped (was 174).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`tycoon data analyze` and `tycoon data sources run` crashed with
AttributeError when invoked without a source argument, because the
interactive "pick a source" prompt referenced `typer.Choice`, which
doesn't exist at runtime. `click.Choice` is the correct reference
(click is already a typer dependency).

Added a regression test so this can't silently come back.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@db-tycoon-stephen
db-tycoon-stephen merged commit 95817a9 into main Apr 16, 2026
@db-tycoon-stephen
db-tycoon-stephen deleted the v0.1.1 branch April 16, 2026 23:57
db-tycoon-stephen added a commit that referenced this pull request Apr 30, 2026
Closes #20. Tycoon already accumulates rich metadata in
.tycoon/metadata.duckdb (10+ tables tracking dlt runs, dlt traces, dbt
invocations, dbt nodes, manifest snapshots, schema-diff history). Rill
sees it via Parquet exports; this commit makes the same data visible
to dbt and to Nao.

Three pieces compose:

1. ATTACH the metadata DB into every scaffolded dbt profile under the
   alias `tycoon_meta` (READ_ONLY). Implemented in:
   - src/tycoon/scaffolding/observability_dbt.py:attach_metadata_to_profiles
   - src/tycoon/scaffolding/templates.py:_scaffold_dbt_project (dynamic
     scaffolding from the wizard)
   - src/tycoon/templates/csv-import/dbt_project/profiles.yml (static
     template ATTACH entry)

2. Generate `dbt_project/models/_tycoon/` with one stg_tycoon__<table>.sql
   view per metadata table (9 staging models), a dim_runs.sql mart that
   UNIONs dlt + dbt runs into one timeline, and _tycoon__schema.yml
   documenting every model. All `materialized: view` so they don't
   double-store data. Implemented in
   scaffolding/observability_dbt.py:scaffold_observability_models. Wired
   into both scaffolding paths and into `tycoon register dbt`.

3. Once the staging views exist, `tycoon ask sync` exposes them to Nao
   via the existing warehouse-introspection pass. Emergent from #1+#2 —
   no extra plumbing.

New surfaces:

- `tycoon data observability scaffold [--no-attach] [--no-models]`
  for retrofitting existing projects (or partial control). Idempotent.
- `tycoon register dbt --no-attach-metadata` opt-out for the auto-attach
  during registration.

Pre-flight detail worth knowing: scaffolding pre-creates
.tycoon/metadata.duckdb with the empty observability schema (via
observability.ensure_schema), so the very first `dbt run` on a fresh
project doesn't trip on the ATTACH targeting a missing file.

Also bundled: pymdownx.emoji + Material twemoji backend in mkdocs.yml
so :material-rocket-launch: etc. render as actual SVG icons in the
docs site (was rendering as literal text before).

Tests: 385 passed. Bug caught + fixed during e2e — dim_runs.sql
originally used `elapsed_seconds` but the captured schema is `elapsed_s`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
JesuFemi-O added a commit that referenced this pull request Jul 7, 2026
…ite, dbt in POC, push-vs-pull test

- Command name, package path, metadata dir, and dbty prose all
  reconciled to tycoon throughout (3a–d)
- D1/D2 rewritten: parallel-package + tycli dropped in favour of
  a long-lived feature branch directly in src/tycoon/ (feedback #1)
- D5 updated: dbt Transformation adapter added to POC scope to
  exercise a second adapter shape alongside Runtime (feedback #2)
- Phase 2 acceptance test sharpened: push-vs-pull (dlt streams,
  Fivetran polls) named as the specific failure mode to watch for;
  added to risks table (feedback #4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tycoon data db query cannot reach per-source raw databases

1 participant