qlix 0.3.2__tar.gz → 0.3.3__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.
- {qlix-0.3.2 → qlix-0.3.3}/BACKLOG.md +1 -1
- {qlix-0.3.2 → qlix-0.3.3}/CLI.md +1 -1
- {qlix-0.3.2 → qlix-0.3.3}/PKG-INFO +3 -3
- {qlix-0.3.2 → qlix-0.3.3}/README.md +2 -2
- {qlix-0.3.2 → qlix-0.3.3}/pyproject.toml +1 -1
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/SKILL.md +1 -1
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/broker.py +1 -1
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/cli.py +5 -1
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_broker.py +3 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_dsl_cli.py +27 -0
- {qlix-0.3.2 → qlix-0.3.3}/uv.lock +1 -1
- {qlix-0.3.2 → qlix-0.3.3}/.github/workflows/ci.yml +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/.github/workflows/publish.yml +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/.gitignore +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/CAPABILITIES.md +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/CUTOVER.md +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/LICENSE +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/RELEASE.md +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/examples/BI-AS-CODE.md +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/examples/EXPORT-FIXTURE.md +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/examples/Qlikfile.toml +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/examples/bi-as-code.yaml +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/examples/policy.example.toml +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/examples/synthetic-smoke-ui.yaml +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/examples/synthetic-smoke.qvs +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/examples/synthetic-smoke.yaml +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/scripts/check-export-fixture.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/scripts/check-wheel-skill.sh +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/__init__.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/app_adopt.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/app_apply.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/app_create.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/app_export.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/app_frontend.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/app_plan.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/app_reload.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/appcheck.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/artifacts.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/auth/__init__.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/auth/browser.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/checks.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/direct_config.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/__init__.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/bookmark_audit.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/compiler.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/engine_validation.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/expression_audit.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/field_audit.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/frontend_ui_acceptance.mjs +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/planner.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/runtime.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/schema.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/spec.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/ui_acceptance.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/dsl/ui_run.mjs +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/engine/__init__.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/engine/certificate.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/engine/client.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/engine/inspection.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/engine/load_script.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/engine/master_guard.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/engine/qrs.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/engine/reload.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/engine/terminal_page.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/exit_codes.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/field_check.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/frontend_apply.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/inventory_cli.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/manifest.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/model.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/policy.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/py.typed +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/script_apply.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/script_diff.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/script_patch.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/script_plan.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/signin_log.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/stoppable.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/src/qlix/ui_run.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/frontend_ui_acceptance.test.mjs +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_app_adopt.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_app_apply.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_app_check.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_app_create.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_app_name_cli.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_app_reload.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_browser_auth.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_certificate.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_direct_config.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_direct_script.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_export_fixture.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_frontend_apply_cli.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_frontend_runtime.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_inventory_cli.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_manifest.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_master_guard.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_model.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_persistent_reload.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_policy.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_qrs.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_script_apply.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_script_diff.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_script_patch.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_script_plan.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_session_attempts.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_session_reuse.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_signin_hygiene.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_skill.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_terminal_page.py +0 -0
- {qlix-0.3.2 → qlix-0.3.3}/tests/test_ui_run.py +0 -0
|
@@ -65,6 +65,6 @@ The permission model for QLX-07 onward should distinguish read, create/initializ
|
|
|
65
65
|
| ID | Owner | Deliverable and acceptance |
|
|
66
66
|
| --- | --- | --- |
|
|
67
67
|
| QLX-10 | qlix | **Export before adoption.** First slice: `qlix app export` captures the visible frontend through a policy-bound PEM target, with opt-in variable definitions and bookmark IDs/titles, excluding saved bookmark selections. Default and opt-in exports passed a live read-only PEM smoke on a disposable app (one sheet, one master item, two fields, no variables or bookmarks reported). Live non-empty check passed on the 2026-12-04 acceptance app (one script-created variable, one bookmark; no selection state exported); live Qlik requires `qType: "variable"` in `GetVariables`, which the first slice omitted. `qlix app adopt` (read-only) now writes an ownership baseline only when every declared object already matches; verified live: matching spec adopted to the same baseline as the deploy, an edited spec was refused, and the adopted baseline turned conflicts into reviewed updates. Still to do: check known published/community sheets using the [acceptance fixture](examples/EXPORT-FIXTURE.md). A passing fixture does not establish global coverage. Record visibility and omissions, including whether base/published and community visibility can be verified. No data rows. Do not claim a complete backup or lossless YAML conversion. Keep ownership adoption separate: establish the mapping and review it before an existing object can be changed. |
|
|
68
|
-
| QLX-11 | Atom | **Finish wrapper migration.** Bring the offline compile/schema runbook change through Atom's gate. Keep wrappers with distinct outputs or safety behavior until callers migrate. In particular, Atom's planner exits 2 on conflicts while the pinned qlix plan can exit 0 with JSON `status: conflicts`; inspection formats and apply recovery also need parity review. Upgrade the Atom lock from an approved published artifact only after consumer checks; never lock to a developer checkout or machine-local profile. |
|
|
68
|
+
| QLX-11 | Atom | **Finish wrapper migration.** qlix 0.3.3 closes the two parity gaps: `dsl plan` exits 2 on conflicts, and `inspect` also writes `state.json`. Bring the offline compile/schema runbook change through Atom's gate. Keep wrappers with distinct outputs or safety behavior until callers migrate. In particular, Atom's planner exits 2 on conflicts while the pinned qlix plan can exit 0 with JSON `status: conflicts`; inspection formats and apply recovery also need parity review. Upgrade the Atom lock from an approved published artifact only after consumer checks; never lock to a developer checkout or machine-local profile. |
|
|
69
69
|
|
|
70
70
|
**Not in scope for the first release:** a catalog service, continuous reconciliation, arbitrary JSON-to-DSL conversion, app deletion, automatic publication, or automatic rollback. Start with **QLX-03 + QLX-02** (policy resolver, manifest, unified exit codes, and read-only preflight) in parallel with **QLX-04** (`qlix model` metadata discovery); ship **QLX-06** (`qlix skill`) once those settle, and prove the guarded PEM path on a disposable app before finalizing **QLX-07**.
|
{qlix-0.3.2 → qlix-0.3.3}/CLI.md
RENAMED
|
@@ -109,6 +109,6 @@ normal fresh frontend plan; do not reuse the first-reload plan.
|
|
|
109
109
|
|
|
110
110
|
- Invalid command syntax normally exits **2**. Handled config or connection failures normally exit **1** and report to stderr.
|
|
111
111
|
- `app check` reserves **2** for a definite check failure or drift and uses **1** for runtime, policy, or usage errors. **0** means no definite failure, not that every check passed: always inspect `status` and `not_verified`.
|
|
112
|
-
- `dsl plan`
|
|
112
|
+
- `dsl plan` prints the plan and exits **2** when its JSON `status` is `"conflicts"`, **0** when it is `"reviewable"`. Still require `status == "reviewable"` before considering apply. `dsl apply` in preview mode exits **2** for a matching but conflicting plan and **1** for a handled failure such as a changed reviewed plan.
|
|
113
113
|
- `dsl validate-fields`, `dsl validate-expressions`, and `script check` can print a JSON report and still exit **1** when validation fails. `dsl ui-run` exits **1** for a failing report.
|
|
114
114
|
- A lost reply from a write is not a rollback. Inspect recovery artifacts and live state before retrying. Do not retry session-limit refusals in a loop.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: qlix
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: CLI-centric Qlik Sense Engine API client, script manager, and declarative frontend DSL
|
|
5
5
|
Project-URL: Homepage, https://github.com/huaxel/qlix
|
|
6
6
|
Project-URL: Repository, https://github.com/huaxel/qlix
|
|
@@ -172,7 +172,7 @@ Keep the export out of Git and store the private key in a private directory on t
|
|
|
172
172
|
|
|
173
173
|
## Inspect apps without writes
|
|
174
174
|
|
|
175
|
-
- `inspect` captures app structure and master definitions, not data pages, in a new private directory. Treat definitions, field names, and embedded literals as sensitive.
|
|
175
|
+
- `inspect` captures app structure and master definitions, not data pages, in a new private directory: `app.json` (sheet snapshot), `library.json` (masters), and `state.json` (full generic-object inventory for repair tools). Treat definitions, field names, and embedded literals as sensitive.
|
|
176
176
|
- `script-hash` returns a SHA-256 digest, not live script contents.
|
|
177
177
|
- `qlix script check candidate.qvs` uses a transient Engine app; it does not reload, save, or open a persistent app. Use `--anchor-app UUID` if the proxy needs an app route and repeat `--seed-zero NAME` for parser defaults that a reload would otherwise assign. It reports a digest and error count, not raw Engine diagnostics.
|
|
178
178
|
- Broker requests are capped at 4 MiB including JSON encoding. The broker does not expose arbitrary RPC or export rows.
|
|
@@ -233,7 +233,7 @@ qlix dsl apply spec.yaml --app "$APP_ID" --snapshot inspection/app.json \
|
|
|
233
233
|
--library inspection/library.json --review-plan review.json
|
|
234
234
|
```
|
|
235
235
|
|
|
236
|
-
Compilation, field auditing, UI manifest generation, planning, and apply preview are offline.
|
|
236
|
+
Compilation, field auditing, UI manifest generation, planning, and apply preview are offline. `dsl plan` exits 2 when the plan has conflicts (the JSON is still printed); scripts should also check that the JSON status is `reviewable` before passing the plan to apply. `validate-expressions` uses the named broker for metadata-only checks of expressions, fields, variables, and bookmarks. Use `qlix dsl ui-schema` to export the acceptance suite schema. To run a compiled manifest, use `qlix dsl ui-run manifest.json --driver /path/to/trusted-driver.mjs --output report.json` (requires Node.js).
|
|
237
237
|
|
|
238
238
|
The driver is executable local code, not a downloaded manifest dependency. It exports `async withTab({baseUrl, appId}, run)`, supplies an authenticated tab on the intended disposable app's sheet, awaits `run(tab)` once, and owns cleanup. The tab must expose `playwright`, `goto`, `reload`, `getAXState`, and `dev.logs` as used by the packaged runner. Keep driver stdout clear. The CLI writes a new private report and exits nonzero on assertion failure. It does not open a browser, start SSO, or manage Qlik slots on the driver's behalf; use a driver that reuses the authorized browser session. This integration is tested offline, not live.
|
|
239
239
|
|
|
@@ -147,7 +147,7 @@ Keep the export out of Git and store the private key in a private directory on t
|
|
|
147
147
|
|
|
148
148
|
## Inspect apps without writes
|
|
149
149
|
|
|
150
|
-
- `inspect` captures app structure and master definitions, not data pages, in a new private directory. Treat definitions, field names, and embedded literals as sensitive.
|
|
150
|
+
- `inspect` captures app structure and master definitions, not data pages, in a new private directory: `app.json` (sheet snapshot), `library.json` (masters), and `state.json` (full generic-object inventory for repair tools). Treat definitions, field names, and embedded literals as sensitive.
|
|
151
151
|
- `script-hash` returns a SHA-256 digest, not live script contents.
|
|
152
152
|
- `qlix script check candidate.qvs` uses a transient Engine app; it does not reload, save, or open a persistent app. Use `--anchor-app UUID` if the proxy needs an app route and repeat `--seed-zero NAME` for parser defaults that a reload would otherwise assign. It reports a digest and error count, not raw Engine diagnostics.
|
|
153
153
|
- Broker requests are capped at 4 MiB including JSON encoding. The broker does not expose arbitrary RPC or export rows.
|
|
@@ -208,7 +208,7 @@ qlix dsl apply spec.yaml --app "$APP_ID" --snapshot inspection/app.json \
|
|
|
208
208
|
--library inspection/library.json --review-plan review.json
|
|
209
209
|
```
|
|
210
210
|
|
|
211
|
-
Compilation, field auditing, UI manifest generation, planning, and apply preview are offline.
|
|
211
|
+
Compilation, field auditing, UI manifest generation, planning, and apply preview are offline. `dsl plan` exits 2 when the plan has conflicts (the JSON is still printed); scripts should also check that the JSON status is `reviewable` before passing the plan to apply. `validate-expressions` uses the named broker for metadata-only checks of expressions, fields, variables, and bookmarks. Use `qlix dsl ui-schema` to export the acceptance suite schema. To run a compiled manifest, use `qlix dsl ui-run manifest.json --driver /path/to/trusted-driver.mjs --output report.json` (requires Node.js).
|
|
212
212
|
|
|
213
213
|
The driver is executable local code, not a downloaded manifest dependency. It exports `async withTab({baseUrl, appId}, run)`, supplies an authenticated tab on the intended disposable app's sheet, awaits `run(tab)` once, and owns cleanup. The tab must expose `playwright`, `goto`, `reload`, `getAXState`, and `dev.logs` as used by the packaged runner. Keep driver stdout clear. The CLI writes a new private report and exits nonzero on assertion failure. It does not open a browser, start SSO, or manage Qlik slots on the driver's behalf; use a driver that reuses the authorized browser session. This integration is tested offline, not live.
|
|
214
214
|
|
|
@@ -26,4 +26,4 @@ Use UUIDs and default JSON for automation; `--table` is for interactive reading.
|
|
|
26
26
|
## Read statuses, not just exit codes
|
|
27
27
|
|
|
28
28
|
- Target-aware `app` commands use exit `1` for runtime, policy, or configuration errors and `2` for check failures, conflicts, or drift. A `0` from `app check` can still mean `not_verified`; a `0` from `app plan` can still need review.
|
|
29
|
-
-
|
|
29
|
+
- `dsl plan` exits `2` with `status: conflicts` and `0` with `status: reviewable`; still require `status: reviewable` before considering apply. Read the actual phase and JSON status before reporting success.
|
|
@@ -795,7 +795,7 @@ async def serve(
|
|
|
795
795
|
|
|
796
796
|
state = await capture_live(doc)
|
|
797
797
|
snapshot, library = inspection_documents(state, app)
|
|
798
|
-
return {"snapshot": snapshot, "library": library}
|
|
798
|
+
return {"snapshot": snapshot, "library": library, "state": state}
|
|
799
799
|
if op == "model":
|
|
800
800
|
from qlix.model import read_model
|
|
801
801
|
|
|
@@ -14,7 +14,7 @@ from typing import Any
|
|
|
14
14
|
from uuid import UUID
|
|
15
15
|
|
|
16
16
|
from . import broker
|
|
17
|
-
from .exit_codes import EXIT_ERROR
|
|
17
|
+
from .exit_codes import EXIT_CHECK_FAILED, EXIT_ERROR
|
|
18
18
|
from .inventory_cli import (
|
|
19
19
|
INVENTORY_HELP,
|
|
20
20
|
add_app_selector,
|
|
@@ -569,6 +569,8 @@ def _run(args: argparse.Namespace) -> Any:
|
|
|
569
569
|
directory.mkdir(mode=0o700)
|
|
570
570
|
write_private_json(directory / "app.json", result["snapshot"])
|
|
571
571
|
write_private_json(directory / "library.json", result["library"])
|
|
572
|
+
# Full Engine inventory, for repair tools that compare against live state.
|
|
573
|
+
write_private_json(directory / "state.json", result["state"])
|
|
572
574
|
return {"appId": str(args.app), "outputDir": str(directory)}
|
|
573
575
|
return broker.run_command(args)
|
|
574
576
|
|
|
@@ -630,6 +632,8 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
630
632
|
print(json.dumps(result, indent=2, ensure_ascii=False, allow_nan=False))
|
|
631
633
|
if args.op == "dsl" and args.dsl_op == "ui-run" and result["passed"] is not True:
|
|
632
634
|
return 1
|
|
635
|
+
if args.op == "dsl" and args.dsl_op == "plan" and result["status"] == "conflicts":
|
|
636
|
+
return EXIT_CHECK_FAILED
|
|
633
637
|
if (
|
|
634
638
|
(args.op == "script" and args.script_op == "check")
|
|
635
639
|
or (args.op == "dsl" and args.dsl_op in {"validate-fields", "validate-expressions"})
|
|
@@ -334,6 +334,9 @@ class Lifecycle(unittest.TestCase):
|
|
|
334
334
|
self.assertEqual(json.loads(snapshot.read_text())["modelFields"], ["demo"])
|
|
335
335
|
self.assertEqual(snapshot.stat().st_mode & 0o777, 0o600)
|
|
336
336
|
self.assertEqual(output.stat().st_mode & 0o777, 0o700)
|
|
337
|
+
state = json.loads((output / "state.json").read_text())
|
|
338
|
+
self.assertEqual(set(state) >= {"objects", "masters", "modelFields"}, True)
|
|
339
|
+
self.assertEqual((output / "state.json").stat().st_mode & 0o777, 0o600)
|
|
337
340
|
self._call(env, "inspect", "--app", app, "--output-dir", str(output), ok=False)
|
|
338
341
|
spec = str(PACKAGE.parents[1] / "examples/synthetic-smoke.yaml")
|
|
339
342
|
self.assertTrue(
|
|
@@ -159,3 +159,30 @@ def test_audits_include_container_show_conditions_and_mini_chart_dimension_field
|
|
|
159
159
|
assert {"vTabFlag", "vItemFlag", "vMin", "vMax"} <= variables
|
|
160
160
|
fields = {use.location: use.name for use in collect_fields(spec)}
|
|
161
161
|
assert fields["sheets.s1.objects.t1.columns.m.mini_chart.dimension_field"] == "F_MINI"
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def test_plan_exits_two_on_conflicts_and_still_prints_the_plan(tmp_path, capsys):
|
|
165
|
+
import asyncio
|
|
166
|
+
|
|
167
|
+
from test_frontend_runtime import FakeDocument
|
|
168
|
+
|
|
169
|
+
from qlix.dsl.runtime import capture_live, inspection_documents
|
|
170
|
+
|
|
171
|
+
doc = FakeDocument()
|
|
172
|
+
# An existing, unowned object that reuses the spec's sheet ID.
|
|
173
|
+
doc.props["frontend_smoke__sheet__pilot"] = {
|
|
174
|
+
"qInfo": {"qId": "frontend_smoke__sheet__pilot", "qType": "sheet"},
|
|
175
|
+
"qMetaDef": {"title": "Created by hand"},
|
|
176
|
+
"cells": [],
|
|
177
|
+
}
|
|
178
|
+
snapshot, _ = inspection_documents(asyncio.run(capture_live(doc)), APP)
|
|
179
|
+
path = tmp_path / "app.json"
|
|
180
|
+
path.write_text(json.dumps(snapshot), encoding="utf-8")
|
|
181
|
+
args = ["dsl", "plan", str(SPEC), "--app", APP, "--snapshot", str(path)]
|
|
182
|
+
assert main(args) == 2
|
|
183
|
+
assert json.loads(capsys.readouterr().out)["status"] == "conflicts"
|
|
184
|
+
empty, library = inspection_documents(asyncio.run(capture_live(FakeDocument())), APP)
|
|
185
|
+
path.write_text(json.dumps(empty), encoding="utf-8")
|
|
186
|
+
(tmp_path / "library.json").write_text(json.dumps(library), encoding="utf-8")
|
|
187
|
+
assert main([*args, "--library", str(tmp_path / "library.json")]) == 0
|
|
188
|
+
assert json.loads(capsys.readouterr().out)["status"] == "reviewable"
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|