fix: Add Team docstring examples, delete_invitation method, and complete mkdocs reference - #1457
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The remaining documentation wording nit is non-blocking.
Review effort: Lite
Findings: None
What changed in this PR
Adds Team documentation examples, exposes invitation deletion, and completes MkDocs references.
Changes:
- Added sync/async Team docstring examples.
- Added
delete_invitationmethods and test coverage. - Updated Team reference pages and invitation documentation.
| File | Summary |
|---|---|
tests/unit/synapseclient/models/async/unit_test_team_async.py |
Added invitation deletion test. |
synapseclient/models/team.py |
Added Team examples and invitation deletion wrapper. |
synapseclient/models/protocols/team_protocol.py |
Added protocol method and examples. |
synapseclient/api/team_services.py |
Corrected invitation return documentation; summary wording still needs alignment. |
docs/reference/experimental/sync/team.md |
Added missing sync members. |
docs/reference/experimental/async/team.md |
Added missing async members. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
BryanFauble
approved these changes
Sep 24, 2026
BryanFauble
left a comment
Member
There was a problem hiding this comment.
Thank you for fixing these!
andrewelamb
approved these changes
Sep 25, 2026
This was referenced Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
discovered while working on: https://sagebionetworks.jira.com/browse/SYNR-1624
Several methods on
Teamlacked docstring examples in bothmodels/team.pyandmodels/protocols/team_protocol.py, unlike other models such asEvaluation. Separately,delete_membership_invitationinapi/team_services.pyexisted at the API layer but was never exposed on theTeammodel, so it never appeared in the mkdocs reference. Auditing allTeammethods against the docs also turned upget_async/get, which existed on the model but was missing from themembers:lists indocs/reference/experimental/{sync,async}/team.md.Solution:
Example:blocks (mkdocstrings admonition format) to everyTeamasync method and to the class docstring inteam.py, plus matching sync examples onTeamSynchronousProtocolinteam_protocol.py, following the pattern used inevaluation.py/evaluation_protocol.py.delete_invitation_async/delete_invitation: Added astaticmethodonTeam(and matching protocol signature) that wraps the existingdelete_membership_invitationAPI function, so an open invitation can be cancelled viaTeam.delete_invitation_async(invitation_id=...).delete_invitation(_async)and the previously-missingget(_async)to themembers:lists in bothteam.mdreference pages so every publicTeammethod now renders in the API reference.get_team_open_invitationsinteam_services.pyreturnsMembershipInvitationdictionaries, notMembershipRequest.Testing:
python -m pytest -q tests/unit/synapseclient/models/async/unit_test_team_async.py— 13 passed (addedtest_delete_invitation).🤖 Generated with Claude Code