Feature/labimp 7661 create gcs connector - #14
Conversation
…ntegrate-the-backend-api-into-sdk
…ataset-management-in-sdk
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
To use Codex here, create a Codex account and connect to github. |
| "HEAD", | ||
| "GET", | ||
| "PUT", | ||
| "DELETE", |
There was a problem hiding this comment.
we don't support delete op
There was a problem hiding this comment.
so delete_dataset is also not required?
| connection_type=connection_type, | ||
| credentials=credentials, | ||
| ) | ||
| except ValidationError as e: |
There was a problem hiding this comment.
no need to wrap the validation errors, as they are more meaningful
| create_dataset_parameters: Dict[str, Any] = {} | ||
|
|
||
|
|
||
| class LabellerrClient: |
There was a problem hiding this comment.
suggestion - we can have the log_api_call and handle_api_errors decorators as part of this class itself so that all the public methods don't have to use this decorator. this will be enforced by default. we can add a class level decorator for example.
if not possible then we can go with the linter based approach.
| raise LabellerrError(str(e)) | ||
|
|
||
| unique_id = str(uuid.uuid4()) | ||
| url = f"{constants.BASE_URL}/users/remove_user_from_project?client_id={params.client_id}&project_id={params.project_id}&uuid={unique_id}" |
There was a problem hiding this comment.
@ximihoque please create backend API for this to remove user from a project.
| raise LabellerrError(str(e)) | ||
|
|
||
| unique_id = str(uuid.uuid4()) | ||
| url = f"{constants.BASE_URL}/users/change_user_role?client_id={params.client_id}&project_id={params.project_id}&uuid={unique_id}" |
There was a problem hiding this comment.
not sure, if this api exists
|
|
||
| @log_method_call(include_params=False) | ||
| @handle_api_errors | ||
| def list_file( |
There was a problem hiding this comment.
function name - search_files
structure of the search queries needs to be defined here. also a docstring is needed. examples will be put in the documentation. but couple of examples can be put here in the docstring.
| int(annotation_rotation_count or 0) > 1 | ||
| and int(client_review_rotation_count or 0) != 0 | ||
| ): | ||
| raise LabellerrError( |
There was a problem hiding this comment.
raise ValidationError in case of any breaking validations
| @@ -96,6 +105,7 @@ def validate_file_exists(file_path: str) -> str: | |||
| :raises LabellerrError: If file doesn't exist | |||
| """ | |||
| import os | |||
There was a problem hiding this comment.
imports on the top of the file
No description provided.