Skip to content

feat: add new granularities - #1701

Open
okrcmaGD wants to merge 1 commit into
gooddata:masterfrom
okrcmaGD:okrc/cq-2758
Open

feat: add new granularities#1701
okrcmaGD wants to merge 1 commit into
gooddata:masterfrom
okrcmaGD:okrc/cq-2758

Conversation

@okrcmaGD

@okrcmaGD okrcmaGD commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

JIRA: CQ-2758
risk: low

Summary by CodeRabbit

  • New Features
    • Added support for second-level date granularity, including seconds, seconds within a minute, seconds within a day, and minutes within a day.
    • Enabled second-precision datetime conversion, visualization, and filtering across supported SDK and data integrations.
  • Documentation
    • Updated datetime conversion guidance to include second-level timestamps.
  • Tests
    • Added coverage for second-precision timestamp conversion and expanded date-filter granularity validation.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a77b69b3-b514-4adc-9a88-a5ee0b5734e8

📥 Commits

Reviewing files that changed from the base of the PR and between 17bcb5c and c67add6.

📒 Files selected for processing (8)
  • packages/gooddata-flexconnect/json_schemas/execution-context/date-granularity.json
  • packages/gooddata-pandas/src/gooddata_pandas/arrow_convertor.py
  • packages/gooddata-pandas/tests/utils/test_utils.py
  • packages/gooddata-sdk/src/gooddata_sdk/compute/model/filter.py
  • packages/gooddata-sdk/src/gooddata_sdk/type_converter.py
  • packages/gooddata-sdk/src/gooddata_sdk/visualization.py
  • packages/gooddata-sdk/tests/compute_model/test_date_filters.py
  • packages/gooddata-sdk/tests/test_type_converter.py
🚧 Files skipped from review as they are similar to previous changes (7)
  • packages/gooddata-sdk/tests/compute_model/test_date_filters.py
  • packages/gooddata-sdk/src/gooddata_sdk/compute/model/filter.py
  • packages/gooddata-pandas/tests/utils/test_utils.py
  • packages/gooddata-pandas/src/gooddata_pandas/arrow_convertor.py
  • packages/gooddata-sdk/tests/test_type_converter.py
  • packages/gooddata-flexconnect/json_schemas/execution-context/date-granularity.json
  • packages/gooddata-sdk/src/gooddata_sdk/visualization.py

📝 Walkthrough

Walkthrough

This change adds second-level and additional intra-day date granularities across the schema and SDK mappings. It updates pandas converter documentation and adds tests for relative date filters and second-precision datetime conversion.

Changes

Date granularity support

Layer / File(s) Summary
Granularity contracts and registries
packages/gooddata-flexconnect/json_schemas/execution-context/date-granularity.json, packages/gooddata-sdk/src/gooddata_sdk/compute/model/filter.py, packages/gooddata-sdk/src/gooddata_sdk/visualization.py
The schema enum, SDK filter granularity lists, and visualization mappings now include SECOND, MINUTE_OF_DAY, SECOND_OF_DAY, and SECOND_OF_MINUTE.
Conversion mappings and validation
packages/gooddata-sdk/src/gooddata_sdk/type_converter.py, packages/gooddata-pandas/src/gooddata_pandas/arrow_convertor.py, packages/gooddata-pandas/tests/utils/test_utils.py, packages/gooddata-sdk/tests/compute_model/test_date_filters.py, packages/gooddata-sdk/tests/test_type_converter.py
The DATE converter registers SECOND. Pandas documentation lists SECOND for datetime conversion and pandas.Timestamp output. Tests cover accepted granularities and second-precision timestamp conversion.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: lupko, pcerny, hkad98

Poem

Little rabbit checks the clock,
SECOND joins the time-value flock.
Schemas, SDK, and tests align,
Timestamp seconds stay precise and fine.
Hop hop — each tick is defined.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: adding new date granularities across the GoodData SDK and related packages.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.40%. Comparing base (17bcb5c) to head (c67add6).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1701   +/-   ##
=======================================
  Coverage   78.40%   78.40%           
=======================================
  Files         271      271           
  Lines       18741    18741           
=======================================
  Hits        14693    14693           
  Misses       4048     4048           

☔ View full report in Codecov by Harness.
📢 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.

@okrcmaGD
okrcmaGD force-pushed the okrc/cq-2758 branch 2 times, most recently from 736695d to 3c02cf1 Compare August 5, 2026 12:26
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

JIRA: CQ-2758
risk: low
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

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