From 2afd5a1de7fe2fce8af7de72a2eff1ad9318d058 Mon Sep 17 00:00:00 2001 From: Vaghinak Basentsyan <84702976+VaghinakDev@users.noreply.github.com> Date: Tue, 4 Mar 2025 18:37:35 +0400 Subject: [PATCH 1/2] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a7e81912..ad118c393 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: Set up Python From 97c7f7092e0da04e01366fc65b5dfdcfa346ab2e Mon Sep 17 00:00:00 2001 From: Vaghinak Basentsyan Date: Tue, 18 Mar 2025 10:55:22 +0400 Subject: [PATCH 2/2] Add folder_id in the item metadata --- src/superannotate/__init__.py | 2 +- src/superannotate/lib/core/entities/base.py | 1 + src/superannotate/lib/infrastructure/annotation_adapter.py | 4 +++- tests/integration/items/test_get_item_metadata.py | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/superannotate/__init__.py b/src/superannotate/__init__.py index e6e8b7684..fdcd9106d 100644 --- a/src/superannotate/__init__.py +++ b/src/superannotate/__init__.py @@ -3,7 +3,7 @@ import sys -__version__ = "4.4.32" +__version__ = "4.4.33b1" os.environ.update({"sa_version": __version__}) sys.path.append(os.path.split(os.path.realpath(__file__))[0]) diff --git a/src/superannotate/lib/core/entities/base.py b/src/superannotate/lib/core/entities/base.py index 24f947cad..17d4826d8 100644 --- a/src/superannotate/lib/core/entities/base.py +++ b/src/superannotate/lib/core/entities/base.py @@ -57,6 +57,7 @@ class TimedBaseModel(BaseModel): class BaseItemEntity(TimedBaseModel): id: Optional[int] name: Optional[str] + folder_id: Optional[int] path: Optional[str] = Field( None, description="Item’s path in SuperAnnotate project" ) diff --git a/src/superannotate/lib/infrastructure/annotation_adapter.py b/src/superannotate/lib/infrastructure/annotation_adapter.py index c333231cf..13436510a 100644 --- a/src/superannotate/lib/infrastructure/annotation_adapter.py +++ b/src/superannotate/lib/infrastructure/annotation_adapter.py @@ -44,7 +44,9 @@ def get_component_value(self, component_id: str): return None def set_component_value(self, component_id: str, value: Any): - self.annotation.setdefault("data", {}).setdefault(component_id, {})["value"] = value + self.annotation.setdefault("data", {}).setdefault(component_id, {})[ + "value" + ] = value return self diff --git a/tests/integration/items/test_get_item_metadata.py b/tests/integration/items/test_get_item_metadata.py index e95d77046..413772d9a 100644 --- a/tests/integration/items/test_get_item_metadata.py +++ b/tests/integration/items/test_get_item_metadata.py @@ -20,6 +20,7 @@ class TestGetEntityMetadataVector(BaseTestCase): EXPECTED_ITEM_METADATA = { "name": "example_image_1.jpg", "path": "TestGetEntityMetadataVector", + "folder_id": None, "url": None, "annotator_email": None, "qa_email": None,