stitch-lineage 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stitch_lineage-0.3.0/.github/workflows/ci.yml +27 -0
- stitch_lineage-0.3.0/.github/workflows/publish.yml +86 -0
- stitch_lineage-0.3.0/.gitignore +25 -0
- stitch_lineage-0.3.0/CLAUDE.md +32 -0
- stitch_lineage-0.3.0/LICENSE +21 -0
- stitch_lineage-0.3.0/PKG-INFO +538 -0
- stitch_lineage-0.3.0/README.md +494 -0
- stitch_lineage-0.3.0/SPEC.md +632 -0
- stitch_lineage-0.3.0/action/stitch-deploy-alert.yml +80 -0
- stitch_lineage-0.3.0/action/stitch-impact.yml +90 -0
- stitch_lineage-0.3.0/action/stitch-mend.yml +206 -0
- stitch_lineage-0.3.0/assets/erd.png +0 -0
- stitch_lineage-0.3.0/assets/lineage.png +0 -0
- stitch_lineage-0.3.0/assets/logo-dark.svg +13 -0
- stitch_lineage-0.3.0/assets/logo-light.svg +14 -0
- stitch_lineage-0.3.0/assets/logos/README.md +13 -0
- stitch_lineage-0.3.0/assets/logos/dbt.svg +1 -0
- stitch_lineage-0.3.0/assets/logos/metabase.svg +1 -0
- stitch_lineage-0.3.0/assets/logos/snowflake.svg +1 -0
- stitch_lineage-0.3.0/pyproject.toml +236 -0
- stitch_lineage-0.3.0/stitch_lineage/__init__.py +3 -0
- stitch_lineage-0.3.0/stitch_lineage/app/__init__.py +25 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/.gitignore +2 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/README.md +98 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/dist/assets/ErdEdge-CJfAUtru.js +1 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/dist/assets/ErdPage-D3NbUloA.js +3 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/dist/assets/LineagePage-DwlFrfhY.js +0 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/dist/assets/ModelStar-BWbTQerg.js +1 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/dist/assets/canvas-DUtIyVtj.js +1 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/dist/assets/index-BU6zaovZ.js +11 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/dist/assets/index-Cf7k_4ZH.css +1 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/dist/assets/useCardRects-otuZSpkQ.js +7 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/dist/index.html +42 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/index.html +41 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/package-lock.json +1908 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/package.json +28 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/scripts/make-dev-graph.mjs +78 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/App.tsx +98 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/ApplyDialog.tsx +254 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/CommandPalette.tsx +24 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/DescriptionEditor.tsx +187 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/DiffView.tsx +40 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/ErdEdge.tsx +110 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/Header.tsx +65 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/LineageEdge.tsx +93 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/ModelStar.tsx +262 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/SearchPanel.tsx +130 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/StageRelationshipModal.tsx +138 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/StagedWorkspace.tsx +195 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/badges.tsx +135 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/bits.tsx +201 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/erdHighlight.tsx +48 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/fanout.tsx +122 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/components/useCardRects.ts +51 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/copy.enforce.test.ts +170 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/copy.tsx +475 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/data.tsx +96 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/canvas.test.ts +190 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/canvas.ts +107 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/consequence.test.ts +199 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/consequence.ts +191 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/coverage.test.ts +274 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/coverage.ts +375 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/details.test.ts +188 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/details.ts +306 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/edgeAnchors.test.ts +230 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/edgeAnchors.ts +183 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/edgeRouting.test.ts +365 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/edgeRouting.ts +612 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/erd.test.ts +733 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/erd.ts +664 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/erdHighlight.test.ts +220 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/erdHighlight.ts +132 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/erdLayout.test.ts +381 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/erdLayout.ts +407 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/fanout.test.ts +127 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/fanout.ts +139 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/fixture.ts +177 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/graph.ts +253 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/hubLayout.test.ts +180 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/hubLayout.ts +398 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/layoutMetrics.test.ts +126 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/layoutMetrics.ts +177 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/layoutSeparation.test.ts +144 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/layoutSeparation.ts +167 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/layoutStress.test.ts +136 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/layoutStress.ts +495 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/lineage.test.ts +197 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/lineage.ts +0 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/load.ts +68 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/modelStar.test.ts +113 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/modelStar.ts +160 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/present.test.ts +250 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/present.ts +285 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/rollup.test.ts +108 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/rollup.ts +0 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/scale.test.ts +67 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/search.test.ts +93 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/search.ts +181 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/staging.test.ts +467 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/staging.ts +381 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/suggestions.test.ts +179 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/suggestions.ts +159 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/trace.test.ts +314 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/trace.ts +225 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/workspace.test.ts +230 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/lib/workspace.ts +173 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/main.tsx +11 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/pages/CoveragePage.tsx +187 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/pages/ErdPage.hover.test.ts +138 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/pages/ErdPage.tsx +1395 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/pages/HomePage.tsx +121 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/pages/LineagePage.test.ts +49 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/pages/LineagePage.tsx +334 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/pages/NodePage.tsx +684 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/router.test.ts +67 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/router.ts +71 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/styles.css +2961 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/styles.test.ts +250 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/theme.ts +44 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/src/types.ts +104 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/tsconfig.json +19 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/vite.config.ts +22 -0
- stitch_lineage-0.3.0/stitch_lineage/app/frontend/vitest.config.ts +10 -0
- stitch_lineage-0.3.0/stitch_lineage/app/server.py +479 -0
- stitch_lineage-0.3.0/stitch_lineage/apply.py +459 -0
- stitch_lineage-0.3.0/stitch_lineage/cli.py +2269 -0
- stitch_lineage-0.3.0/stitch_lineage/config.py +299 -0
- stitch_lineage-0.3.0/stitch_lineage/export/__init__.py +1 -0
- stitch_lineage-0.3.0/stitch_lineage/export/jsonl.py +33 -0
- stitch_lineage-0.3.0/stitch_lineage/export/static_site.py +58 -0
- stitch_lineage-0.3.0/stitch_lineage/graph/__init__.py +5 -0
- stitch_lineage-0.3.0/stitch_lineage/graph/dead.py +350 -0
- stitch_lineage-0.3.0/stitch_lineage/graph/impact.py +835 -0
- stitch_lineage-0.3.0/stitch_lineage/graph/schema.py +199 -0
- stitch_lineage-0.3.0/stitch_lineage/graph/scopes.py +47 -0
- stitch_lineage-0.3.0/stitch_lineage/graph/search.py +118 -0
- stitch_lineage-0.3.0/stitch_lineage/graph/suggest.py +298 -0
- stitch_lineage-0.3.0/stitch_lineage/init_wizard.py +848 -0
- stitch_lineage-0.3.0/stitch_lineage/io/__init__.py +5 -0
- stitch_lineage-0.3.0/stitch_lineage/io/artifacts.py +52 -0
- stitch_lineage-0.3.0/stitch_lineage/io/dbt_runner.py +53 -0
- stitch_lineage-0.3.0/stitch_lineage/io/git.py +63 -0
- stitch_lineage-0.3.0/stitch_lineage/io/graph_store.py +119 -0
- stitch_lineage-0.3.0/stitch_lineage/io/history_store.py +196 -0
- stitch_lineage-0.3.0/stitch_lineage/io/layout_store.py +123 -0
- stitch_lineage-0.3.0/stitch_lineage/io/mend_store.py +48 -0
- stitch_lineage-0.3.0/stitch_lineage/io/metabase_client.py +395 -0
- stitch_lineage-0.3.0/stitch_lineage/io/slack_webhook.py +75 -0
- stitch_lineage-0.3.0/stitch_lineage/io/staged_store.py +344 -0
- stitch_lineage-0.3.0/stitch_lineage/mend/__init__.py +30 -0
- stitch_lineage-0.3.0/stitch_lineage/mend/apply.py +278 -0
- stitch_lineage-0.3.0/stitch_lineage/mend/models.py +169 -0
- stitch_lineage-0.3.0/stitch_lineage/mend/plan.py +647 -0
- stitch_lineage-0.3.0/stitch_lineage/mend/render.py +265 -0
- stitch_lineage-0.3.0/stitch_lineage/mend/rewrite.py +655 -0
- stitch_lineage-0.3.0/stitch_lineage/payloads.py +42 -0
- stitch_lineage-0.3.0/stitch_lineage/py.typed +0 -0
- stitch_lineage-0.3.0/stitch_lineage/resolve/__init__.py +6 -0
- stitch_lineage-0.3.0/stitch_lineage/resolve/bind.py +220 -0
- stitch_lineage-0.3.0/stitch_lineage/resolve/dbt.py +1678 -0
- stitch_lineage-0.3.0/stitch_lineage/resolve/metabase.py +902 -0
- stitch_lineage-0.3.0/stitch_lineage/resolve/native_sql.py +467 -0
- stitch_lineage-0.3.0/stitch_lineage/resolve/types.py +143 -0
- stitch_lineage-0.3.0/stitch_lineage/write/__init__.py +6 -0
- stitch_lineage-0.3.0/stitch_lineage/write/yaml_writer.py +1095 -0
- stitch_lineage-0.3.0/tests/conftest.py +123 -0
- stitch_lineage-0.3.0/tests/fixtures/dbt/.gitkeep +0 -0
- stitch_lineage-0.3.0/tests/fixtures/dbt/catalog.json +81 -0
- stitch_lineage-0.3.0/tests/fixtures/dbt/manifest.json +266 -0
- stitch_lineage-0.3.0/tests/fixtures/dbt_repo/models/events/_schema.yml +12 -0
- stitch_lineage-0.3.0/tests/fixtures/dbt_repo/models/marts/_schema.yml +36 -0
- stitch_lineage-0.3.0/tests/fixtures/dbt_repo/models/viz/_schema.yml +26 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/.gitkeep +0 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/cards.json +209 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/cards_mbql5.json +231 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/cards_native.json +157 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/collections.json +37 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/dashboard_301.json +42 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/dashboard_302.json +29 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/dashboards.json +19 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/database_metadata_2.json +120 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/databases.json +20 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/session_properties.json +11 -0
- stitch_lineage-0.3.0/tests/fixtures/metabase/snippets.json +16 -0
- stitch_lineage-0.3.0/tests/mend_scenario.py +368 -0
- stitch_lineage-0.3.0/tests/test_apply.py +794 -0
- stitch_lineage-0.3.0/tests/test_artifacts.py +51 -0
- stitch_lineage-0.3.0/tests/test_bind.py +331 -0
- stitch_lineage-0.3.0/tests/test_cli.py +861 -0
- stitch_lineage-0.3.0/tests/test_config.py +200 -0
- stitch_lineage-0.3.0/tests/test_dbt_runner.py +62 -0
- stitch_lineage-0.3.0/tests/test_dead.py +375 -0
- stitch_lineage-0.3.0/tests/test_e2e.py +769 -0
- stitch_lineage-0.3.0/tests/test_export.py +49 -0
- stitch_lineage-0.3.0/tests/test_export_site.py +124 -0
- stitch_lineage-0.3.0/tests/test_graph_store.py +198 -0
- stitch_lineage-0.3.0/tests/test_history_store.py +188 -0
- stitch_lineage-0.3.0/tests/test_impact.py +453 -0
- stitch_lineage-0.3.0/tests/test_init_wizard.py +709 -0
- stitch_lineage-0.3.0/tests/test_layout_store.py +80 -0
- stitch_lineage-0.3.0/tests/test_mend_apply.py +419 -0
- stitch_lineage-0.3.0/tests/test_mend_cli.py +582 -0
- stitch_lineage-0.3.0/tests/test_mend_plan.py +318 -0
- stitch_lineage-0.3.0/tests/test_mend_rewrite.py +389 -0
- stitch_lineage-0.3.0/tests/test_metabase_client.py +220 -0
- stitch_lineage-0.3.0/tests/test_resolve_dbt.py +1765 -0
- stitch_lineage-0.3.0/tests/test_resolve_metabase.py +743 -0
- stitch_lineage-0.3.0/tests/test_resolve_native_sql.py +380 -0
- stitch_lineage-0.3.0/tests/test_resolve_types.py +188 -0
- stitch_lineage-0.3.0/tests/test_schema.py +71 -0
- stitch_lineage-0.3.0/tests/test_scopes.py +104 -0
- stitch_lineage-0.3.0/tests/test_search.py +108 -0
- stitch_lineage-0.3.0/tests/test_server.py +122 -0
- stitch_lineage-0.3.0/tests/test_server_apply.py +537 -0
- stitch_lineage-0.3.0/tests/test_server_staging.py +203 -0
- stitch_lineage-0.3.0/tests/test_server_suggestions.py +205 -0
- stitch_lineage-0.3.0/tests/test_staged_store.py +352 -0
- stitch_lineage-0.3.0/tests/test_suggest.py +444 -0
- stitch_lineage-0.3.0/tests/test_yaml_writer.py +1050 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: actions/setup-python@v5
|
|
14
|
+
with:
|
|
15
|
+
python-version: "3.11"
|
|
16
|
+
cache: pip
|
|
17
|
+
cache-dependency-path: pyproject.toml
|
|
18
|
+
- name: Install
|
|
19
|
+
run: pip install -e ".[dev]"
|
|
20
|
+
- name: Lint
|
|
21
|
+
run: ruff check .
|
|
22
|
+
- name: Format
|
|
23
|
+
run: ruff format --check .
|
|
24
|
+
- name: Architecture seams
|
|
25
|
+
run: lint-imports
|
|
26
|
+
- name: Tests
|
|
27
|
+
run: pytest -q
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishes via PyPI Trusted Publishing (OIDC) — no API token is stored anywhere.
|
|
4
|
+
#
|
|
5
|
+
# The publisher registered on pypi.org pins these exact names; changing any of them breaks
|
|
6
|
+
# the trust relationship and the upload is rejected:
|
|
7
|
+
# project: stitch-lineage, owner: sverrbear, repo: stitch-lineage,
|
|
8
|
+
# workflow: publish.yml, environment: pypi
|
|
9
|
+
#
|
|
10
|
+
# Releasing = push a v* tag. `git tag v0.3.0 && git push origin v0.3.0` runs this; creating a
|
|
11
|
+
# GitHub release from a new tag pushes the tag too, so that path still works. Tagging is the
|
|
12
|
+
# whole trigger, so the tag must already match the version in pyproject.toml — the first job
|
|
13
|
+
# refuses to build otherwise, before anything can reach PyPI.
|
|
14
|
+
|
|
15
|
+
on:
|
|
16
|
+
push:
|
|
17
|
+
tags:
|
|
18
|
+
- "v*"
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
build:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
- uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.11"
|
|
31
|
+
|
|
32
|
+
- name: Verify the tag matches the pyproject version
|
|
33
|
+
run: |
|
|
34
|
+
version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
|
|
35
|
+
if [ "${GITHUB_REF_NAME}" != "v${version}" ]; then
|
|
36
|
+
echo "::error::tag '${GITHUB_REF_NAME}' does not match pyproject version 'v${version}'"
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
- run: python -m pip install build twine
|
|
41
|
+
- run: python -m build
|
|
42
|
+
|
|
43
|
+
# The worst failure mode this package has is publishing a `stitch serve` with no UI:
|
|
44
|
+
# the frontend dist/ is gitignored and only reaches the wheel because hatchling is told
|
|
45
|
+
# to treat it as an artifact, so a packaging change can drop it silently and nothing
|
|
46
|
+
# else would notice until a user installed it. Fail the release instead.
|
|
47
|
+
- name: Verify the built frontend is inside the wheel
|
|
48
|
+
run: |
|
|
49
|
+
wheel=$(ls dist/*.whl)
|
|
50
|
+
echo "checking $wheel"
|
|
51
|
+
if ! unzip -l "$wheel" | grep -q 'stitch_lineage/app/frontend/dist/index.html'; then
|
|
52
|
+
echo "::error::$wheel has no stitch_lineage/app/frontend/dist/index.html -- 'stitch serve' would ship with no UI. Rebuild the frontend (npm run build) and commit dist/ before tagging."
|
|
53
|
+
unzip -l "$wheel"
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
# index.html alone is a shell: without the hashed bundles the app loads to a blank page
|
|
57
|
+
assets=$(unzip -l "$wheel" | grep -c 'stitch_lineage/app/frontend/dist/assets/' || true)
|
|
58
|
+
if [ "$assets" -lt 2 ]; then
|
|
59
|
+
echo "::error::$wheel carries index.html but only $assets file(s) under dist/assets/ -- the app would not load."
|
|
60
|
+
exit 1
|
|
61
|
+
fi
|
|
62
|
+
echo "frontend files in the wheel:"
|
|
63
|
+
unzip -l "$wheel" | grep 'stitch_lineage/app/frontend/dist/'
|
|
64
|
+
|
|
65
|
+
- name: Check the package metadata renders on PyPI
|
|
66
|
+
run: twine check dist/*
|
|
67
|
+
|
|
68
|
+
- uses: actions/upload-artifact@v4
|
|
69
|
+
with:
|
|
70
|
+
name: dist
|
|
71
|
+
path: dist/
|
|
72
|
+
|
|
73
|
+
publish:
|
|
74
|
+
needs: build
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
environment:
|
|
77
|
+
name: pypi
|
|
78
|
+
url: https://pypi.org/p/stitch-lineage
|
|
79
|
+
permissions:
|
|
80
|
+
id-token: write # the OIDC token the trusted publisher exchanges; no password anywhere
|
|
81
|
+
steps:
|
|
82
|
+
- uses: actions/download-artifact@v4
|
|
83
|
+
with:
|
|
84
|
+
name: dist
|
|
85
|
+
path: dist/
|
|
86
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
/dist/
|
|
6
|
+
build/
|
|
7
|
+
.venv/
|
|
8
|
+
venv/
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
.ruff_cache/
|
|
11
|
+
.mypy_cache/
|
|
12
|
+
.coverage
|
|
13
|
+
htmlcov/
|
|
14
|
+
|
|
15
|
+
# stitch runtime
|
|
16
|
+
.stitch/cache/
|
|
17
|
+
|
|
18
|
+
# Node (app/frontend)
|
|
19
|
+
node_modules/
|
|
20
|
+
|
|
21
|
+
# Env & editor
|
|
22
|
+
.env
|
|
23
|
+
.DS_Store
|
|
24
|
+
.idea/
|
|
25
|
+
.vscode/
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
stitch: dbt ↔ Metabase column lineage + interactive ERD. Local-first; the dbt repo is the database. `SPEC.md` is the design truth (v0.5) — **Claude owns SPEC.md as Sverrir's master agent** and updates it via docs PRs whenever decisions diverge from it.
|
|
4
|
+
|
|
5
|
+
## Session bootstrap (after a context clear)
|
|
6
|
+
|
|
7
|
+
1. Read this file and `SPEC.md`, then `gh issue list` + `gh pr list` for live state.
|
|
8
|
+
2. Re-arm a ~20-minute session cron that fires the reconciliation checklist below at the main session. (The delivery-manager subagent is retired — do not respawn it.)
|
|
9
|
+
3. Coding work continues issue-by-issue with Opus worktree agents (below). The main session orchestrates and handles git only — it does not hand-write code (saves Fable quota).
|
|
10
|
+
|
|
11
|
+
## The workflow
|
|
12
|
+
|
|
13
|
+
- **GitHub issues are the unit of work.** User feedback → issue (concise, factual, labeled bug/enhancement + phase-N/backlog). Issues are also derived from SPEC.md gaps.
|
|
14
|
+
- **Reconciliation passes** run in the main session on a ~20-min cron, with plain `gh` commands: detect merged/closed PRs, close + re-label issues (merges to non-default branches don't fire "Fixes #N" — close manually), verify issue↔PR links, re-sync open PR branches staled by a merge, check agent liveness by worktree diff evidence (dead agents are resumed by SendMessage to their name — never cloned into a shared worktree), surface material updates only.
|
|
15
|
+
- **Coding agents are Opus**, one per issue (or one per coherent group), each in its own git worktree: `git -C <repo> worktree add ~/Desktop/stitch-worktrees/<name> -b <branch> origin/main`, own `.venv` (`pip install -e ".[dev]"`), frontend work also `npm install` in `stitch_lineage/app/frontend`.
|
|
16
|
+
- **One individually mergeable PR per issue**, body starts `Fixes #N`. **Never stack PRs** — every PR branches from origin/main with base `main` and stands alone. Lanes touching the committed frontend `dist/` still work one issue at a time (one dist rebuild per PR); dist conflicts between open PRs are expected and resolved by the post-merge re-sync (merge origin/main, rebuild `dist/`, push). Conventional commits ending `Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>`.
|
|
17
|
+
- **Nobody merges except Sverrir.** Ever. Agents push + open PRs and stop.
|
|
18
|
+
- **Branch protection on main**: 1 review + green `test` check + **strict up-to-date-with-main** — every merge stales the remaining PRs. Re-sync survivors after each merge, or consolidate several green PRs into one release PR (precedent: #42) when the user wants one click.
|
|
19
|
+
|
|
20
|
+
## Quality gates (every PR)
|
|
21
|
+
|
|
22
|
+
- `pytest -q` full suite, `ruff check .`, `ruff format --check .`, `lint-imports` (architecture seams — SPEC §4) all green in the worktree.
|
|
23
|
+
- Frontend: `npm run typecheck`, `npm test`, `npm run build`, rebuilt `dist/` committed (git-install distribution — the wheel/repo must carry the built app).
|
|
24
|
+
- UI changes: **visual verification against the real graph** (`~/Desktop/data/.stitch/graph.json`, read-only) with before/after screenshots in the PR body.
|
|
25
|
+
- Public repo: **never commit real Smitten data** (card titles, column names) — synthetic shape-only fixtures; screenshots in PR bodies are fine.
|
|
26
|
+
- Real-world resolution claims get measured numbers in the PR body (e.g. cards resolved before/after against the cached payload).
|
|
27
|
+
|
|
28
|
+
## Using stitch on the Smitten data repo (`~/Desktop/data`)
|
|
29
|
+
|
|
30
|
+
- Config: `stitch.yml` at that repo's root (Metabase "Analytics" ↔ `DEV_DBT`, `table_prefix: ${USER_PREFIX}_`, `auto_docs: true`, `serve.erd_default_scope`). Env: `METABASE_API_KEY` in `.env`.
|
|
31
|
+
- `stitch build` runs `dbt docs generate` (dev target → **one MFA push to Sverrir's phone — warn him first**); `stitch build --no-docs` reuses artifacts with no MFA. `.stitch/` is fully local, never committed.
|
|
32
|
+
- `stitch serve` → http://127.0.0.1:8787.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 sverrbear
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|