Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/superannotate.sdk.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ _________________
.. autofunction:: superannotate.get_team_metadata
.. autofunction:: superannotate.invite_contributor_to_team
.. autofunction:: superannotate.delete_contributor_to_team_invitation
.. autofunction:: superannotate.search_team_contributors

----------

Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
minversion = 3.0
log_cli=true
python_files = test_*.py
addopts = -n32 --dist=loadscope
;addopts = -n32 --dist=loadscope
2 changes: 1 addition & 1 deletion src/superannotate/lib/core/usecases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2238,7 +2238,7 @@ def execute(self):
with open(mask_path, "wb") as f:
f.write(data["annotation_mask"].getbuffer())
else:
logger.info(f"There is no blue-map for the image.")
logger.info("There is no blue-map for the image.")

json_path = Path(self._destination) / data["annotation_json_filename"]
with open(json_path, "w") as f:
Expand Down
2 changes: 1 addition & 1 deletion src/superannotate/lib/infrastructure/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def get_one(self, uuid: int) -> MLModelEntity:
raise NotImplementedError

def get_all(self, condition: Optional[Condition] = None) -> List[MLModelEntity]:
models = self._service.search_models(condition.build_query())["data"]
models = self._service.search_models(condition.build_query())
return [self.dict2entity(model) for model in models]

def insert(self, entity: MLModelEntity) -> MLModelEntity:
Expand Down
9 changes: 3 additions & 6 deletions src/superannotate/lib/infrastructure/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,7 @@ def get_folders(self, query_string: str = None, params: dict = None):
get_folder_url = urljoin(self.api_url, self.URL_FOLDERS_IMAGES)
if query_string:
get_folder_url = f"{get_folder_url}?{query_string}"
response = self._get_all_pages(
get_folder_url, params=params, key_field="folders"
)
return response
return self._get_all_pages(get_folder_url, params=params, key_field="folders")

def delete_folders(self, project_id: int, team_id: int, folder_ids: List[int]):
delete_folders_url = urljoin(self.api_url, self.URL_DELETE_FOLDERS)
Expand Down Expand Up @@ -884,8 +881,8 @@ def search_models(self, query_string: str):
search_model_url = urljoin(self.api_url, self.URL_MODELS)
if query_string:
search_model_url = f"{search_model_url}?{query_string}"
response = self._request(search_model_url, "get",)
return response.json()
# response = self._request(search_model_url, "get",)
return self._get_all_pages(search_model_url)

def bulk_get_folders(self, team_id: int, project_ids: List[int]):
get_folders_url = urljoin(self.api_url, self.URL_BULK_GET_FOLDERS)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions tests/integration/test_basic_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ def test_basic_images(self):
sa.upload_images_from_folder_to_project(
self.PROJECT_NAME, self.folder_path, annotation_status="InProgress"
)
sa.create_annotation_classes_from_classes_json(
self.PROJECT_NAME, self.classes_json_path
)

sa.upload_image_annotations(
project=self.PROJECT_NAME,
image_name=self.EXAMPLE_IMAGE_1,
annotation_json=f"{self.folder_path}/{self.EXAMPLE_IMAGE_1}___pixel.json",
)
sa.create_annotation_classes_from_classes_json(
self.PROJECT_NAME, self.classes_json_path
)

downloaded = sa.download_image(
project=self.PROJECT_NAME,
image_name=self.EXAMPLE_IMAGE_1,
Expand Down