Skip to content

Conversation

@solatis
Copy link
Contributor

@solatis solatis commented May 6, 2025

No description provided.

@solatis solatis requested a review from Copilot May 6, 2025 04:56

This comment was marked as outdated.

@solatis solatis requested a review from Copilot May 6, 2025 05:02

This comment was marked as outdated.

@solatis solatis requested a review from Copilot May 6, 2025 09:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request refactors the Python statistics module and its tests. Key changes include updating the logic in statistics retrieval functions in quasardb/stats.py, refactoring the polling mechanism in tests/test_stats.py, and deprecating the stat_type API with a warning notice.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/test_stats.py Updates to the _ensure_stats polling logic and test setup
quasardb/stats.py Refactoring of key retrieval, indexing, and metric type/unit lookup
Files not reviewed (1)
  • scripts/tests/setup: Language not supported
Comments suppressed due to low confidence (1)

quasardb/stats.py:101

  • The 'stat_type' function now only issues a deprecation warning and does not return any value, which could break existing usage that expects a stat type. Consider returning the legacy value or updating consumers to use the new API.
def stat_type(stat_id):

@solatis solatis marked this pull request as ready for review May 6, 2025 09:19
@solatis solatis requested review from igorniebylski and rodp63 May 6, 2025 09:19
Copy link
Contributor

@igorniebylski igorniebylski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@rodp63 rodp63 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 minor comments, LGTM

@solatis solatis merged commit 6f0f96b into master May 8, 2025
1 of 2 checks passed
@solatis solatis deleted the sc-16178/refactor-python-statistics-module-to-make-use branch May 8, 2025 03:50
solatis added a commit that referenced this pull request May 8, 2025
Makes use of the new server-side metric type/units, and changes the way statistics are exposed. 

This is a breaking change for users who previously used the statistics API.
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.

5 participants