Skip to content

Commit 23dca63

Browse files
committed
feat: add AAC YAML support, replace Node.js CLI
Add native support for Analytics-as-Code (AAC) YAMLs in the Python SDK, replacing the experimental Node.js-based gdc CLI with a pure Python implementation using the gooddata-code-convertors WASM package. - New aac.py module with individual conversion functions and workspace-level load/store for all supported AAC types (datasets, metrics, visualizations, dashboards, plugins, attribute hierarchies) - Rewritten gdc CLI: no npm/Node.js dependency, reads gooddata.yaml directly - Config alignment: SDK now understands VSCode plugin config fields (workspace_id, data_source, source_dir) - Extended CatalogWorkspaceService with load_and_put_aac_workspace and get_and_store_aac_workspace methods - 24 tests covering conversions, format detection, config parsing, and CLI JIRA: DX-326 risk: low
1 parent 35605f6 commit 23dca63

File tree

25 files changed

+1484
-245
lines changed

25 files changed

+1484
-245
lines changed

.aida/validation_policy.yaml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# AIDA validation policy
33
#
44
# This file wires domains -> pipelines -> steps (command_id + processor_id).
5-
# Initially empty (validate may no-op until you configure routes).
65
version: 1
76
validation_policy:
87
codegen:
@@ -26,22 +25,16 @@ validation_policy:
2625
pipelines:
2726
package-fast:
2827
steps:
29-
- command_id: package-lint
30-
processor_id: passthrough
31-
- command_id: package-type-check
32-
processor_id: passthrough
33-
- command_id: package-test-py314
34-
processor_id: pytest
28+
- command_id: package-validate
29+
processor_id: external_json
30+
repo-fast:
31+
steps:
32+
- command_id: package-validate-no-tests
33+
processor_id: external_json
3534
api-client-fast:
3635
steps:
3736
- command_id: api-client-tests
3837
processor_id: pytest
39-
repo-fast:
40-
steps:
41-
- command_id: workspace-lint
42-
processor_id: passthrough
43-
- command_id: workspace-type-check
44-
processor_id: passthrough
4538
aida-config:
4639
steps:
4740
- command_id: aida-doctor

.aida/validation_registry.yaml

Lines changed: 27 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,36 @@ version: 1
66
registry:
77
includes: []
88
commands:
9-
package-lint:
9+
package-validate:
1010
argv:
11-
- make
12-
- -C
13-
- '{root}'
14-
- lint
11+
- bash
12+
- '{workspace_root}/scripts/validate_python.sh'
13+
- --project-path
14+
- '{workspace_root}/{root}'
15+
- --workspace-root
16+
- '{workspace_root}'
17+
- --scope
18+
- '{scope}'
19+
- --auto-fix
20+
- "true"
1521
cwd: '{workspace_root}'
16-
package-type-check:
22+
timeout_sec: 900
23+
package-validate-no-tests:
1724
argv:
18-
- make
19-
- -C
20-
- '{root}'
21-
- type-check
22-
cwd: '{workspace_root}'
23-
package-test-py314:
24-
argv:
25-
- make
26-
- -C
27-
- '{root}'
28-
- test
29-
cwd: '{workspace_root}'
30-
env:
31-
TEST_ENVS: py314
32-
workspace-lint:
33-
argv:
34-
- make
35-
- lint
36-
cwd: '{workspace_root}'
37-
workspace-type-check:
38-
argv:
39-
- make
40-
- type-check
25+
- bash
26+
- '{workspace_root}/scripts/validate_python.sh'
27+
- --project-path
28+
- '{workspace_root}/{root}'
29+
- --workspace-root
30+
- '{workspace_root}'
31+
- --scope
32+
- '{scope}'
33+
- --auto-fix
34+
- "true"
35+
- --steps-csv
36+
- format,lint,types
4137
cwd: '{workspace_root}'
38+
timeout_sec: 600
4239
api-client-tests:
4340
argv:
4441
- uv
@@ -52,10 +49,4 @@ registry:
5249
- aida-mcp
5350
- doctor
5451
cwd: '{workspace_root}'
55-
processors:
56-
passthrough:
57-
kind: builtin
58-
builtin_id: passthrough
59-
pytest:
60-
kind: builtin
61-
builtin_id: pytest
52+
processors: {}

packages/gooddata-sdk/pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ dependencies = [
3434
"brotli==1.2.0",
3535
"requests~=2.32.0",
3636
"python-dotenv>=1.0.0,<2.0.0",
37+
"gooddata-code-convertors",
3738
]
3839
classifiers = [
3940
"Development Status :: 5 - Production/Stable",
@@ -75,9 +76,6 @@ allowed-unresolved-imports = ["gooddata_api_client.**"]
7576

7677
[tool.hatch.build.targets.wheel]
7778
packages = ["src/gooddata_sdk"]
78-
include = [
79-
"src/gooddata_sdk/cli/package.json",
80-
]
8179

8280
[tool.coverage.run]
8381
source = ["gooddata_sdk"]

packages/gooddata-sdk/src/gooddata_sdk/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,25 @@
180180
CatalogWorkspacePermissionAssignment,
181181
)
182182
from gooddata_sdk.catalog.validate_by_item import CatalogValidateByItem
183+
from gooddata_sdk.catalog.workspace.aac import (
184+
aac_attribute_hierarchy_to_declarative,
185+
aac_dashboard_to_declarative,
186+
aac_dataset_to_declarative,
187+
aac_date_dataset_to_declarative,
188+
aac_metric_to_declarative,
189+
aac_plugin_to_declarative,
190+
aac_visualization_to_declarative,
191+
declarative_attribute_hierarchy_to_aac,
192+
declarative_dashboard_to_aac,
193+
declarative_dataset_to_aac,
194+
declarative_date_instance_to_aac,
195+
declarative_metric_to_aac,
196+
declarative_plugin_to_aac,
197+
declarative_visualization_to_aac,
198+
detect_yaml_format,
199+
load_aac_workspace_from_disk,
200+
store_aac_workspace_to_disk,
201+
)
183202
from gooddata_sdk.catalog.workspace.content_service import CatalogWorkspaceContent, CatalogWorkspaceContentService
184203
from gooddata_sdk.catalog.workspace.declarative_model.workspace.analytics_model.analytics_model import (
185204
CatalogDeclarativeAnalytics,

0 commit comments

Comments
 (0)