cassis-cli 2.2.0__tar.gz → 2.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.
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/PKG-INFO +4 -3
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/README.md +3 -2
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/issues.py +15 -4
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/pyproject.toml +1 -1
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/LICENSE +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/NOTICE +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/__init__.py +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/api.py +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/common.py +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/eval.py +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/guide.py +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/main.py +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/ontology.py +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/ontology_design_guide.md +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/projects.py +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/schema.py +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/schema_plan.py +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/status.py +0 -0
- {cassis_cli-2.2.0 → cassis_cli-2.3.0}/cassis_cli/verify.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cassis-cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Validate, test and evaluate your Cassis ontology from your terminal, then publish it
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -38,7 +38,7 @@ Validate, test and evaluate your ontology from your terminal, then publish it. T
|
|
|
38
38
|
- `cassis schema plan <ddl>` (or `--warehouse` on a project connected to a warehouse) previews what a schema update would change before anything is applied: the source schema diff, the ontology changes Cassis will make (every change on a table placed in the ontology, with everything a drop takes with it) and warnings, terraform-style. `cassis schema apply <ddl>` (or `--plan <id>`) writes the resulting ontology files into the local checkout, app untouched, for review with `git diff`. `cassis schema push <ddl> [--publish]` pushes the new schema and the local ontology to the app (`--yes` in CI). The file speaks only for the schemas it contains — pass `--complete` when it is the project's complete source schema so schemas absent from it are treated as dropped. With `--warehouse` the server introspects the connected warehouse instead of parsing a file; the plan is always whole-source. `cassis schema plan <ddl> --dry-run` is the prepare-ahead variant: the plan is computed synchronously and nothing is kept in Cassis (no plan to apply or resume, the current plan untouched), so a dbt model or migration still in a PR can be planned against safely; `--write-checkout` writes the ontology files it would produce into the checkout, to commit alongside the schema change.
|
|
39
39
|
- `cassis projects list` lists the projects your API key can reach — id (what `--project` and `CASSIS_PROJECT_ID` take), name, published ontology version, and data-source dialect — so a pipeline or agent can discover the project id from the terminal instead of fishing it out of a webapp URL.
|
|
40
40
|
- `cassis status` shows the project's published version (number, label, git commit), whether unpublished changes await publication, the git-sync binding, a schema plan waiting to be applied, and how your local git HEAD relates to the published commit (in sync / N commits ahead / diverged). `cassis status --watch` polls until the published commit matches your local HEAD — e.g. right after merging a PR whose CI publishes the ontology — instead of watching the GitHub Actions tab.
|
|
41
|
-
- `cassis issues` triages the issues Cassis raised on the project — what it found wrong while answering questions (an ontology gap, missing data) — without leaving the checkout: `issues list` (filterable by status, impact, cause and ontology domain, and showing each issue's domain so you can work through one domain at a time), `issues show <id>` for the diagnosis, suggested action and the occurrences behind it, `issues evidence <id> <occurrence-id>` for what the agent actually saw, and `issues resolve` / `dismiss` / `reopen` once you've acted on it.
|
|
41
|
+
- `cassis issues` triages the issues Cassis raised on the project — what it found wrong while answering questions (an ontology gap, missing data) — without leaving the checkout: `issues list` (filterable by status, impact, cause and ontology domain, and showing each issue's domain so you can work through one domain at a time), `issues show <id>` for the diagnosis, suggested action and the occurrences behind it, `issues evidence <id> <occurrence-id>` for what the agent actually saw, and `issues resolve` / `dismiss` / `reopen` once you've acted on it. When the fix ships through a pull request, write the `PR mention:` line `issues show` prints (`Resolves <id>`) in the PR description instead: Cassis resolves the issue when the PR merges, and `issues show` then reports how it was closed and through which PR.
|
|
42
42
|
- `cassis verify` runs the full local gate in one verb — `ontology fmt --check`, `ontology check`, `eval run` — stopping at the first failure. One command in a checkout ("is this change safe to merge?"), one job in CI. `--no-eval` skips the eval suite.
|
|
43
43
|
|
|
44
44
|
## Install
|
|
@@ -160,7 +160,8 @@ cassis issues list --domain sales
|
|
|
160
160
|
# Read what the agent saw for one occurrence (ids from `issues show`):
|
|
161
161
|
cassis issues evidence 019f0000-0000-7000-8000-0000000000e1 019f0000-0000-7000-8000-0000000000c1
|
|
162
162
|
|
|
163
|
-
# Close the loop once the fix is published (or reopen)
|
|
163
|
+
# Close the loop once the fix is published (or reopen). When the fix ships in a pull
|
|
164
|
+
# request, put `Resolves <id>` in its description instead and the merge closes the issue:
|
|
164
165
|
cassis issues resolve 019f0000-0000-7000-8000-0000000000e1
|
|
165
166
|
cassis issues dismiss 019f0000-0000-7000-8000-0000000000e1
|
|
166
167
|
cassis issues reopen 019f0000-0000-7000-8000-0000000000e1
|
|
@@ -16,7 +16,7 @@ Validate, test and evaluate your ontology from your terminal, then publish it. T
|
|
|
16
16
|
- `cassis schema plan <ddl>` (or `--warehouse` on a project connected to a warehouse) previews what a schema update would change before anything is applied: the source schema diff, the ontology changes Cassis will make (every change on a table placed in the ontology, with everything a drop takes with it) and warnings, terraform-style. `cassis schema apply <ddl>` (or `--plan <id>`) writes the resulting ontology files into the local checkout, app untouched, for review with `git diff`. `cassis schema push <ddl> [--publish]` pushes the new schema and the local ontology to the app (`--yes` in CI). The file speaks only for the schemas it contains — pass `--complete` when it is the project's complete source schema so schemas absent from it are treated as dropped. With `--warehouse` the server introspects the connected warehouse instead of parsing a file; the plan is always whole-source. `cassis schema plan <ddl> --dry-run` is the prepare-ahead variant: the plan is computed synchronously and nothing is kept in Cassis (no plan to apply or resume, the current plan untouched), so a dbt model or migration still in a PR can be planned against safely; `--write-checkout` writes the ontology files it would produce into the checkout, to commit alongside the schema change.
|
|
17
17
|
- `cassis projects list` lists the projects your API key can reach — id (what `--project` and `CASSIS_PROJECT_ID` take), name, published ontology version, and data-source dialect — so a pipeline or agent can discover the project id from the terminal instead of fishing it out of a webapp URL.
|
|
18
18
|
- `cassis status` shows the project's published version (number, label, git commit), whether unpublished changes await publication, the git-sync binding, a schema plan waiting to be applied, and how your local git HEAD relates to the published commit (in sync / N commits ahead / diverged). `cassis status --watch` polls until the published commit matches your local HEAD — e.g. right after merging a PR whose CI publishes the ontology — instead of watching the GitHub Actions tab.
|
|
19
|
-
- `cassis issues` triages the issues Cassis raised on the project — what it found wrong while answering questions (an ontology gap, missing data) — without leaving the checkout: `issues list` (filterable by status, impact, cause and ontology domain, and showing each issue's domain so you can work through one domain at a time), `issues show <id>` for the diagnosis, suggested action and the occurrences behind it, `issues evidence <id> <occurrence-id>` for what the agent actually saw, and `issues resolve` / `dismiss` / `reopen` once you've acted on it.
|
|
19
|
+
- `cassis issues` triages the issues Cassis raised on the project — what it found wrong while answering questions (an ontology gap, missing data) — without leaving the checkout: `issues list` (filterable by status, impact, cause and ontology domain, and showing each issue's domain so you can work through one domain at a time), `issues show <id>` for the diagnosis, suggested action and the occurrences behind it, `issues evidence <id> <occurrence-id>` for what the agent actually saw, and `issues resolve` / `dismiss` / `reopen` once you've acted on it. When the fix ships through a pull request, write the `PR mention:` line `issues show` prints (`Resolves <id>`) in the PR description instead: Cassis resolves the issue when the PR merges, and `issues show` then reports how it was closed and through which PR.
|
|
20
20
|
- `cassis verify` runs the full local gate in one verb — `ontology fmt --check`, `ontology check`, `eval run` — stopping at the first failure. One command in a checkout ("is this change safe to merge?"), one job in CI. `--no-eval` skips the eval suite.
|
|
21
21
|
|
|
22
22
|
## Install
|
|
@@ -138,7 +138,8 @@ cassis issues list --domain sales
|
|
|
138
138
|
# Read what the agent saw for one occurrence (ids from `issues show`):
|
|
139
139
|
cassis issues evidence 019f0000-0000-7000-8000-0000000000e1 019f0000-0000-7000-8000-0000000000c1
|
|
140
140
|
|
|
141
|
-
# Close the loop once the fix is published (or reopen)
|
|
141
|
+
# Close the loop once the fix is published (or reopen). When the fix ships in a pull
|
|
142
|
+
# request, put `Resolves <id>` in its description instead and the merge closes the issue:
|
|
142
143
|
cassis issues resolve 019f0000-0000-7000-8000-0000000000e1
|
|
143
144
|
cassis issues dismiss 019f0000-0000-7000-8000-0000000000e1
|
|
144
145
|
cassis issues reopen 019f0000-0000-7000-8000-0000000000e1
|
|
@@ -186,8 +186,10 @@ def show(
|
|
|
186
186
|
"""Show one issue: its diagnosis, suggested action, and occurrences.
|
|
187
187
|
|
|
188
188
|
Each occurrence's id feeds `cassis issues evidence`, which prints what the
|
|
189
|
-
agent saw.
|
|
190
|
-
|
|
189
|
+
agent saw. The `PR mention` line is what to write in the description of
|
|
190
|
+
the pull request that fixes the issue (`Resolves <id>`): Cassis resolves
|
|
191
|
+
it when that PR merges. Exits 0 on success, 1 when the issue does not
|
|
192
|
+
exist in the project, 2 on usage errors, 3 on transport/API errors.
|
|
191
193
|
"""
|
|
192
194
|
api_key = require_api_key(api_key)
|
|
193
195
|
project_id = resolve_project_id(project_id, path / Path(base_path), quiet=json_output)
|
|
@@ -210,10 +212,16 @@ def show(
|
|
|
210
212
|
f"{issue.get('occurrence_count_cache', len(occurrences))} occurrence(s)"
|
|
211
213
|
)
|
|
212
214
|
_field("Domains", ", ".join(issue.get("domains") or []) or None)
|
|
215
|
+
if issue.get("resolved_via"):
|
|
216
|
+
ref = issue.get("resolved_ref")
|
|
217
|
+
_field("Resolved via", f"{issue['resolved_via']}{f' ({ref})' if ref else ''}")
|
|
213
218
|
_field("Description", issue.get("description"), blank_line=True)
|
|
214
219
|
_field("Suggested action", issue.get("suggested_action"), blank_line=True)
|
|
215
220
|
typer.echo("")
|
|
216
221
|
typer.echo("Fix proposal: available (review it in Cassis)" if issue.get("fix_proposal") else "Fix proposal: none")
|
|
222
|
+
if issue.get("status") == "open":
|
|
223
|
+
# What to put in the PR that fixes it: Cassis resolves the issue when that PR merges.
|
|
224
|
+
typer.echo(f"PR mention: Resolves {issue.get('id')}")
|
|
217
225
|
if occurrences:
|
|
218
226
|
typer.echo("")
|
|
219
227
|
typer.echo("Occurrences:")
|
|
@@ -308,8 +316,11 @@ def resolve(
|
|
|
308
316
|
) -> None:
|
|
309
317
|
"""Mark an issue resolved — the ontology change that fixes it is published.
|
|
310
318
|
|
|
311
|
-
|
|
312
|
-
|
|
319
|
+
For a fix that ships through a pull request, prefer writing `Resolves <id>`
|
|
320
|
+
in the PR description: Cassis resolves the issue itself when the PR
|
|
321
|
+
merges, and records the PR on it. Use this command for outcomes that never
|
|
322
|
+
go through a PR. Exits 0 on success, 1 when the issue does not exist in
|
|
323
|
+
the project, 2 on usage errors, 3 on transport/API errors.
|
|
313
324
|
"""
|
|
314
325
|
_set_status(
|
|
315
326
|
issue_id=issue_id,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|