Skip to content

refactor: adjust get_version and get_version_history method name#491

Open
thiagobomfin-galileo wants to merge 2 commits intomainfrom
fix/sc-55345/change-get-version-method-name
Open

refactor: adjust get_version and get_version_history method name#491
thiagobomfin-galileo wants to merge 2 commits intomainfrom
fix/sc-55345/change-get-version-method-name

Conversation

@thiagobomfin-galileo
Copy link
Contributor

@thiagobomfin-galileo thiagobomfin-galileo commented Mar 3, 2026

User description

Shortcut:
NewSDK: Rename get_version to load_version for clarity

Description:
Adjust get_version and get_version_history methods names to load_version and load_version_history for more clarity
Unit tests already cover tests cases

Tests:

  • Unit Tests Added
  • E2E Test Added (if it's a user-facing feature, or fixing a bug)


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Clarify dataset version handling by renaming get_version/get_version_history to load_version/load_version_history so the APIs emphasize that they mutate the current dataset object. Update the Dataset service helpers and related unit tests to call the renamed methods while preserving previous functionality.

Latest Contributors(2)
UserCommitDate
bipin@galileo.aifix-normalize-ground_t...February 18, 2026
vamaq@users.noreply.gi...fix-dataset-204-respon...February 07, 2026
This pull request is reviewed by Baz. Review like a pro on (Baz).

@thiagobomfin-galileo thiagobomfin-galileo marked this pull request as ready for review March 3, 2026 20:07
@thiagobomfin-galileo thiagobomfin-galileo requested a review from a team as a code owner March 3, 2026 20:07
@thiagobomfin-galileo thiagobomfin-galileo self-assigned this Mar 3, 2026
@thiagobomfin-galileo thiagobomfin-galileo force-pushed the fix/sc-55345/change-get-version-method-name branch from ae4dc14 to dc157e9 Compare March 3, 2026 20:22
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.03%. Comparing base (9b60fa3) to head (b101f00).

Files with missing lines Patch % Lines
src/galileo/__future__/dataset.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #491   +/-   ##
=======================================
  Coverage   82.03%   82.03%           
=======================================
  Files          96       96           
  Lines        9274     9274           
=======================================
  Hits         7608     7608           
  Misses       1666     1666           

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

Copy link
Contributor

@fernandocorreia-galileo fernandocorreia-galileo left a comment

Choose a reason for hiding this comment

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

@thiagobomfin-galileo it's looking like this was reported by mistake. I asked for a clarification, let's put this on hold for now.

Comment on lines +156 to 159
def get_version(self, version_index: int) -> DatasetContent:
return get_dataset_version_content_datasets_dataset_id_versions_version_index_content_get.sync(
dataset_id=self.dataset.id, version_index=version_index, client=self.config.api_client
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Dataset.load_version was removed/renamed to Dataset.get_version without providing a compatibility shim, so any external client still calling load_version now gets AttributeError and the public SDK API is broken; can we keep load_version (e.g. alias it to get_version or leave both names) or document/deprecate before removal?

Finding type: Breaking Changes


Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents:

In src/galileo/datasets.py around lines 156-159, the Dataset.load_version method was
removed/renamed to get_version which breaks external clients. Restore backward
compatibility by adding a load_version method that delegates to get_version (for
example: def load_version(self, version_index: int) -> DatasetContent: return
self.get_version(version_index)) and include a DeprecationWarning in the method
docstring or via warnings.warn to signal the rename. This will keep the public SDK API
stable while allowing consumers to migrate.

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