Skip to content

feat(gooddata-sdk): [AUTO] add grand_totals_position to ExportSettings#1451

Merged
hkad98 merged 1 commit intomasterfrom
feature/auto-P033-grand-total-position-export-settings
Mar 17, 2026
Merged

feat(gooddata-sdk): [AUTO] add grand_totals_position to ExportSettings#1451
hkad98 merged 1 commit intomasterfrom
feature/auto-P033-grand-total-position-export-settings

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

@yenkins-admin yenkins-admin commented Mar 17, 2026

Adds optional grand_totals_position field to ExportSettings so SDK users can control grand totals placement when exporting tabular data.

Problem: P033 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/23194184862

What changed in gdc-nas

A new optional grandTotalsPosition enum field (values: pinnedBottom, pinnedTop, bottom, top) was added to the Settings object of TabularExportRequest in the automation, export-controller, and metadata-api OpenAPI specs. The export-controller was updated to automatically resolve the grand totals position from the visualization object's controls property when the caller does not supply one.

  • Commit: 36a823e — feat(tabular-exporter): respect grand-total-possition in PDFs in AD
  • Related PR: #21161
  • Jira: F1-2020

What was implemented in SDK

Added GrandTotalsPosition = Literal['pinnedBottom', 'pinnedTop', 'bottom', 'top'] TypeAlias and grand_totals_position: GrandTotalsPosition | None = None field to the ExportSettings @define class. The field automatically propagates to the API request through the existing Base.to_api()client_class().from_dict() converter path. GrandTotalsPosition is exported from the public gooddata_sdk package. Parametrized unit tests were added to verify the field value propagates through to_api() and defaults to None.

Files modified

  • packages/gooddata-sdk/src/gooddata_sdk/catalog/export/request.py
  • packages/gooddata-sdk/src/gooddata_sdk/__init__.py
  • packages/gooddata-sdk/tests/export/test_export_service.py

JIRA: PENDING (Jira ticket will be created after review)
Risk: Low

Add optional `grand_totals_position` field (Literal enum: pinnedBottom, pinnedTop,
bottom, top) to `ExportSettings` to expose the `grandTotalsPosition` setting added
in the tabular-exporter OpenAPI spec. Export `GrandTotalsPosition` TypeAlias from
the public SDK API surface.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.27%. Comparing base (4dc3f87) to head (516813a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1451      +/-   ##
==========================================
+ Coverage   77.24%   77.27%   +0.02%     
==========================================
  Files         227      227              
  Lines       14672    14686      +14     
==========================================
+ Hits        11334    11349      +15     
+ Misses       3338     3337       -1     

☔ 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.

@hkad98 hkad98 merged commit b65ee3f into master Mar 17, 2026
12 checks passed
@hkad98 hkad98 deleted the feature/auto-P033-grand-total-position-export-settings branch March 17, 2026 13:54
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.

2 participants