Skip to content

refactor: moving project.py to root, away from __future__#506

Open
thiagobomfin-galileo wants to merge 4 commits intomainfrom
feat/sc-57986-move-project-from-future-to-root
Open

refactor: moving project.py to root, away from __future__#506
thiagobomfin-galileo wants to merge 4 commits intomainfrom
feat/sc-57986-move-project-from-future-to-root

Conversation

@thiagobomfin-galileo
Copy link
Contributor

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

User description

Shortcut:
Migrate SDK code from the future package to the SDK root

Description:

  • Moves Project, Collaborator, CollaboratorRole, shared base classes (SyncState, StateManagementMixin), and shared exceptions from galileo.future to galileo.project, galileo.collaborator, galileo.shared.base and galileo.shared.exceptions
  • Converts the original future modules into thin re-exports so existing from galileo.future import Project imports continue to work without any warnings (deprecation will be added in a final PR once all future modules are migrated)
  • Adds @deprecated annotations to 8 legacy convenience functions in projects.py (get_project, create_project, list_projects, delete_project, and collaborator helpers)
  • Adds Project, Collaborator, CollaboratorRole, and SyncState to galileo.init exports

Motivation

Part of the initiative to promote future domain objects to first-class SDK citizens. After this change, from galileo.project import Project is the canonical import path. The future package continues to
work identically — no user-facing breakage.

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:
Promote Project, Collaborator, CollaboratorRole, StateManagementMixin/SyncState, and the shared exceptions into canonical root modules so CRUD, collaborator, and lifecycle helpers now live under galileo.project, galileo.collaborator, and galileo.shared while preserving their behavior. Ensure backward compatibility by re-exporting those symbols through galileo.future, decorating legacy helpers with @deprecated, and covering the import surface with compatibility tests.

TopicDetails
Project Flow Describe migrating Project, Collaborator, the shared lifecycle mixin/exceptions, and the helper wrappers into canonical root modules, keeping CRUD and collaborator flows intact while adding @deprecated helpers and root exports.
Modified files (8)
  • poetry.lock
  • pyproject.toml
  • src/galileo/__init__.py
  • src/galileo/collaborator.py
  • src/galileo/project.py
  • src/galileo/projects.py
  • src/galileo/shared/base.py
  • src/galileo/shared/exceptions.py
Latest Contributors(2)
UserCommitDate
pratyusha@galileo.aichore-bump-galileo-cor...March 13, 2026
ci@rungalileo.iochore-release-v1.50.1March 13, 2026
Compat Surface Maintain the galileo.__future__ re-export layer and compatibility tests so legacy import paths continue to resolve to the new root classes while the test suite validates the migrated symbols.
Modified files (17)
  • src/galileo/__future__/__init__.py
  • src/galileo/__future__/collaborator.py
  • src/galileo/__future__/configuration.py
  • src/galileo/__future__/dataset.py
  • src/galileo/__future__/experiment.py
  • src/galileo/__future__/integration.py
  • src/galileo/__future__/log_stream.py
  • src/galileo/__future__/metric.py
  • src/galileo/__future__/project.py
  • src/galileo/__future__/prompt.py
  • src/galileo/__future__/provider.py
  • src/galileo/__future__/shared/base.py
  • src/galileo/__future__/shared/exceptions.py
  • tests/future/test_experiment.py
  • tests/future/test_project.py
  • tests/test_api_headers.py
  • tests/test_backward_compat_future.py
Latest Contributors(2)
UserCommitDate
thiago.bomfin@galileo.aifix-add-default-consol...March 05, 2026
vamaq@users.noreply.gi...fix-Define-explicit-er...February 03, 2026
Other Other files
Modified files (6)
  • src/galileo/__future__/shared/column.py
  • src/galileo/decorator.py
  • src/galileo/experiments.py
  • src/galileo/prompts.py
  • src/galileo/shared/__init__.py
  • src/galileo/utils/validations.py
Latest Contributors(2)
UserCommitDate
Focadecombatefix-move-dataset-conte...March 13, 2026
bipin@galileo.aifeat-switch-run_experi...March 13, 2026
This pull request is reviewed by Baz. Review like a pro on (Baz).

@thiagobomfin-galileo thiagobomfin-galileo changed the title Moving project.py to root, away from __future__ refactor: moving project.py to root, away from __future__ Mar 13, 2026
@thiagobomfin-galileo thiagobomfin-galileo force-pushed the feat/sc-57986-move-project-from-future-to-root branch from dcfad5c to 405e311 Compare March 13, 2026 16:56
@thiagobomfin-galileo thiagobomfin-galileo self-assigned this Mar 13, 2026
@thiagobomfin-galileo thiagobomfin-galileo force-pushed the feat/sc-57986-move-project-from-future-to-root branch 3 times, most recently from bf17e75 to 075ac99 Compare March 13, 2026 17:11
@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 86.31090% with 59 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.15%. Comparing base (66e86cd) to head (ddd1b91).

Files with missing lines Patch % Lines
src/galileo/project.py 83.41% 36 Missing ⚠️
src/galileo/collaborator.py 85.85% 14 Missing ⚠️
src/galileo/shared/base.py 90.24% 4 Missing ⚠️
src/galileo/shared/exceptions.py 87.50% 3 Missing ⚠️
src/galileo/__future__/project.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #506      +/-   ##
==========================================
+ Coverage   82.13%   82.15%   +0.02%     
==========================================
  Files          96      100       +4     
  Lines        9282     9304      +22     
==========================================
+ Hits         7624     7644      +20     
- Misses       1658     1660       +2     

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

@thiagobomfin-galileo
Copy link
Contributor Author

Codecov Report

❌ Patch coverage is 86.15023% with 59 lines in your changes missing coverage. Please review. ✅ Project coverage is 82.15%. Comparing base (30b381a) to head (075ac99).

Files with missing lines Patch % Lines
src/galileo/project.py 83.25% 36 Missing ⚠️
src/galileo/collaborator.py 85.85% 14 Missing ⚠️
src/galileo/shared/base.py 90.24% 4 Missing ⚠️
src/galileo/shared/exceptions.py 87.50% 3 Missing ⚠️
src/galileo/future/project.py 0.00% 2 Missing ⚠️
Additional details and impacted files

@@            Coverage Diff             @@
##             main     #506      +/-   ##
==========================================
+ Coverage   82.13%   82.15%   +0.01%     
==========================================
  Files          96      100       +4     
  Lines        9282     9303      +21     
==========================================
+ Hits         7624     7643      +19     
- Misses       1658     1660       +2     

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

🚀 New features to boost your workflow:

Those are refering to lines that were already missing test coverage when the files were inside future, not sure if we should action on this warning or not

@thiagobomfin-galileo thiagobomfin-galileo force-pushed the feat/sc-57986-move-project-from-future-to-root branch from 075ac99 to d9c2b1c Compare March 16, 2026 13:03
@thiagobomfin-galileo thiagobomfin-galileo marked this pull request as ready for review March 16, 2026 13:03
@thiagobomfin-galileo thiagobomfin-galileo requested a review from a team as a code owner March 16, 2026 13:03
@thiagobomfin-galileo thiagobomfin-galileo force-pushed the feat/sc-57986-move-project-from-future-to-root branch from 9fe26e7 to ddd1b91 Compare March 16, 2026 17:04
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.

Excellent job!

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