Skip to content

Conversation

@paulnoirel
Copy link
Contributor

@paulnoirel paulnoirel commented Dec 31, 2025

Description

  • Integration: API key creation role handling (libs/labelbox/src/labelbox/schema/api_key.py)

    • Fixed role-name formatting mismatch between client.get_roles() (normalized names like PROJECT_ADMIN) and API key creation (server role names like Project Admin).
    • Ensured Role objects from client.get_roles() are mapped back to the correct server role name before calling the create-API-key mutation.
    • Enforced that string role inputs must match the server role name exactly (case-sensitive), aligning with integration test expectations.
  • Integration: UserGroup deletion invalid-id handling (libs/labelbox/src/labelbox/schema/user_group.py)

    • Added UUID-format validation in UserGroup.delete() so invalid IDs raise MalformedQueryException("Invalid user group id") instead of surfacing backend UUID parsing errors.
  • Integration: model-setup-complete message drift (test update)

    • Updated libs/labelbox/tests/integration/test_project_set_model_setup_complete.py to accept either backend error message for the “model setup complete” precondition when deleting a ProjectModelConfig.
  • Lint (libs/labelbox/src/labelbox/client.py and libs/labelbox/src/labelbox/schema/project.py)

    • Fix lint error from previous commit

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Document change (fix typo or modifying any markdown files, code comments or anything in the examples folder only)

All Submissions

  • Have you followed the guidelines in our Contributing document?
  • Have you provided a description?
  • Are your changes properly formatted?

New Feature Submissions

  • Does your submission pass tests?
  • Have you added thorough tests for your new feature?
  • Have you commented your code, particularly in hard-to-understand areas?
  • Have you added a Docstring?

Changes to Core Features

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you updated any code comments, as applicable?

Note

  • API keys: Preserve server-provided role names and map SDK Role objects back to exact server role names; string roles must match case-sensitively. Use server_role_name in the createApiKey mutation.
  • User groups: Validate UserGroup.delete() id as UUID and raise MalformedQueryException on invalid input.
  • Tests: Relax error assertion in test_project_set_model_setup_complete.py to accept either backend message; update test_user_group.py to use UUID-formatted ids.
  • Lint/formatting: Minor whitespace/format fixes in client.py and project.py (e.g., labels(...) signature wrapping, slice spacing).

Written by Cursor Bugbot for commit a58da5b. This will update automatically on new commits. Configure here.

@paulnoirel paulnoirel force-pushed the pno/PLT-0-fix-lint-and-integration-errors branch from f430e3e to 34dd939 Compare December 31, 2025 17:53
@paulnoirel paulnoirel marked this pull request as ready for review December 31, 2025 18:09
@paulnoirel paulnoirel requested a review from a team as a code owner December 31, 2025 18:09
@paulnoirel paulnoirel force-pushed the pno/PLT-0-fix-lint-and-integration-errors branch from 34dd939 to a58da5b Compare December 31, 2025 18:11
@paulnoirel paulnoirel changed the title Pno/plt 0 fix lint and integration errors Fix lint and integration errors Dec 31, 2025
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