Skip to content

Conversation

@vamaq
Copy link
Contributor

@vamaq vamaq commented Jan 19, 2026

User description

Shortcut:

Description:

This PR adds collaborator management functionality to the __future__ package, enabling SDK users to manage project access through an object-centric API. Users can now list, add, update, and remove collaborators on projects using project.collaborators, project.add_collaborator(), project.update_collaborator(), and project.remove_collaborator().

The new Collaborator class provides an immutable representation of a user's access to a project, with update() and remove() methods for direct manipulation.

The implementation follows the SDK's established patterns: Collaborator is immutable (like Model), re-exports CollaboratorRole from the auto-generated models to avoid duplication, and integrates with the existing Projects service for API calls.

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:
Introduces collaborator management functionality to the SDK, allowing users to manage project access through an object-centric API. Implements the Collaborator class and extends the Project component with methods to list, add, update, and remove project collaborators.

TopicDetails
Collaborator Model Define the Collaborator class to provide an immutable representation of user access, including update and remove methods for direct resource manipulation.
Modified files (2)
  • src/galileo/__future__/__init__.py
  • src/galileo/__future__/collaborator.py
Latest Contributors(0)
UserCommitDate
Project Integration Extend the Project class with list_collaborators, add_collaborator, update_collaborator, and remove_collaborator methods to facilitate project sharing and access control.
Modified files (6)
  • .github/workflows/codeflash.yaml
  • .pre-commit-config.yaml
  • poetry.lock
  • src/galileo/__future__/project.py
  • tests/future/conftest.py
  • tests/future/test_project.py
Latest Contributors(0)
UserCommitDate
This pull request is reviewed by Baz. Review like a pro on (Baz).

@vamaq vamaq requested a review from a team as a code owner January 19, 2026 20:26
@vamaq vamaq requested a review from savula15 January 19, 2026 20:26
@vamaq vamaq changed the title Feat/sc 44660 add project collaborators functionality feat: Add project collaborators functionality Jan 19, 2026
@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 68.42105% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.94%. Comparing base (e64d9d0) to head (58db353).

Files with missing lines Patch % Lines
src/galileo/__future__/collaborator.py 63.00% 37 Missing ⚠️
src/galileo/__future__/project.py 78.43% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #456      +/-   ##
==========================================
- Coverage   82.18%   81.94%   -0.25%     
==========================================
  Files          92       93       +1     
  Lines        8506     8658     +152     
==========================================
+ Hits         6991     7095     +104     
- Misses       1515     1563      +48     

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

@vamaq vamaq force-pushed the feat/sc-44660_add_project_collaborators_functionality branch from f5c93c8 to c6c6a40 Compare January 19, 2026 20:52
@vamaq vamaq force-pushed the feat/sc-44660_add_project_collaborators_functionality branch from bb4308f to 58db353 Compare January 20, 2026 14:39
Copy link

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

It looks like it needs more test coverage (see below). There are also a couple nits.

  • Test coverage at 68% - Codecov shows 48 uncovered lines:
    • Collaborator.update() and Collaborator.remove() error paths
    • delattr, hash, to_dict() in Collaborator
    • Direct tests for Collaborator class methods are missing
  • Missing test for collaborator methods on local-only project (test_project.py:355-363) - Tests list_collaborators and add_collaborator but doesn't test update_collaborator or remove_collaborator for local-only projects.

# Collaborator Management
# -------------------------------------------------------------------------

def list_collaborators(self) -> builtins.list[Collaborator]:

Choose a reason for hiding this comment

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

It doesn't look like it's necessary to use builtins here, list is not shadowed.

Returns users who have access to this project. Each Collaborator object
has update() and remove() methods for modifying access. You can also
use add_collaborator() on the project to add new collaborators.

Choose a reason for hiding this comment

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

collaborators property triggers API call on every access - Users may not realize project.collaborators is not cached. Consider documenting this more prominently or caching.

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.

3 participants