superset-cli 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.
- superset_cli-0.1.0/.envrc +4 -0
- superset_cli-0.1.0/.github/workflows/ci.yml +53 -0
- superset_cli-0.1.0/.github/workflows/publish.yml +79 -0
- superset_cli-0.1.0/.gitignore +15 -0
- superset_cli-0.1.0/AGENTS.md +235 -0
- superset_cli-0.1.0/LICENSE +21 -0
- superset_cli-0.1.0/PKG-INFO +288 -0
- superset_cli-0.1.0/README.md +272 -0
- superset_cli-0.1.0/devenv.lock +65 -0
- superset_cli-0.1.0/devenv.nix +47 -0
- superset_cli-0.1.0/devenv.yaml +18 -0
- superset_cli-0.1.0/docs/architecture/README.md +431 -0
- superset_cli-0.1.0/docs/decisions/0001-read-only-bootstrap-scope.md +39 -0
- superset_cli-0.1.0/docs/decisions/0002-local-config-and-auth-state-storage.md +37 -0
- superset_cli-0.1.0/docs/decisions/0003-browser-login-with-playwright-and-saved-storage-state.md +36 -0
- superset_cli-0.1.0/docs/decisions/0004-decision-memory-system.md +61 -0
- superset_cli-0.1.0/docs/decisions/0005-architecture-reference-document.md +45 -0
- superset_cli-0.1.0/docs/decisions/0006-markdown-ticket-system.md +51 -0
- superset_cli-0.1.0/docs/decisions/0007-superset-cli-product-and-package-name.md +42 -0
- superset_cli-0.1.0/docs/decisions/0008-cookie-extraction-from-installed-browsers.md +63 -0
- superset_cli-0.1.0/docs/decisions/0009-write-command-explicit-opt-in.md +54 -0
- superset_cli-0.1.0/docs/decisions/0010-write-scope-expansion.md +64 -0
- superset_cli-0.1.0/docs/decisions/0011-custom-api-authentication.md +33 -0
- superset_cli-0.1.0/docs/decisions/0011-pypi-release-publishing.md +62 -0
- superset_cli-0.1.0/docs/decisions/README.md +70 -0
- superset_cli-0.1.0/docs/glossary.md +65 -0
- superset_cli-0.1.0/docs/index.md +91 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-agents-md-design.md +48 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-architecture-doc-maintenance-rule.md +23 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-architecture-overview-doc.md +24 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-architecture-reference-adr.md +23 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-decision-citation-in-final-reporting.md +23 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-decision-memory-for-agents.md +27 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-docs-index-maintenance-rule.md +23 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-docs-index.md +24 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-document-decision-memory-system.md +23 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-plan-decision-follow-up-rule.md +24 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-read-only-next-steps.md +235 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-repository-glossary.md +24 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-reusable-documentation-templates.md +24 -0
- superset_cli-0.1.0/docs/plans/2026-06-05-superset-agent-cli-bootstrap.md +115 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-additional-missing-feature-tickets.md +24 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-api-key-auth-design.md +110 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-auth-login-browser-flag.md +57 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-auth-relogin-helper.md +32 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-auth-roadmap-tickets.md +23 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-auth-session-expiry-reporting.md +35 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-auth-ticket-corrections.md +23 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-chart-data-fetch.md +38 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-current-user-and-instance-metadata-reads.md +48 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-dashboard-related-resources.md +113 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-database-schema-and-table-discovery.md +107 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-default-instance-selection.md +71 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-direnv-auto-activation.md +68 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-evaluate-markdown-docs-verification.md +46 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-explore-read-surface-design.md +45 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-github-actions-ci.md +87 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-guest-token-auth-research.md +52 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-jwt-auth-design.md +110 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-list-filtering-and-ordering.md +121 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-markdown-ticket-system.md +37 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-missing-feature-tickets.md +24 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-more-superset-api-gap-tickets.md +23 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-openapi-spec-fetch.md +108 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-phase-1-list-get-resources.md +55 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-phase-2-special-reads.md +34 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-read-only-export-commands.md +51 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-replace-playwright-with-cookie-extraction.md +89 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-retrospective-feature-tickets.md +26 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-security-read-surface-design.md +65 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-superset-cli-rename.md +115 -0
- superset_cli-0.1.0/docs/plans/2026-06-06-write-command-rollout.md +56 -0
- superset_cli-0.1.0/docs/plans/2026-06-08-dashboard-layout-structure.md +24 -0
- superset_cli-0.1.0/docs/plans/2026-08-26-csrf-write-requests.md +26 -0
- superset_cli-0.1.0/docs/plans/2026-08-27-auth-login-auto-fallback.md +26 -0
- superset_cli-0.1.0/docs/plans/2026-08-27-auth-login-live-validation.md +29 -0
- superset_cli-0.1.0/docs/plans/2026-10-02-ansi-help-test.md +42 -0
- superset_cli-0.1.0/docs/plans/2026-10-02-api-command.md +26 -0
- superset_cli-0.1.0/docs/plans/2026-10-02-artifact-node24.md +40 -0
- superset_cli-0.1.0/docs/plans/2026-10-02-pypi-release.md +86 -0
- superset_cli-0.1.0/docs/plans/2026-10-05-public-content-rule.md +23 -0
- superset_cli-0.1.0/docs/plans/README.md +58 -0
- superset_cli-0.1.0/docs/templates/README.md +21 -0
- superset_cli-0.1.0/docs/templates/decision-record-template.md +23 -0
- superset_cli-0.1.0/docs/templates/final-report-template.md +25 -0
- superset_cli-0.1.0/docs/templates/plan-template.md +20 -0
- superset_cli-0.1.0/docs/tickets/README.md +78 -0
- superset_cli-0.1.0/docs/tickets/done/.gitkeep +0 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-annotation-layer-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-api-key-auth-design.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-asset-import-write-commands.md +27 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-login-browser-flag.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-login.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-logout.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-path-derivation-helpers.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-session-expiry-reporting.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-state-removal-helper.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-status-inspection-helper.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-status.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-auth-validate.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-base-url-validation-and-normalization.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-browser-login-persistent-context-flow.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-chart-data-fetch.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-chart-write-commands.md +27 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-charts-get.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-charts-list.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-cli-api-error-mapping.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-cli-entrypoint-delegation.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-cli-help.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-cli-instance-resolution-guard.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-cli-storage-state-guard.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-config-instance-lookup.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-config-instance-upsert-and-remove.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-config-load-and-save.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-cookie-header-construction.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-css-template-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-current-user-and-instance-metadata-reads.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-dashboard-related-resources.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-dashboard-write-commands.md +27 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-dashboards-get.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-dashboards-list.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-database-schema-and-table-discovery.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-database-write-commands.md +27 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-databases-get.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-databases-list.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-dataset-related-objects.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-dataset-write-commands.md +27 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-datasets-get.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-datasets-list.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-datasource-column-value-reads.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-default-instance-selection.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-embedded-dashboard-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-evaluate-markdown-docs-verification.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-explore-read-surface-design.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-guest-token-auth-research.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-instances-add.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-instances-list.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-instances-remove.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-jwt-auth-design.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-list-filtering-and-ordering.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-logs-and-recent-activity-reads.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-openapi-spec-fetch.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-permalink-resolution-reads.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-query-history-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-read-only-export-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-replace-playwright-with-cookie-extraction.md +33 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-report-schedule-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-saved-queries-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-saved-query-write-commands.md +27 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-security-admin-write-commands.md +27 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-security-read-surface-design.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-sqllab-write-commands.md +27 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-storage-state-loading.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-http-error-mapping.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-lifecycle.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-list-pagination-forwarding.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-pagination-param-builder.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-param-forwarding.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-superset-client-result-unwrapping.md +22 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-tags-and-themes-write-commands.md +27 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-tags-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-theme-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-06-06-write-scope-expansion-decision.md +27 -0
- superset_cli-0.1.0/docs/tickets/done/2026-08-26-csrf-write-requests.md +23 -0
- superset_cli-0.1.0/docs/tickets/done/2026-08-27-auth-login-auto-fallback.md +24 -0
- superset_cli-0.1.0/docs/tickets/done/2026-08-27-auth-login-live-validation.md +24 -0
- superset_cli-0.1.0/docs/tickets/in-progress/.gitkeep +0 -0
- superset_cli-0.1.0/docs/tickets/template.md +27 -0
- superset_cli-0.1.0/docs/tickets/todo/.gitkeep +0 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-api-key-auth-support.md +23 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-charts-data-csv-output.md +30 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-charts-data-empty-payload-exit.md +31 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-charts-data-filter-override.md +33 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-default-instance-selection-implementation.md +26 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-docs-relative-link-check.md +22 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-explore-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-jwt-auth-support.md +23 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-read-only-export-commands-implementation.md +30 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-security-rls-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-security-roles-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-06-06-security-users-read-commands.md +23 -0
- superset_cli-0.1.0/docs/tickets/todo/2026-08-27-session-scoped-cookie-unreadable-from-firefox-zen.md +55 -0
- superset_cli-0.1.0/pyproject.toml +34 -0
- superset_cli-0.1.0/scripts/dev-superset-import-snowflake.sh +197 -0
- superset_cli-0.1.0/scripts/dev-superset.sh +67 -0
- superset_cli-0.1.0/src/superset_cli/__init__.py +3 -0
- superset_cli-0.1.0/src/superset_cli/auth.py +243 -0
- superset_cli-0.1.0/src/superset_cli/cli.py +2282 -0
- superset_cli-0.1.0/src/superset_cli/client.py +652 -0
- superset_cli-0.1.0/src/superset_cli/config.py +41 -0
- superset_cli-0.1.0/src/superset_cli/main.py +9 -0
- superset_cli-0.1.0/src/superset_cli/models.py +20 -0
- superset_cli-0.1.0/tests/conftest.py +46 -0
- superset_cli-0.1.0/tests/fakes.py +302 -0
- superset_cli-0.1.0/tests/test_annotation_layers.py +84 -0
- superset_cli-0.1.0/tests/test_api.py +155 -0
- superset_cli-0.1.0/tests/test_auth.py +512 -0
- superset_cli-0.1.0/tests/test_auth_logout.py +114 -0
- superset_cli-0.1.0/tests/test_auth_status.py +144 -0
- superset_cli-0.1.0/tests/test_auth_validate.py +135 -0
- superset_cli-0.1.0/tests/test_chart_data.py +57 -0
- superset_cli-0.1.0/tests/test_charts.py +211 -0
- superset_cli-0.1.0/tests/test_charts_get.py +128 -0
- superset_cli-0.1.0/tests/test_charts_update_clear_qc.py +75 -0
- superset_cli-0.1.0/tests/test_cli.py +55 -0
- superset_cli-0.1.0/tests/test_client.py +448 -0
- superset_cli-0.1.0/tests/test_config.py +31 -0
- superset_cli-0.1.0/tests/test_css_templates.py +84 -0
- superset_cli-0.1.0/tests/test_dashboards.py +211 -0
- superset_cli-0.1.0/tests/test_dashboards_diff.py +72 -0
- superset_cli-0.1.0/tests/test_dashboards_get.py +357 -0
- superset_cli-0.1.0/tests/test_databases.py +211 -0
- superset_cli-0.1.0/tests/test_databases_get.py +504 -0
- superset_cli-0.1.0/tests/test_datasets.py +211 -0
- superset_cli-0.1.0/tests/test_datasets_get.py +128 -0
- superset_cli-0.1.0/tests/test_instances_add.py +54 -0
- superset_cli-0.1.0/tests/test_instances_remove.py +79 -0
- superset_cli-0.1.0/tests/test_logs.py +114 -0
- superset_cli-0.1.0/tests/test_me.py +244 -0
- superset_cli-0.1.0/tests/test_openapi.py +144 -0
- superset_cli-0.1.0/tests/test_phase2_special_reads.py +163 -0
- superset_cli-0.1.0/tests/test_queries.py +84 -0
- superset_cli-0.1.0/tests/test_release_workflow.py +83 -0
- superset_cli-0.1.0/tests/test_repo_files.py +47 -0
- superset_cli-0.1.0/tests/test_reports.py +85 -0
- superset_cli-0.1.0/tests/test_saved_queries.py +84 -0
- superset_cli-0.1.0/tests/test_tags.py +85 -0
- superset_cli-0.1.0/tests/test_themes.py +84 -0
- superset_cli-0.1.0/tests/test_writes.py +274 -0
- superset_cli-0.1.0/uv.lock +531 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
"on":
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
test:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
python-version:
|
|
23
|
+
- "3.12"
|
|
24
|
+
- "3.13"
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout repository
|
|
28
|
+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
29
|
+
|
|
30
|
+
- name: Set up Python
|
|
31
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
32
|
+
with:
|
|
33
|
+
python-version: ${{ matrix.python-version }}
|
|
34
|
+
|
|
35
|
+
- name: Install uv
|
|
36
|
+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
37
|
+
with:
|
|
38
|
+
enable-cache: true
|
|
39
|
+
|
|
40
|
+
- name: Install project dependencies
|
|
41
|
+
run: uv sync --locked --group dev
|
|
42
|
+
|
|
43
|
+
- name: Run test suite
|
|
44
|
+
run: uv run pytest -v
|
|
45
|
+
|
|
46
|
+
- name: Smoke-test CLI help
|
|
47
|
+
run: uv run superset-cli --help
|
|
48
|
+
|
|
49
|
+
- name: Build distributions
|
|
50
|
+
run: uv build
|
|
51
|
+
|
|
52
|
+
- name: Smoke-test built wheel
|
|
53
|
+
run: uv run --isolated --no-project --with dist/*.whl superset-cli --help
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: Build and publish
|
|
2
|
+
|
|
3
|
+
"on":
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: publish-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: false
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout repository
|
|
20
|
+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
21
|
+
with:
|
|
22
|
+
persist-credentials: false
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.12"
|
|
27
|
+
- name: Install uv
|
|
28
|
+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
29
|
+
with:
|
|
30
|
+
enable-cache: true
|
|
31
|
+
- name: Check release version
|
|
32
|
+
if: github.event_name == 'release'
|
|
33
|
+
env:
|
|
34
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
35
|
+
run: |
|
|
36
|
+
python - <<'PY'
|
|
37
|
+
import os
|
|
38
|
+
import tomllib
|
|
39
|
+
from pathlib import Path
|
|
40
|
+
|
|
41
|
+
version = tomllib.loads(Path("pyproject.toml").read_text())["project"]["version"]
|
|
42
|
+
tag = os.environ["RELEASE_TAG"]
|
|
43
|
+
if tag != f"v{version}":
|
|
44
|
+
raise SystemExit(f"Release tag {tag!r} does not match package version {version!r}; expected v{version}")
|
|
45
|
+
PY
|
|
46
|
+
- name: Install project dependencies
|
|
47
|
+
run: uv sync --locked --group dev
|
|
48
|
+
- name: Run test suite
|
|
49
|
+
run: uv run pytest -v
|
|
50
|
+
- name: Build distributions
|
|
51
|
+
run: uv build
|
|
52
|
+
- name: Smoke-test built wheel and source distribution
|
|
53
|
+
run: |
|
|
54
|
+
uv run --isolated --no-project --with dist/*.whl superset-cli --help
|
|
55
|
+
uv run --isolated --no-project --with dist/*.tar.gz superset-cli --help
|
|
56
|
+
- name: Store distributions
|
|
57
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
58
|
+
with:
|
|
59
|
+
name: distributions
|
|
60
|
+
path: dist/
|
|
61
|
+
if-no-files-found: error
|
|
62
|
+
|
|
63
|
+
publish:
|
|
64
|
+
if: github.event_name == 'release'
|
|
65
|
+
needs: build
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
environment:
|
|
68
|
+
name: pypi
|
|
69
|
+
url: https://pypi.org/p/superset-cli
|
|
70
|
+
permissions:
|
|
71
|
+
id-token: write
|
|
72
|
+
steps:
|
|
73
|
+
- name: Download distributions
|
|
74
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
75
|
+
with:
|
|
76
|
+
name: distributions
|
|
77
|
+
path: dist/
|
|
78
|
+
- name: Publish to PyPI
|
|
79
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## Mission
|
|
4
|
+
|
|
5
|
+
This repository builds `superset-cli`, a CLI for self-hosted Apache Superset.
|
|
6
|
+
|
|
7
|
+
Current product scope is **read-only**:
|
|
8
|
+
- local instance config management
|
|
9
|
+
- Playwright-based browser login scaffold
|
|
10
|
+
- saved auth-state inspection and validation
|
|
11
|
+
- read-only Superset REST access for dashboards, charts, datasets, and databases
|
|
12
|
+
|
|
13
|
+
Do not expand the product beyond read-only behavior unless the user explicitly asks for it.
|
|
14
|
+
|
|
15
|
+
## Instruction priority
|
|
16
|
+
|
|
17
|
+
Follow instructions in this order:
|
|
18
|
+
1. explicit user request
|
|
19
|
+
2. this file
|
|
20
|
+
3. README and nearby docs
|
|
21
|
+
4. existing code patterns
|
|
22
|
+
|
|
23
|
+
If instructions conflict or the safest path is unclear, stop and ask.
|
|
24
|
+
|
|
25
|
+
## Project map
|
|
26
|
+
|
|
27
|
+
- `src/superset_cli/` — application code
|
|
28
|
+
- `tests/` — pytest suite; treat tests as executable spec
|
|
29
|
+
- `docs/index.md` — top-level map of repository documentation
|
|
30
|
+
- `docs/glossary.md` — repository-specific terminology used in docs, plans, and architecture notes
|
|
31
|
+
- `docs/templates/` — reusable templates for plans, decision records, and final reports
|
|
32
|
+
- `docs/plans/` — written plans and design notes
|
|
33
|
+
- `docs/tickets/` — lightweight Markdown ticket system for repo work tracking
|
|
34
|
+
- `docs/decisions/` — durable decision log; this is the primary "why" memory for future agents
|
|
35
|
+
- `docs/architecture/` — structural map of the codebase; use this for module responsibilities and command-to-code entry points
|
|
36
|
+
- `README.md` — human-oriented project overview and commands
|
|
37
|
+
- `pyproject.toml` — dependencies, packaging, Python version
|
|
38
|
+
- `devenv.nix` / `devenv.yaml` — local development environment
|
|
39
|
+
|
|
40
|
+
## Environment and working commands
|
|
41
|
+
|
|
42
|
+
Prefer these commands:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
devenv shell
|
|
46
|
+
uv sync --group dev
|
|
47
|
+
uv run pytest -v
|
|
48
|
+
uv run pytest tests/test_cli.py -v
|
|
49
|
+
uv run superset-cli --help
|
|
50
|
+
uv build
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The CLI reads Superset session cookies directly from an installed browser via `browser-cookie3` — no extra browser install step is required.
|
|
54
|
+
|
|
55
|
+
Use `uv` to run Python commands. Prefer `devenv shell` before development work.
|
|
56
|
+
|
|
57
|
+
## Golden workflow (mandatory)
|
|
58
|
+
|
|
59
|
+
For any task beyond a tiny docs edit:
|
|
60
|
+
|
|
61
|
+
1. **Research first.** Check relevant docs, APIs, libraries, and existing repo patterns before changing code.
|
|
62
|
+
2. **Read first.** Read all relevant files immediately before referencing or editing them. Read nearby tests before implementation. Read relevant files in `docs/decisions/` before planning or changing behavior. Read `docs/index.md` when you need the top-level documentation map. Read `docs/glossary.md` when repository-specific terminology is unclear. Read `docs/templates/README.md` when you need repository-approved doc templates. Read `docs/architecture/README.md` when you need the current structural map of modules, commands, and tests.
|
|
63
|
+
3. **Plan first.** Write a short plan to `docs/plans/YYYY-MM-DD-<topic>.md` before any non-trivial change. Every plan must end with a `Decision follow-up` section that says either `Decision record update required:` with the target file(s), or `No durable decision change.`
|
|
64
|
+
4. **TDD always.** Write or update a failing test first.
|
|
65
|
+
5. **Implement minimally.** Make the smallest change that satisfies the test and the request.
|
|
66
|
+
6. **Verify incrementally.** Run focused tests first, then broader verification.
|
|
67
|
+
7. **Capture durable reasoning.** If you made or changed a lasting technical decision, add or update a record in `docs/decisions/` and link it from the plan.
|
|
68
|
+
8. **Report evidence only.** Never claim success without command output or other concrete evidence.
|
|
69
|
+
|
|
70
|
+
## TDD rules
|
|
71
|
+
|
|
72
|
+
TDD is required for all code changes.
|
|
73
|
+
|
|
74
|
+
- Start by adding or updating tests in `tests/`.
|
|
75
|
+
- Confirm the new or changed test fails for the expected reason.
|
|
76
|
+
- Implement the minimum code needed to make it pass.
|
|
77
|
+
- Re-run the targeted test, then the broader suite.
|
|
78
|
+
- Never remove, weaken, or bypass a test just to get green results.
|
|
79
|
+
|
|
80
|
+
For CLI changes:
|
|
81
|
+
- test both human-readable output and `--json` output when applicable
|
|
82
|
+
- preserve existing JSON output shape unless the contract is intentionally changed
|
|
83
|
+
- when changing the contract, update tests and docs in the same task
|
|
84
|
+
|
|
85
|
+
## Decision memory rules
|
|
86
|
+
|
|
87
|
+
- Treat `docs/decisions/` as the canonical long-term memory for why this repository works the way it does.
|
|
88
|
+
- Before planning or implementation, read the most relevant decision record(s) for the area you are changing.
|
|
89
|
+
- Use `docs/plans/` for proposed work and temporary reasoning.
|
|
90
|
+
- Every non-trivial plan must include a final `Decision follow-up` section with one of two outcomes: `Decision record update required:` or `No durable decision change.`
|
|
91
|
+
- Promote any durable outcome from a plan into `docs/decisions/`.
|
|
92
|
+
- Keep one decision per file with stable headings such as `Status`, `Context`, `Decision`, `Consequences`, and `Alternatives considered`.
|
|
93
|
+
- Cross-link decision records to relevant plans, code paths, and tests when possible.
|
|
94
|
+
- Do not bury important rationale only in chat, commit messages, or code comments.
|
|
95
|
+
|
|
96
|
+
## Markdown ticket system
|
|
97
|
+
|
|
98
|
+
- Use `docs/tickets/` for lightweight repo work tracking.
|
|
99
|
+
- Ticket folders are the primary workflow state:
|
|
100
|
+
- `docs/tickets/todo/`
|
|
101
|
+
- `docs/tickets/in-progress/`
|
|
102
|
+
- `docs/tickets/done/`
|
|
103
|
+
- Every ticket must also include a `Status:` field that matches its folder.
|
|
104
|
+
- Agents may create tickets proactively for code, docs, plans, decisions, cleanup, research, and follow-up work.
|
|
105
|
+
- Before creating a ticket, check `docs/tickets/` for an obvious duplicate.
|
|
106
|
+
- If an existing ticket clearly covers the same work, update that ticket instead of creating a new one.
|
|
107
|
+
- If overlap is uncertain, create a new ticket and cross-link related tickets.
|
|
108
|
+
- Keep tickets small and actionable; split broad work into multiple tickets.
|
|
109
|
+
- Starting work on a ticket should move it to `in-progress/`.
|
|
110
|
+
- Finishing work on a ticket should move it to `done/`.
|
|
111
|
+
- Tickets capture what should be done. They do not replace `docs/plans/` for non-trivial implementation planning or `docs/decisions/` for durable rationale.
|
|
112
|
+
|
|
113
|
+
## Coding rules
|
|
114
|
+
|
|
115
|
+
- Prefer extending existing patterns in `cli.py`, `client.py`, `config.py`, `auth.py`, and `models.py`.
|
|
116
|
+
- Keep diffs small and focused.
|
|
117
|
+
- Avoid speculative abstractions and broad refactors.
|
|
118
|
+
- Do not mix unrelated fixes in one change.
|
|
119
|
+
- Preserve current read-only posture unless explicitly asked to change it.
|
|
120
|
+
- If command behavior, UX, or examples change, update `README.md`.
|
|
121
|
+
- If a new top-level documentation area is added, or an existing documentation layer changes role, update `docs/index.md` in the same workstream.
|
|
122
|
+
- If repository-specific terminology changes or important new local terms appear, update `docs/glossary.md` in the same workstream.
|
|
123
|
+
- If repository documentation templates change or new canonical templates are added, update `docs/templates/README.md` in the same workstream.
|
|
124
|
+
- If command-to-code mappings, major module responsibilities, or common structural entry points change, update `docs/architecture/README.md` in the same workstream.
|
|
125
|
+
|
|
126
|
+
## Verification checklist
|
|
127
|
+
|
|
128
|
+
Before declaring a code task complete, run the relevant checks.
|
|
129
|
+
|
|
130
|
+
Minimum expected verification for most code changes:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
uv run pytest -v
|
|
134
|
+
uv run superset-cli --help
|
|
135
|
+
uv build
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Also run the most specific targeted test(s) for the area you changed, for example:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
uv run pytest tests/test_cli.py -v
|
|
142
|
+
uv run pytest tests/test_auth.py -v
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
If you changed CLI behavior, include at least one manual command smoke check.
|
|
146
|
+
|
|
147
|
+
## Live Superset, auth, and browser safety
|
|
148
|
+
|
|
149
|
+
Live verification is allowed, but guarded.
|
|
150
|
+
|
|
151
|
+
- Prefer local tests, mocks, and fixtures first.
|
|
152
|
+
- Use a real Superset instance only when needed for validation.
|
|
153
|
+
- Keep all live-instance actions read-only unless the user explicitly authorizes otherwise.
|
|
154
|
+
- Log the exact commands used for live verification.
|
|
155
|
+
- Announce browser-based login before launching it.
|
|
156
|
+
- Treat browser profiles, cookies, and `storage-state.json` as sensitive.
|
|
157
|
+
- Never commit credentials, auth state, browser profiles, or secrets.
|
|
158
|
+
- Use `/tmp` for temporary files and scratch artifacts.
|
|
159
|
+
|
|
160
|
+
## Public repository content
|
|
161
|
+
|
|
162
|
+
This repository and its source distribution are public. Everything committed, including docs, plans, tickets, tests, fixtures, commit messages, and PR descriptions, must be free of employer- or customer-specific details.
|
|
163
|
+
|
|
164
|
+
- Use the example company `Example Corp` and reserved example domains (`example.com`, `superset.example.com`, `superset-staging.example.com`) instead of real company names, hostnames, or SSO setups.
|
|
165
|
+
- Do not quote real instance data: dashboard, chart, dataset, or database names, IDs, user names, or emails taken from a live Superset. Replace them with neutral examples before committing.
|
|
166
|
+
- Redact cookie values, tokens, and other credentials in captured command output (for example `session=<redacted>`).
|
|
167
|
+
- When live verification against a real instance informs a doc or ticket, describe the behavior, not the instance.
|
|
168
|
+
|
|
169
|
+
## Ask-first boundaries
|
|
170
|
+
|
|
171
|
+
Ask before:
|
|
172
|
+
- adding or changing dependencies
|
|
173
|
+
- changing CLI defaults or JSON output contracts
|
|
174
|
+
- changing packaging, build, or `devenv` behavior
|
|
175
|
+
- expanding from read-only into write-capable Superset operations
|
|
176
|
+
- making broad architectural refactors
|
|
177
|
+
- running live verification that goes beyond minimal read-only checks
|
|
178
|
+
|
|
179
|
+
## Write-command contract
|
|
180
|
+
|
|
181
|
+
Every CLI command that mutates Superset state (create, update, delete via the API) must require an explicit `--allow-write` flag on every invocation. Default off.
|
|
182
|
+
|
|
183
|
+
Rules:
|
|
184
|
+
- `--allow-write` is per-invocation. It is never persisted in the config file, never read from an environment variable, and never defaulted on.
|
|
185
|
+
- Without the flag, the command exits non-zero with a message naming the missing flag and the mutation it would have performed (for example: `"This would delete dashboard 7. Re-run with --allow-write to perform the write."`).
|
|
186
|
+
- The check lives in a shared helper in `src/superset_cli/cli.py` so individual commands cannot forget it.
|
|
187
|
+
- Help text for every write command must state "Required to actually perform the write. Without it the command is a dry-run."
|
|
188
|
+
- The check applies to every write command, including ones that look idempotent (for example setting a tag).
|
|
189
|
+
- `--allow-write` is never granted by a confirmation prompt, a config flag, or a parent command — only by the literal CLI argument on the same invocation.
|
|
190
|
+
|
|
191
|
+
This rule exists so that unintended write calls (typos, copy-paste mistakes, agent overshoot) fail safe, human and agent operators see the same friction, and the read-only product posture remains visible in every write surface that ever gets added.
|
|
192
|
+
|
|
193
|
+
See [`docs/decisions/0009-write-command-explicit-opt-in.md`](docs/decisions/0009-write-command-explicit-opt-in.md) for the full rationale and alternatives considered.
|
|
194
|
+
|
|
195
|
+
## Never do these things
|
|
196
|
+
|
|
197
|
+
- never fabricate results
|
|
198
|
+
- never claim tests passed without running them
|
|
199
|
+
- never claim a file contains something you did not re-read
|
|
200
|
+
- never remove tests or checks to make the suite pass
|
|
201
|
+
- never commit secrets, auth state, or browser profile data
|
|
202
|
+
- never use `git push`
|
|
203
|
+
- never create a pull request or merge request
|
|
204
|
+
- never perform destructive or write actions against Superset without explicit user instruction
|
|
205
|
+
|
|
206
|
+
## Definition of done
|
|
207
|
+
|
|
208
|
+
A task is not done until all relevant items below are true:
|
|
209
|
+
|
|
210
|
+
- a written plan exists for any non-trivial change
|
|
211
|
+
- the plan ends with a `Decision follow-up` section
|
|
212
|
+
- failing tests were written first
|
|
213
|
+
- implementation is minimal and scoped
|
|
214
|
+
- targeted tests pass
|
|
215
|
+
- `uv run pytest -v` passes for code changes
|
|
216
|
+
- relevant smoke checks were run
|
|
217
|
+
- docs were updated if behavior or workflow changed
|
|
218
|
+
- `docs/index.md` was updated if top-level documentation areas or doc roles changed
|
|
219
|
+
- `docs/architecture/README.md` was updated if structural mappings or module responsibilities changed
|
|
220
|
+
- decision records were added or updated if durable technical choices changed
|
|
221
|
+
- the final report includes:
|
|
222
|
+
- files changed
|
|
223
|
+
- commands run
|
|
224
|
+
- actual verification results
|
|
225
|
+
- consulted decision records, or an explicit statement that none were relevant
|
|
226
|
+
- any remaining risks or unverified areas
|
|
227
|
+
|
|
228
|
+
## When stuck
|
|
229
|
+
|
|
230
|
+
If progress stalls:
|
|
231
|
+
- stop and summarize what is known
|
|
232
|
+
- identify the exact uncertainty
|
|
233
|
+
- research or inspect the narrow missing piece
|
|
234
|
+
- prefer a smaller verified change over a larger speculative one
|
|
235
|
+
- ask the user when a decision affects scope, contract, or risk
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Robin Rittsteiger
|
|
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.
|