adops 0.1.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.
- adops-0.1.0/.gitignore +8 -0
- adops-0.1.0/GLOSSARY.md +167 -0
- adops-0.1.0/LICENSE +203 -0
- adops-0.1.0/PKG-INFO +256 -0
- adops-0.1.0/README.md +220 -0
- adops-0.1.0/pyproject.toml +86 -0
- adops-0.1.0/src/adops/__init__.py +1 -0
- adops-0.1.0/src/adops/application/__init__.py +0 -0
- adops-0.1.0/src/adops/application/accept_schema.py +192 -0
- adops-0.1.0/src/adops/application/alerts.py +59 -0
- adops-0.1.0/src/adops/application/connection_check.py +103 -0
- adops-0.1.0/src/adops/application/drop_branch.py +64 -0
- adops-0.1.0/src/adops/application/ports.py +274 -0
- adops-0.1.0/src/adops/application/run_pipeline.py +742 -0
- adops-0.1.0/src/adops/application/secrets.py +78 -0
- adops-0.1.0/src/adops/domain/__init__.py +0 -0
- adops-0.1.0/src/adops/domain/accepted_change_record.py +122 -0
- adops-0.1.0/src/adops/domain/assistant_access.py +133 -0
- adops-0.1.0/src/adops/domain/branch_environment.py +150 -0
- adops-0.1.0/src/adops/domain/checks.py +384 -0
- adops-0.1.0/src/adops/domain/environment.py +116 -0
- adops-0.1.0/src/adops/domain/errors.py +19 -0
- adops-0.1.0/src/adops/domain/loader.py +115 -0
- adops-0.1.0/src/adops/domain/names.py +1 -0
- adops-0.1.0/src/adops/domain/pipeline.py +218 -0
- adops-0.1.0/src/adops/domain/reverse_sync.py +71 -0
- adops-0.1.0/src/adops/domain/reverse_sync_diff.py +117 -0
- adops-0.1.0/src/adops/domain/run_log.py +19 -0
- adops-0.1.0/src/adops/domain/schedule.py +134 -0
- adops-0.1.0/src/adops/domain/schema_snapshot.py +97 -0
- adops-0.1.0/src/adops/domain/secret_reference.py +25 -0
- adops-0.1.0/src/adops/domain/transform.py +80 -0
- adops-0.1.0/src/adops/infrastructure/__init__.py +0 -0
- adops-0.1.0/src/adops/infrastructure/clock.py +6 -0
- adops-0.1.0/src/adops/infrastructure/connection_probe.py +40 -0
- adops-0.1.0/src/adops/infrastructure/dagster_orchestrator.py +123 -0
- adops-0.1.0/src/adops/infrastructure/dagster_server.py +161 -0
- adops-0.1.0/src/adops/infrastructure/dbt_transform.py +194 -0
- adops-0.1.0/src/adops/infrastructure/dlt_sync.py +454 -0
- adops-0.1.0/src/adops/infrastructure/git_start.py +37 -0
- adops-0.1.0/src/adops/infrastructure/postgres_reverse_sync.py +209 -0
- adops-0.1.0/src/adops/infrastructure/release_folders.py +158 -0
- adops-0.1.0/src/adops/infrastructure/run_log_store.py +51 -0
- adops-0.1.0/src/adops/infrastructure/schema_snapshot_store.py +201 -0
- adops-0.1.0/src/adops/infrastructure/step_fingerprint_store.py +128 -0
- adops-0.1.0/src/adops/infrastructure/warehouse_lock.py +142 -0
- adops-0.1.0/src/adops/infrastructure/warehouse_schemas.py +79 -0
- adops-0.1.0/src/adops/infrastructure/webhook_alerts.py +45 -0
- adops-0.1.0/src/adops/interface/__init__.py +0 -0
- adops-0.1.0/src/adops/interface/accept_schema_command.py +217 -0
- adops-0.1.0/src/adops/interface/assistant_files.py +122 -0
- adops-0.1.0/src/adops/interface/cli.py +48 -0
- adops-0.1.0/src/adops/interface/drop_branch_command.py +71 -0
- adops-0.1.0/src/adops/interface/init_command.py +85 -0
- adops-0.1.0/src/adops/interface/mcp_server.py +719 -0
- adops-0.1.0/src/adops/interface/project_secrets.py +20 -0
- adops-0.1.0/src/adops/interface/recover_command.py +56 -0
- adops-0.1.0/src/adops/interface/release_command.py +107 -0
- adops-0.1.0/src/adops/interface/run_command.py +667 -0
- adops-0.1.0/src/adops/interface/server.py +124 -0
- adops-0.1.0/src/adops/interface/validate_command.py +199 -0
- adops-0.1.0/src/adops/templates/__init__.py +0 -0
- adops-0.1.0/src/adops/templates/demo/.claude/skills/adops-breaking-change/SKILL.md +109 -0
- adops-0.1.0/src/adops/templates/demo/.claude/skills/adops-build/SKILL.md +81 -0
- adops-0.1.0/src/adops/templates/demo/.claude/skills/adops-promote/SKILL.md +70 -0
- adops-0.1.0/src/adops/templates/demo/.claude/skills/adops-setup/SKILL.md +104 -0
- adops-0.1.0/src/adops/templates/demo/.claude/skills/adops-share/SKILL.md +141 -0
- adops-0.1.0/src/adops/templates/demo/.claude/skills/adops-test-in-dev/SKILL.md +72 -0
- adops-0.1.0/src/adops/templates/demo/.env.example +20 -0
- adops-0.1.0/src/adops/templates/demo/.mcp.json +8 -0
- adops-0.1.0/src/adops/templates/demo/adops.yaml +92 -0
- adops-0.1.0/src/adops/templates/demo/dagster.yaml +25 -0
- adops-0.1.0/src/adops/templates/demo/dbt/dbt_project.yml +9 -0
- adops-0.1.0/src/adops/templates/demo/dbt/models/customer_orders.sql +9 -0
- adops-0.1.0/src/adops/templates/demo/dbt/models/customer_stats.sql +8 -0
- adops-0.1.0/src/adops/templates/demo/dbt/models/customers.sql +2 -0
- adops-0.1.0/src/adops/templates/demo/dbt/models/orders.sql +2 -0
- adops-0.1.0/src/adops/templates/demo/dbt/models/schema.yml +17 -0
- adops-0.1.0/src/adops/templates/demo/dbt/models/sources.yml +8 -0
- adops-0.1.0/src/adops/templates/demo/docker-compose.yml +79 -0
- adops-0.1.0/src/adops/templates/demo/gitignore +4 -0
- adops-0.1.0/src/adops/templates/demo/pipelines/shop_sync.yaml +30 -0
- adops-0.1.0/src/adops/templates/demo/seed/01_shop.sql +34 -0
- adops-0.1.0/src/adops/templates/demo/seed/02_shop_dev.sql +11 -0
- adops-0.1.0/src/adops/templates/demo/seed/03_shop_prod.sql +11 -0
- adops-0.1.0/src/adops/templates/demo/warehouse_init/01_stage.sql +2 -0
- adops-0.1.0/src/adops/templates/demo/warehouse_init/02_prod.sql +2 -0
- adops-0.1.0/src/adops/templates/github/workflows/adops-prod.yml +71 -0
- adops-0.1.0/src/adops/templates/github/workflows/adops-pull-request.yml +88 -0
- adops-0.1.0/src/adops/templates/github/workflows/adops-stage.yml +65 -0
- adops-0.1.0/src/adops/templates/plain/.claude/skills/adops-breaking-change/SKILL.md +109 -0
- adops-0.1.0/src/adops/templates/plain/.claude/skills/adops-build/SKILL.md +81 -0
- adops-0.1.0/src/adops/templates/plain/.claude/skills/adops-promote/SKILL.md +70 -0
- adops-0.1.0/src/adops/templates/plain/.claude/skills/adops-setup/SKILL.md +104 -0
- adops-0.1.0/src/adops/templates/plain/.claude/skills/adops-share/SKILL.md +141 -0
- adops-0.1.0/src/adops/templates/plain/.claude/skills/adops-test-in-dev/SKILL.md +72 -0
- adops-0.1.0/src/adops/templates/plain/.env.example +16 -0
- adops-0.1.0/src/adops/templates/plain/.mcp.json +8 -0
- adops-0.1.0/src/adops/templates/plain/adops.yaml +24 -0
- adops-0.1.0/src/adops/templates/plain/docker-compose.yml +50 -0
- adops-0.1.0/src/adops/templates/plain/gitignore +2 -0
- adops-0.1.0/src/adops/templates/server/Dockerfile +8 -0
- adops-0.1.0/src/adops/templates/server/dagster.yaml +39 -0
- adops-0.1.0/src/adops/templates/server/workspace.yaml +5 -0
- adops-0.1.0/tests/e2e/conftest.py +67 -0
- adops-0.1.0/tests/e2e/demo_project.py +95 -0
- adops-0.1.0/tests/e2e/test_demo_sync.py +589 -0
- adops-0.1.0/tests/e2e/test_server.py +534 -0
- adops-0.1.0/tests/unit/application/fakes.py +441 -0
- adops-0.1.0/tests/unit/application/test_accept_schema.py +429 -0
- adops-0.1.0/tests/unit/application/test_alerts.py +84 -0
- adops-0.1.0/tests/unit/application/test_application_purity.py +33 -0
- adops-0.1.0/tests/unit/application/test_connection_check.py +193 -0
- adops-0.1.0/tests/unit/application/test_drop_branch.py +203 -0
- adops-0.1.0/tests/unit/application/test_run_pipeline.py +2145 -0
- adops-0.1.0/tests/unit/application/test_secrets.py +165 -0
- adops-0.1.0/tests/unit/conftest.py +85 -0
- adops-0.1.0/tests/unit/domain/test_accepted_change_record.py +262 -0
- adops-0.1.0/tests/unit/domain/test_assistant_access.py +383 -0
- adops-0.1.0/tests/unit/domain/test_branch_environment.py +372 -0
- adops-0.1.0/tests/unit/domain/test_checks.py +628 -0
- adops-0.1.0/tests/unit/domain/test_domain_purity.py +74 -0
- adops-0.1.0/tests/unit/domain/test_environment.py +255 -0
- adops-0.1.0/tests/unit/domain/test_loader.py +410 -0
- adops-0.1.0/tests/unit/domain/test_pipeline.py +488 -0
- adops-0.1.0/tests/unit/domain/test_reverse_sync.py +239 -0
- adops-0.1.0/tests/unit/domain/test_reverse_sync_diff.py +227 -0
- adops-0.1.0/tests/unit/domain/test_run_log.py +51 -0
- adops-0.1.0/tests/unit/domain/test_schedule.py +192 -0
- adops-0.1.0/tests/unit/domain/test_schema_snapshot.py +137 -0
- adops-0.1.0/tests/unit/domain/test_transform.py +152 -0
- adops-0.1.0/tests/unit/infrastructure/conftest.py +99 -0
- adops-0.1.0/tests/unit/infrastructure/test_clock.py +15 -0
- adops-0.1.0/tests/unit/infrastructure/test_connection_probe.py +85 -0
- adops-0.1.0/tests/unit/infrastructure/test_dagster_orchestrator.py +588 -0
- adops-0.1.0/tests/unit/infrastructure/test_dagster_server.py +454 -0
- adops-0.1.0/tests/unit/infrastructure/test_dbt_transform.py +761 -0
- adops-0.1.0/tests/unit/infrastructure/test_dlt_sync.py +1037 -0
- adops-0.1.0/tests/unit/infrastructure/test_git_start.py +87 -0
- adops-0.1.0/tests/unit/infrastructure/test_postgres_reverse_sync.py +409 -0
- adops-0.1.0/tests/unit/infrastructure/test_release_folders.py +339 -0
- adops-0.1.0/tests/unit/infrastructure/test_run_log_store.py +137 -0
- adops-0.1.0/tests/unit/infrastructure/test_schema_snapshot_store.py +582 -0
- adops-0.1.0/tests/unit/infrastructure/test_step_fingerprint_store.py +301 -0
- adops-0.1.0/tests/unit/infrastructure/test_warehouse_lock.py +275 -0
- adops-0.1.0/tests/unit/infrastructure/test_warehouse_schemas.py +288 -0
- adops-0.1.0/tests/unit/infrastructure/test_webhook_alerts.py +121 -0
- adops-0.1.0/tests/unit/interface/conftest.py +48 -0
- adops-0.1.0/tests/unit/interface/git_harness.py +19 -0
- adops-0.1.0/tests/unit/interface/mcp_harness.py +93 -0
- adops-0.1.0/tests/unit/interface/test_accept_schema_command.py +714 -0
- adops-0.1.0/tests/unit/interface/test_assistant_files.py +338 -0
- adops-0.1.0/tests/unit/interface/test_assistant_skills.py +270 -0
- adops-0.1.0/tests/unit/interface/test_cli.py +44 -0
- adops-0.1.0/tests/unit/interface/test_drop_branch_command.py +317 -0
- adops-0.1.0/tests/unit/interface/test_init_command.py +1184 -0
- adops-0.1.0/tests/unit/interface/test_mcp_server.py +2400 -0
- adops-0.1.0/tests/unit/interface/test_recover_command.py +148 -0
- adops-0.1.0/tests/unit/interface/test_release_command.py +308 -0
- adops-0.1.0/tests/unit/interface/test_run_command.py +2002 -0
- adops-0.1.0/tests/unit/interface/test_server.py +496 -0
- adops-0.1.0/tests/unit/interface/test_skill_git_steps.py +179 -0
- adops-0.1.0/tests/unit/interface/test_validate_command.py +667 -0
- adops-0.1.0/tests/unit/test_package.py +7 -0
- adops-0.1.0/uv.lock +3810 -0
adops-0.1.0/.gitignore
ADDED
adops-0.1.0/GLOSSARY.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Agentic DataOps
|
|
2
|
+
|
|
3
|
+
An open-source, self-hosted tool for moving data into a warehouse, transforming it, and pushing results back out, operated interactively through the user's AI assistant.
|
|
4
|
+
|
|
5
|
+
## Language
|
|
6
|
+
|
|
7
|
+
### Pipelines
|
|
8
|
+
|
|
9
|
+
**Pipeline**:
|
|
10
|
+
A version-controlled definition of a chain of Steps that run together on a schedule or on demand.
|
|
11
|
+
_Avoid_: job, DAG, flow, workflow
|
|
12
|
+
|
|
13
|
+
**Schedule**:
|
|
14
|
+
How often a Pipeline runs by itself, written once in the Pipeline file (in plain words such as `daily at 02:00`, or cron) and read in the Project's time zone. It is used by both stage and prod and starts the whole Pipeline. dev and Branch Environments never run on a Schedule. A run that is due while the same Pipeline is still running is skipped.
|
|
15
|
+
_Avoid_: cron, trigger, timer
|
|
16
|
+
|
|
17
|
+
**Server**:
|
|
18
|
+
The always-on Linux machine that runs one Environment's Schedules (one for stage, one for prod) from its Project folder, a Git clone. It does not pull from Git: on a merge or release, its Self-hosted runner validates the new version, moves the folder to it and reloads the Server (ADR-0016). Its Dagster page is bound to 127.0.0.1 because Dagster's open-source page cannot be limited to "Run now" and "Pause" (ADR-0014 clarification).
|
|
19
|
+
_Avoid_: host, VM, worker, runner (when meaning the Server itself; the GitHub agent on it is the Self-hosted runner)
|
|
20
|
+
|
|
21
|
+
**Self-hosted runner**:
|
|
22
|
+
GitHub's runner program installed on a Server machine, labelled `adops-stage` or `adops-prod`, that runs the Project's workflow jobs there so they reach that Server's Warehouse with the secrets in its `.env`.
|
|
23
|
+
_Avoid_: agent, CI worker, Server (the Server is the machine and its Dagster)
|
|
24
|
+
|
|
25
|
+
**Run all**:
|
|
26
|
+
`adops run --all`: running every Pipeline of the Project one after another, in name order, stopping at the first failure. Branch runs and stage/prod deploys use it.
|
|
27
|
+
_Avoid_: full run, run everything, batch
|
|
28
|
+
|
|
29
|
+
**Step**:
|
|
30
|
+
One unit of work inside a Pipeline: a Sync, a Transform, or a Reverse Sync.
|
|
31
|
+
_Avoid_: task, node, op
|
|
32
|
+
|
|
33
|
+
**Project**:
|
|
34
|
+
A user's own Git repository holding their Pipelines, dbt models and Environment settings, created by `adops init`.
|
|
35
|
+
_Avoid_: workspace, repo (when meaning this), app
|
|
36
|
+
|
|
37
|
+
**Source**:
|
|
38
|
+
An external system data is copied from, such as an application database.
|
|
39
|
+
_Avoid_: input, connector (a connector is the code, the Source is the configured system)
|
|
40
|
+
|
|
41
|
+
**Verified Source**:
|
|
42
|
+
A kind of Source covered by the tool's full end-to-end test suite in CI.
|
|
43
|
+
_Avoid_: supported, official, certified
|
|
44
|
+
|
|
45
|
+
**Community Source**:
|
|
46
|
+
A kind of Source that can be used through PyAirbyte but is not covered by the tool's tests.
|
|
47
|
+
_Avoid_: unsupported, experimental, beta
|
|
48
|
+
|
|
49
|
+
**Warehouse**:
|
|
50
|
+
The analytical database where synced and transformed data lives.
|
|
51
|
+
_Avoid_: destination (ambiguous with Reverse Sync targets), DWH, cache
|
|
52
|
+
|
|
53
|
+
**Sync**:
|
|
54
|
+
Copying selected tables/streams from a Source into the Warehouse (through dlt for Verified Sources, PyAirbyte for Community Sources).
|
|
55
|
+
_Avoid_: ingestion run, extract, load, import
|
|
56
|
+
|
|
57
|
+
**Incremental Sync**:
|
|
58
|
+
A Sync that copies only rows changed since the last run, found by a cursor column such as `updated_at`; it does not see deleted rows.
|
|
59
|
+
_Avoid_: delta load, append sync
|
|
60
|
+
|
|
61
|
+
**Full Refresh**:
|
|
62
|
+
A Sync that copies a whole table every run, replacing the previous copy.
|
|
63
|
+
_Avoid_: reload, snapshot sync
|
|
64
|
+
|
|
65
|
+
**CDC Sync**:
|
|
66
|
+
A Sync that reads the Source database's own change log, so it also captures deletes.
|
|
67
|
+
_Avoid_: replication, streaming sync
|
|
68
|
+
|
|
69
|
+
**Breaking Change**:
|
|
70
|
+
A change to a Source table's shape (renamed or dropped column, changed type) since the last successful run. It halts the whole Sync Step before any table loads, and every later Step, until resolved. In dev it is resolved by running `accept-schema` by hand; in stage, prod and Branch Environments, by a committed Accepted-change record, which dev's `accept-schema` writes. A Branch Environment can also be hand-accepted with `accept-schema --branch <name>`, which writes no record. An added column is not a Breaking Change.
|
|
71
|
+
_Avoid_: schema drift (covers harmless changes too), schema error
|
|
72
|
+
|
|
73
|
+
**Accepted-change record**:
|
|
74
|
+
A YAML file in `pipelines/accepted/`, committed through Git, that names one Pipeline table and the Breaking Changes accepted for it, written as `<column> dropped` or `<column> retyped (<from> -> <to>)`. Its id is the file name. Each Environment applies a record at most once, and records are never removed. `accept-schema` in dev writes one (as does any other `--env`, read-only); it can also be written by hand and checked with `adops validate`.
|
|
75
|
+
_Avoid_: schema approval, migration, waiver
|
|
76
|
+
|
|
77
|
+
**accept-schema**:
|
|
78
|
+
The command (`adops accept-schema <pipeline> <table>`) that accepts an intended Breaking Change. In dev it writes an Accepted-change record and saves the table's current shape as dev's baseline. With any other `--env` it only reads that Environment and writes the record. With `--branch <name>` it saves the Branch Environment's baseline under stage's Warehouse lock and writes no record. The Assistant's `accept_schema` tool runs it in dev only.
|
|
79
|
+
_Avoid_: approve schema, schema migrate
|
|
80
|
+
|
|
81
|
+
**Transform**:
|
|
82
|
+
Turning Warehouse data into new tables using dbt models and their tests.
|
|
83
|
+
_Avoid_: model run, job
|
|
84
|
+
|
|
85
|
+
**Reverse Sync**:
|
|
86
|
+
Copying data from the Warehouse back into an operational database.
|
|
87
|
+
_Avoid_: reverse ETL, writeback, activation
|
|
88
|
+
|
|
89
|
+
**Reverse Sync target**:
|
|
90
|
+
The existing table in an operational Postgres database that a Reverse Sync writes to, matched row by row on a key column. adops never creates it.
|
|
91
|
+
_Avoid_: destination, sink
|
|
92
|
+
|
|
93
|
+
**Diff**:
|
|
94
|
+
The rows a Reverse Sync would insert, update or delete to make its target match the dbt result, matched by key. Rows missing from the dbt result are deleted only when the Step sets `delete_missing: true`; otherwise they are kept and reported. The Preview and the real write use the same Diff.
|
|
95
|
+
_Avoid_: changeset, delta, plan
|
|
96
|
+
|
|
97
|
+
**Max-change guard**:
|
|
98
|
+
The `max_change` Check: it stops a Reverse Sync when the rows it would update or delete exceed a set share of the target's rows (half by default). An empty target always passes.
|
|
99
|
+
_Avoid_: circuit breaker, blast-radius limit
|
|
100
|
+
|
|
101
|
+
**Check**:
|
|
102
|
+
A fixed rule run before or after a Step that gives the same pass or fail for the same data (for example: the primary key is unique, no rows were lost). A failed Check fails its Step and stops every later Step; a Check can be skipped for one table only with a written reason.
|
|
103
|
+
_Avoid_: test, assertion, validation, data quality rule
|
|
104
|
+
|
|
105
|
+
**Preview**:
|
|
106
|
+
A Reverse Sync run that reports the changes it would make, with a sample, without writing anything. Only the Environments named exactly `stage` and `prod` write; every other Environment, including every Branch Environment, gets a Preview.
|
|
107
|
+
_Avoid_: dry run, simulation, plan
|
|
108
|
+
|
|
109
|
+
### Environments
|
|
110
|
+
|
|
111
|
+
**Environment**:
|
|
112
|
+
A fully separate place a Pipeline runs, with its own Warehouse location and secrets: dev, stage or prod.
|
|
113
|
+
_Avoid_: stage (as a generic word), target, profile
|
|
114
|
+
|
|
115
|
+
**Branch Environment**:
|
|
116
|
+
A disposable Environment for a single Git branch or pull request, built from stage's settings by `adops run --branch` and removed with `adops drop-branch` when it is no longer needed. It lives in Branch Schemas in stage's Warehouse.
|
|
117
|
+
_Avoid_: preview env, ephemeral env, sandbox
|
|
118
|
+
|
|
119
|
+
**Branch Schema**:
|
|
120
|
+
One of a Branch Environment's schemas in stage's Warehouse, named `br_<branch>__<schema>` (e.g. `br_add_refunds__analytics`), beside stage's own schema of the same kind.
|
|
121
|
+
_Avoid_: env schema, branch database
|
|
122
|
+
|
|
123
|
+
**Step Fingerprint**:
|
|
124
|
+
A hash of everything that defines a Step: its definition in the Pipeline file and, for a Transform, every file of its dbt project. stage saves one per Step after the Step's Checks pass.
|
|
125
|
+
_Avoid_: checksum, version, hash (alone)
|
|
126
|
+
|
|
127
|
+
**Changed Step**:
|
|
128
|
+
A Step whose Step Fingerprint differs from the one saved by stage's last successful run. A Branch Environment rebuilds the first Changed Step and every Step after it.
|
|
129
|
+
_Avoid_: dirty Step, modified Step
|
|
130
|
+
|
|
131
|
+
**Defer**:
|
|
132
|
+
What a Branch Environment does with a Step that has not changed: it skips the Step and reads stage's result instead. A Branch where no Step changed defers every Step and uses stage as it is.
|
|
133
|
+
_Avoid_: skip (a skipped Step is one that did not run because an earlier one failed), reuse, cache
|
|
134
|
+
|
|
135
|
+
**Drop**:
|
|
136
|
+
Removing a Branch Environment with `adops drop-branch <branch>`: every Branch Schema starting with exactly `br_<branch>__` and its local dlt state. stage's own schemas are never dropped.
|
|
137
|
+
_Avoid_: delete, clean up, teardown
|
|
138
|
+
|
|
139
|
+
**Promotion**:
|
|
140
|
+
Moving a reviewed change from one Environment to the next (Branch Environment → stage → prod) through Git.
|
|
141
|
+
_Avoid_: deploy (when meaning this), release, push to prod
|
|
142
|
+
|
|
143
|
+
**Fork PR**:
|
|
144
|
+
A pull request whose branch lives in a copy of the repository under another account. It gets only `adops validate`, on a GitHub-hosted machine, with no secrets and no Branch run; GitHub's fork approval setting, not the workflow, keeps its code off the Servers.
|
|
145
|
+
_Avoid_: external PR, untrusted PR
|
|
146
|
+
|
|
147
|
+
**Warehouse lock**:
|
|
148
|
+
The lock every Warehouse-writing run takes on one Warehouse, per Pipeline, so two runs never write to it at once. A run waits up to 30 minutes for it, then fails without retry. Branch runs and Drop use stage's lock.
|
|
149
|
+
_Avoid_: mutex, run lock, concurrency limit
|
|
150
|
+
|
|
151
|
+
**Secret Reference**:
|
|
152
|
+
The name of a secret (e.g. `APP_DB_PASSWORD`) used in configuration in place of its value.
|
|
153
|
+
_Avoid_: credential, secret (when meaning the name)
|
|
154
|
+
|
|
155
|
+
### Actors
|
|
156
|
+
|
|
157
|
+
**Assistant**:
|
|
158
|
+
The user's own AI coding tool (e.g. Claude Code) that operates the product through its MCP server and skills.
|
|
159
|
+
_Avoid_: agent (ambiguous), bot
|
|
160
|
+
|
|
161
|
+
**Skill**:
|
|
162
|
+
A SKILL.md file that `adops init` writes to `.claude/skills/<name>/` and that tells the Assistant how to carry out one workflow step by step in plain words.
|
|
163
|
+
_Avoid_: playbook, prompt
|
|
164
|
+
|
|
165
|
+
**Analytics Agent**:
|
|
166
|
+
The optional built-in AI that answers business questions about warehouse data; it can read, never write.
|
|
167
|
+
_Avoid_: agent (unqualified), chatbot
|
adops-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
179
|
+
|
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
181
|
+
|
|
182
|
+
To apply the Apache License to your work, attach the following
|
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
184
|
+
replaced with your own identifying information. (Don't include
|
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
186
|
+
comment syntax for the file format. We also recommend that a
|
|
187
|
+
file or class name and description of purpose be included on the
|
|
188
|
+
same "printed page" as the copyright notice for easier
|
|
189
|
+
identification within third-party archives.
|
|
190
|
+
|
|
191
|
+
Copyright [yyyy] [name of copyright owner]
|
|
192
|
+
|
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
194
|
+
you may not use this file except in compliance with the License.
|
|
195
|
+
You may obtain a copy of the License at
|
|
196
|
+
|
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
198
|
+
|
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
202
|
+
See the License for the specific language governing permissions and
|
|
203
|
+
limitations under the License.
|
adops-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: adops
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Self-hosted data pipelines: sync, transform and check data into a Postgres or DuckDB warehouse.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Basiliskin/agentic-data-ops
|
|
6
|
+
Project-URL: Source, https://github.com/Basiliskin/agentic-data-ops
|
|
7
|
+
Project-URL: Issues, https://github.com/Basiliskin/agentic-data-ops/issues
|
|
8
|
+
Author: Dimitry Katz
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: dagster,data-pipelines,dataops,dbt,dlt,mcp,warehouse
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Database
|
|
20
|
+
Requires-Python: >=3.12
|
|
21
|
+
Requires-Dist: dagster-postgres<0.30,>=0.29.30
|
|
22
|
+
Requires-Dist: dagster-webserver<1.14,>=1.13.30
|
|
23
|
+
Requires-Dist: dagster<1.14,>=1.13.30
|
|
24
|
+
Requires-Dist: dbt-core==1.12.7
|
|
25
|
+
Requires-Dist: dbt-duckdb==1.11.1
|
|
26
|
+
Requires-Dist: dbt-postgres==1.11.0
|
|
27
|
+
Requires-Dist: dlt[duckdb,postgres]<2,>=1.32
|
|
28
|
+
Requires-Dist: duckdb==1.5.6
|
|
29
|
+
Requires-Dist: mcp<2,>=1.30
|
|
30
|
+
Requires-Dist: psycopg[binary]<4,>=3.3
|
|
31
|
+
Requires-Dist: pydantic<3,>=2.14
|
|
32
|
+
Requires-Dist: python-dotenv<2,>=1.2
|
|
33
|
+
Requires-Dist: pyyaml<7,>=6.0
|
|
34
|
+
Requires-Dist: typer<0.30,>=0.29
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
# adops — Agentic DataOps
|
|
38
|
+
|
|
39
|
+
Copy data from your app's database into a warehouse, turn it into useful tables with SQL, and send
|
|
40
|
+
the results back to your app, with checks that stop bad data before it spreads. You run it on your
|
|
41
|
+
own machines and drive it by talking to your AI assistant (such as Claude Code).
|
|
42
|
+
|
|
43
|
+
> **Status: early (0.1).** Works end to end on the demo shop, in dev, stage and prod. Promotion
|
|
44
|
+
> through GitHub (pull request → stage → release → prod) is proven on real self-hosted runners.
|
|
45
|
+
> Starting your own Project from scratch is still thin (see [below](#start-your-own-project)).
|
|
46
|
+
|
|
47
|
+
## What you need
|
|
48
|
+
|
|
49
|
+
- **Docker**, running. [OrbStack](https://orbstack.dev) or Docker Desktop both work. The demo starts
|
|
50
|
+
its databases in Docker.
|
|
51
|
+
- **[uv](https://docs.astral.sh/uv/)**, which installs adops and the Python it needs.
|
|
52
|
+
- Optional: **Claude Code** (or another assistant that speaks MCP) for the
|
|
53
|
+
[assistant part](#now-try-it-with-your-assistant).
|
|
54
|
+
|
|
55
|
+
You don't need to know Git or Docker. Once you're set up, your assistant handles both for you.
|
|
56
|
+
|
|
57
|
+
## Install
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
uv tool install adops
|
|
61
|
+
adops --version
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
To install the latest code from GitHub instead: `uv tool install git+https://github.com/Basiliskin/agentic-data-ops`.
|
|
65
|
+
|
|
66
|
+
## Quickstart: the demo shop (about 10 minutes)
|
|
67
|
+
|
|
68
|
+
The demo is a small online shop: a `shop` database with 20 customers and 100 orders, and an empty
|
|
69
|
+
warehouse. One Pipeline, `shop_sync`, does three Steps:
|
|
70
|
+
|
|
71
|
+
1. **Sync**: copies `customers` and `orders` into the warehouse.
|
|
72
|
+
2. **Transform**: dbt models build `customer_stats` (orders and money spent per customer).
|
|
73
|
+
3. **Reverse Sync**: sends `customer_stats` back into the shop database.
|
|
74
|
+
|
|
75
|
+
### 1. Create the demo Project and start its databases
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
adops init --demo shop-demo
|
|
79
|
+
cd shop-demo
|
|
80
|
+
cp .env.example .env
|
|
81
|
+
docker compose up --wait
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`adops init` also makes the folder a Git repository and saves the starting files in it, so later
|
|
85
|
+
your assistant can share each change on its own. (If Git isn't installed, it skips this and says
|
|
86
|
+
so; `--no-git` turns it off.)
|
|
87
|
+
|
|
88
|
+
> **Docker isn't running?** `docker compose` fails with an error about the Docker daemon.
|
|
89
|
+
> Open OrbStack or Docker Desktop, wait until it says it's running, and run the command again.
|
|
90
|
+
|
|
91
|
+
### 2. Run it
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
adops run --all
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
It prints a summary of every Step:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
step sync_shop: passed — customers 20 rows, orders 100 rows
|
|
101
|
+
check customers primary_key_unique: pass
|
|
102
|
+
check customers not_null(email): pass
|
|
103
|
+
check orders no_row_loss: pass
|
|
104
|
+
...
|
|
105
|
+
step transform_shop: passed
|
|
106
|
+
step reverse_sync_customer_stats: passed
|
|
107
|
+
check customer_stats max_change: pass
|
|
108
|
+
...
|
|
109
|
+
Preview: would insert 20, would update 0, would delete 0
|
|
110
|
+
sample insert keys: 1, 2, 3, 4, 5
|
|
111
|
+
Pipeline shop_sync passed in Environment dev.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Every Step runs **Checks**, fixed rules such as "no rows were lost" or "the key is unique". A
|
|
115
|
+
failed Check stops the run, so later Steps never see bad data.
|
|
116
|
+
|
|
117
|
+
The last Step shows a **Preview**: in dev, adops only *reports* what it would write back to the
|
|
118
|
+
shop. Only the `stage` and `prod` Environments really write.
|
|
119
|
+
|
|
120
|
+
### 3. Look at the result
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
docker compose exec warehouse psql -U warehouse -d warehouse \
|
|
124
|
+
-c 'select * from analytics.customer_stats order by total_amount desc limit 3'
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
customer_id | order_count | total_amount | last_order_at
|
|
129
|
+
-------------+-------------+--------------+------------------------
|
|
130
|
+
13 | 5 | 1832.65 | 2026-02-01 15:30:00+00
|
|
131
|
+
7 | 5 | 1722.35 | 2026-02-01 14:30:00+00
|
|
132
|
+
12 | 5 | 1647.60 | 2026-02-01 15:20:00+00
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### 4. Watch adops stop a breaking change
|
|
136
|
+
|
|
137
|
+
Pretend your app team adds a column to `customers` and later removes it again. Adding a column is
|
|
138
|
+
harmless:
|
|
139
|
+
|
|
140
|
+
```sh
|
|
141
|
+
docker compose exec shop psql -U shop -d shop -c 'ALTER TABLE customers ADD COLUMN phone text'
|
|
142
|
+
adops run shop_sync # passes
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Removing a column is a **Breaking Change**, because anything downstream that used it would break
|
|
146
|
+
silently. adops stops the run before loading anything:
|
|
147
|
+
|
|
148
|
+
```sh
|
|
149
|
+
docker compose exec shop psql -U shop -d shop -c 'ALTER TABLE customers DROP COLUMN phone'
|
|
150
|
+
adops run shop_sync
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
step sync_shop: failed
|
|
155
|
+
Step sync_shop: Breaking Change in customers: phone dropped
|
|
156
|
+
step transform_shop: skipped
|
|
157
|
+
step reverse_sync_customer_stats: skipped
|
|
158
|
+
Pipeline shop_sync failed in Environment dev.
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
If the change was intended, accept it:
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
adops accept-schema shop_sync customers
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
Accepted the current shape of customers (3 columns, Step sync_shop) for Pipeline shop_sync in Environment dev.
|
|
169
|
+
These columns are no longer in the Source and may now be NULL in the Warehouse: phone
|
|
170
|
+
Wrote accepted-change record pipelines/accepted/<time>-shop_sync-customers.yaml (phone dropped). Commit it so stage and prod accept the change on their next run.
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
```sh
|
|
174
|
+
adops run shop_sync # passes again
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
The record file is how stage and prod learn the change was intended: it reaches them through Git,
|
|
178
|
+
just like your code does.
|
|
179
|
+
|
|
180
|
+
### More to try
|
|
181
|
+
|
|
182
|
+
- **Make a Check fail.** Blank out one email (`UPDATE customers SET email = NULL WHERE id = 1` in
|
|
183
|
+
the `shop` database) and run again. The `not_null(email)` Check fails with "1 rows with no value",
|
|
184
|
+
and the later Steps are skipped. Put an email back to make it pass.
|
|
185
|
+
- **Use DuckDB as the warehouse.** `adops.yaml` has a commented-out block for each Environment
|
|
186
|
+
that keeps the warehouse in a local file instead of Postgres.
|
|
187
|
+
- **Check your files without running anything:** `adops validate`.
|
|
188
|
+
|
|
189
|
+
## Now try it with your assistant
|
|
190
|
+
|
|
191
|
+
The demo Project already includes everything Claude Code needs: `.mcp.json` connects it to adops,
|
|
192
|
+
and six Skills in `.claude/skills/` teach it the workflows. Open Claude Code in `shop-demo/` and
|
|
193
|
+
ask:
|
|
194
|
+
|
|
195
|
+
> *Add a dbt model with the top 10 customers by total spent, and test it in dev.*
|
|
196
|
+
|
|
197
|
+
It writes a new model with tests (in our try, `dbt/models/top_customers.sql`), runs the
|
|
198
|
+
Pipeline in dev and tells you in plain words whether everything passed. It can't read Warehouse
|
|
199
|
+
tables itself, so look at the rows yourself, using the model name it reports:
|
|
200
|
+
|
|
201
|
+
```sh
|
|
202
|
+
docker compose exec warehouse psql -U warehouse -d warehouse \
|
|
203
|
+
-c 'select * from analytics.top_customers'
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
The Assistant acts only in dev and in Branch Environments. Changes reach stage and prod only through
|
|
207
|
+
a reviewed pull request.
|
|
208
|
+
|
|
209
|
+
| Skill | What it does |
|
|
210
|
+
|---|---|
|
|
211
|
+
| `adops-setup` | First-time setup: checks Docker, free ports, `.env`, Git and the GitHub CLI, then starts the databases and tests the connections. |
|
|
212
|
+
| `adops-build` | Adds or changes a Pipeline (a new table, Steps, a Schedule) and its dbt models. |
|
|
213
|
+
| `adops-test-in-dev` | Runs a Pipeline in dev, previews what it would change and explains any failure. |
|
|
214
|
+
| `adops-breaking-change` | Accepts a Breaking Change in dev and opens the pull request that lets stage and prod accept it too. |
|
|
215
|
+
| `adops-share` | Puts a finished change on its own branch, opens a pull request and runs it in its Branch Environment. |
|
|
216
|
+
| `adops-promote` | After a merge: removes the Branch Environment and explains how the change moves to stage and prod. |
|
|
217
|
+
|
|
218
|
+
## Start your own Project
|
|
219
|
+
|
|
220
|
+
For now, **start from the demo**: run `adops init --demo my-project`, then replace the `shop`
|
|
221
|
+
Source in `adops.yaml`, the tables in `pipelines/shop_sync.yaml` and the models in `dbt/` with your
|
|
222
|
+
own (or ask your assistant to do it with `adops-build`). Plain `adops init` creates the settings
|
|
223
|
+
file, Docker setup, workflows, Skills and `.mcp.json`, but an empty `pipelines/` and no dbt project
|
|
224
|
+
yet. A full blank Project is planned.
|
|
225
|
+
|
|
226
|
+
Passwords never go in `adops.yaml`. Each `*_env` setting names a variable in `.env`, so your files
|
|
227
|
+
can be committed safely.
|
|
228
|
+
|
|
229
|
+
## Going further
|
|
230
|
+
|
|
231
|
+
- **Run stage and prod**: [Run stage and prod locally on a Mac](https://github.com/Basiliskin/agentic-data-ops/blob/main/docs/playbooks/run-stage-and-prod-on-a-mac.md)
|
|
232
|
+
- **Pull request → stage → prod through GitHub**: [Promotion](https://github.com/Basiliskin/agentic-data-ops/blob/main/docs/playbooks/promotion.md)
|
|
233
|
+
- **Check the quickstart and Assistant example still work**: [Try the Assistant on the demo](https://github.com/Basiliskin/agentic-data-ops/blob/main/docs/playbooks/try-the-assistant.md)
|
|
234
|
+
- **Why it's built this way**: [Architecture decisions](https://github.com/Basiliskin/agentic-data-ops/blob/main/docs/adr/)
|
|
235
|
+
- **What the words mean**: [Glossary](https://github.com/Basiliskin/agentic-data-ops/blob/main/GLOSSARY.md)
|
|
236
|
+
|
|
237
|
+
## How it works (for data engineers)
|
|
238
|
+
|
|
239
|
+
- **Pipelines** are YAML files in your own Git repo (the **Project**), compiled to
|
|
240
|
+
[Dagster](https://dagster.io) jobs. The tool is a separate package, so upgrading is just a version bump.
|
|
241
|
+
- **Sync** uses [dlt](https://dlthub.com) for Verified Sources (full refresh, incremental by
|
|
242
|
+
cursor); **Transform** is plain [dbt](https://www.getdbt.com); **Reverse Sync** writes a keyed
|
|
243
|
+
Diff to an existing Postgres table, protected by a max-change guard.
|
|
244
|
+
- **Warehouse**: Postgres, or DuckDB for a no-setup file.
|
|
245
|
+
- **Environments**: dev, stage and prod are fully separate. **Branch Environments** build a pull
|
|
246
|
+
request into `br_<branch>__*` schemas in stage's warehouse, rebuild only changed Steps and read
|
|
247
|
+
stage's results for the rest.
|
|
248
|
+
- **Schedules** run on an always-on **Server** per Environment. Promotion runs on a self-hosted
|
|
249
|
+
GitHub runner on that Server, so warehouse secrets stay in the machine's `.env` and never go to
|
|
250
|
+
GitHub.
|
|
251
|
+
- **The Assistant** works through an MCP server (`adops mcp`). The AI proposes, plain code runs it,
|
|
252
|
+
and secrets never reach the model.
|
|
253
|
+
|
|
254
|
+
## License
|
|
255
|
+
|
|
256
|
+
[Apache-2.0](https://github.com/Basiliskin/agentic-data-ops/blob/main/LICENSE)
|