Skip to content

feat(gooddata-sdk): [AUTO] Add GEO_ICON label, GEO_ICON_SHEET setting, CustomGeoCollection metadata#1574

Open
yenkins-admin wants to merge 1 commit intomasterfrom
auto/openapi-sync-C011-20260420-r82171
Open

feat(gooddata-sdk): [AUTO] Add GEO_ICON label, GEO_ICON_SHEET setting, CustomGeoCollection metadata#1574
yenkins-admin wants to merge 1 commit intomasterfrom
auto/openapi-sync-C011-20260420-r82171

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Summary

Added SDK wrappers for CustomGeoCollection (entity + declarative models with description and name fields), service methods in CatalogOrganizationService (list/get/create_or_update/delete for entity API, get_declarative/put_declarative for layout API), public exports in init.py, and unit tests. GEO_ICON and GEO_ICON_SHEET required no SDK changes since they are already present in the generated API client's enum values.

Impact: new_feature | Services: gooddata-metadata-client

Files changed

  • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/entity_model/custom_geo_collection.py
  • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/layout/custom_geo_collection.py
  • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/service.py
  • packages/gooddata-sdk/src/gooddata_sdk/__init__.py
  • packages/gooddata-sdk/tests/catalog/test_catalog_organization.py

Agent decisions

Decisions (4)

GEO_ICON and GEO_ICON_SHEET enum values — No SDK changes needed for these two enum values

  • Alternatives: Add constant lists to the SDK for documentation purposes
  • Why: GEO_ICON is already in the generated API client (json_api_label_out_attributes.py, declarative_label.py). SDK's CatalogDeclarativeLabel.value_type is str|None without validation. GEO_ICON_SHEET is already in JsonApiOrganizationSettingInAttributes.allowed_values which CatalogWorkspaceSetting's validator references.

CustomGeoCollection SDK wrapper scope — Create both entity model (CatalogCustomGeoCollection) and declarative layout model (CatalogDeclarativeCustomGeoCollection)

  • Alternatives: Only add CatalogDeclarativeCustomGeoCollection for the layout API, Defer since there was no prior SDK wrapper
  • Why: API client exposes full CRUD for customGeoCollections plus layout API. sdk_impact=new_feature. Matches pattern of similar entities (JWK, CSP directive, export template).

from_api implementation strategy — Use Base.from_api (cattrs.structure) without override

  • Alternatives: Write a custom from_api override
  • Why: Flat model structure with two optional string fields. Generated API client models implement getitem so cattrs.structure works. Matches CatalogJwk and CatalogExportTemplate patterns.

layout module placement — CatalogDeclarativeCustomGeoCollection in catalog/organization/layout/custom_geo_collection.py

  • Alternatives: Put it in catalog/organization/entity_model/
  • Why: Existing org layout models live in catalog/organization/layout/. Declarative model is used with layout API (/api/v1/layout/customGeoCollections).
Assumptions to verify (4)
  • GEO_ICON already present in generated api client (json_api_label_out_attributes.py, declarative_label.py) — confirmed by grep.
  • GEO_ICON_SHEET already in JsonApiOrganizationSettingInAttributes.allowed_values — confirmed by file read.
  • DeclarativeCustomGeoCollection.id takes a required positional arg; Base.to_api()/from_dict path handles this via validate_and_convert_types.
  • Custom geo collections entity API is org-scoped (no workspace_id), consistent with endpoint /api/v1/entities/customGeoCollections.
Risks (2)
  • CatalogCustomGeoCollection.to_api() relies on Base.to_api() calling JsonApiCustomGeoCollectionIn.from_dict(snake_dict, camel_case=False). If the generated model's from_dict doesn't recursively convert the nested attributes dict, integration tests will fail.
  • get_declarative_custom_geo_collections uses hasattr guard — if the API returns a different structure the list will silently be empty.
Layers touched (3)
  • entity_model — New CatalogCustomGeoCollection (entity API) and CatalogDeclarativeCustomGeoCollection (layout API) with description and name fields
    • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/entity_model/custom_geo_collection.py
    • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/layout/custom_geo_collection.py
  • public_api — Exported new classes; added list/get/create_or_update/delete (entity) and get_declarative/put_declarative (layout) service methods
    • packages/gooddata-sdk/src/gooddata_sdk/__init__.py
    • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/service.py
  • tests — Unit tests for model construction and to_api() serialization; no cassettes needed
    • packages/gooddata-sdk/tests/catalog/test_catalog_organization.py

Source commits (gdc-nas)

  • f9a6963 Merge pull request #21320 from Vojtasii/vto/geo-icon
  • 8dedfa1 Merge pull request #21032 from Vojtasii/vto/geo
  • e4fc01b Merge pull request #21508 from Vojtasii/vto/geo-icon-sheet
  • 80820c5 Merge pull request #21585 from Vojtasii/vto/geo-config
  • e208d68 Merge pull request #20263 from hkad98/jkd/custom-geo-name
OpenAPI diff
       "LabelType": {
         "enum": [
+          "GEO_ICON",
           "ATTRIBUTE", "GEO", ...
         ]
       },
       "WorkspaceSetting": {
         "enum": [
+          "GEO_ICON_SHEET",
           ...
         ]
       },
       "CustomGeoCollection": {
         "properties": {
+          "description": { "type": "string" },
+          "name": { "type": "string" },
           "features": { ... }
         }
       }

Workflow run


Generated by SDK OpenAPI Sync workflow

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 69.86301% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.62%. Comparing base (c00ca3b) to head (bc47353).
⚠️ Report is 170 commits behind head on master.

Files with missing lines Patch % Lines
...k/src/gooddata_sdk/catalog/organization/service.py 33.33% 20 Missing ⚠️
...organization/entity_model/custom_geo_collection.py 93.10% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1574       +/-   ##
===========================================
+ Coverage    0.00%   78.62%   +78.62%     
===========================================
  Files         158      232       +74     
  Lines       11048    15478     +4430     
===========================================
+ Hits            0    12169    +12169     
+ Misses      11048     3309     -7739     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant