Skip to content

Conversation

@bradhe
Copy link
Contributor

@bradhe bradhe commented Apr 28, 2025

  • Fixes an SDK bug regarding an out-of-date API client
  • Add test coverage for the SDK
  • Bumps version to v0.3.10

@bradhe bradhe requested review from alitouka, Copilot and sankroh April 28, 2025 18:39
Copy link
Contributor

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 PR fixes an SDK bug by updating the API client and endpoint functions to use a current API specification. It also adds test coverage for the SDK and bumps the version to v0.3.10.

  • Refactors endpoint functions to use a unified "body" parameter instead of "json_body".
  • Updates client import usage and error handling for unexpected HTTP statuses.
  • Adjusts client and endpoint parameter naming (e.g. renaming "name" to "slug") and improves the test workflow.

Reviewed Changes

Copilot reviewed 183 out of 184 changed files in this pull request and generated no comments.

File Description
src/tower/tower_api_client/api/default/* Refactors endpoint functions, updating parameter names and request construction to support the new API client behavior
src/tower/_client.py Updates parameter names for consistency and uses a constant for wait time
pyproject.toml & .github/workflows/test-python.yml Updates development dependencies and CI workflow for enhanced test coverage
Files not reviewed (1)
  • scripts/generate-python-api-client.sh: Language not supported
Comments suppressed due to low confidence (2)

src/tower/tower_api_client/api/default/create_catalog.py:19

  • [nitpick] The local variable '_kwargs' is used to store request parameters. Consider renaming it to 'kwargs' to follow typical Python naming conventions and improve clarity.
_kwargs: dict[str, Any] = {

src/tower/tower_api_client/api/default/delete_api_key.py:40

  • Consider adding tests that simulate non-200 responses to verify that errors.UnexpectedStatus is raised as expected when client.raise_on_unexpected_status is True.
if client.raise_on_unexpected_status:

@bradhe bradhe merged commit e22a31f into main Apr 29, 2025
4 checks passed
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