From 6b117a70bde784ed9dfe4b1168145a7ff1c44f68 Mon Sep 17 00:00:00 2001 From: Gabefire <33893811+Gabefire@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:22:27 -0600 Subject: [PATCH 1/4] disable version --- .github/workflows/python-package-develop.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/python-package-develop.yml b/.github/workflows/python-package-develop.yml index a5eb70b63..19e7a294d 100644 --- a/.github/workflows/python-package-develop.yml +++ b/.github/workflows/python-package-develop.yml @@ -61,19 +61,15 @@ jobs: - python-version: "3.9" api-key: STAGING_LABELBOX_API_KEY_3 da-test-key: DA_GCP_LABELBOX_API_KEY - sdk-version: ${{ fromJson(needs.get_sdk_versions.outputs.sdk_versions)[3] }} - python-version: "3.10" api-key: STAGING_LABELBOX_API_KEY_4 da-test-key: DA_GCP_LABELBOX_API_KEY - sdk-version: ${{ fromJson(needs.get_sdk_versions.outputs.sdk_versions)[2] }} - python-version: "3.11" api-key: STAGING_LABELBOX_API_KEY da-test-key: DA_GCP_LABELBOX_API_KEY - sdk-version: ${{ fromJson(needs.get_sdk_versions.outputs.sdk_versions)[1] }} - python-version: "3.12" api-key: STAGING_LABELBOX_API_KEY_5 - da-test-key: DA_GCP_LABELBOX_API_KEY - sdk-version: ${{ fromJson(needs.get_sdk_versions.outputs.sdk_versions)[0] }} + da-test-key: DA_GCP_LABELBOX_API_KEY - python-version: "3.13" api-key: STAGING_LABELBOX_API_KEY_2 da-test-key: DA_GCP_LABELBOX_API_KEY From d77b0c43b911507a1d5d644ddf370b86002aa719 Mon Sep 17 00:00:00 2001 From: Gabefire <33893811+Gabefire@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:23:39 -0600 Subject: [PATCH 2/4] add newline to test --- libs/labelbox/src/labelbox/schema/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/labelbox/src/labelbox/schema/__init__.py b/libs/labelbox/src/labelbox/schema/__init__.py index d6b74de68..5e8d38a80 100644 --- a/libs/labelbox/src/labelbox/schema/__init__.py +++ b/libs/labelbox/src/labelbox/schema/__init__.py @@ -26,3 +26,4 @@ import labelbox.schema.catalog import labelbox.schema.ontology_kind import labelbox.schema.project_overview + From e3e7bc0bb4f72a833a9e904a2d6d2379a0656912 Mon Sep 17 00:00:00 2001 From: Gabefire <33893811+Gabefire@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:36:49 -0600 Subject: [PATCH 3/4] formtatted --- libs/labelbox/src/labelbox/schema/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/labelbox/src/labelbox/schema/__init__.py b/libs/labelbox/src/labelbox/schema/__init__.py index 5e8d38a80..d6b74de68 100644 --- a/libs/labelbox/src/labelbox/schema/__init__.py +++ b/libs/labelbox/src/labelbox/schema/__init__.py @@ -26,4 +26,3 @@ import labelbox.schema.catalog import labelbox.schema.ontology_kind import labelbox.schema.project_overview - From 2bb3c644552ec857b0a794b190b1a5be18754a1e Mon Sep 17 00:00:00 2001 From: Gabefire <33893811+Gabefire@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:42:06 -0600 Subject: [PATCH 4/4] deprecated --- libs/labelbox/src/labelbox/orm/model.py | 3 --- libs/labelbox/src/labelbox/schema/project.py | 7 +++++++ libs/labelbox/tests/integration/test_label.py | 11 ----------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/libs/labelbox/src/labelbox/orm/model.py b/libs/labelbox/src/labelbox/orm/model.py index 535ab0f7d..b4ec7c2c2 100644 --- a/libs/labelbox/src/labelbox/orm/model.py +++ b/libs/labelbox/src/labelbox/orm/model.py @@ -29,9 +29,6 @@ class Field: These `Comparison` objects can then be used for filtering: >>> project = client.get_projects(comparison) - Also exposes the ordering property used for sorting: - >>> labels = project.labels(order_by=Label.label.asc) - Attributes: field_type (Field.Type): The type of the field. name (str): name that the attribute has in client-side Python objects diff --git a/libs/labelbox/src/labelbox/schema/project.py b/libs/labelbox/src/labelbox/schema/project.py index c3dfc48ff..9494d33cf 100644 --- a/libs/labelbox/src/labelbox/schema/project.py +++ b/libs/labelbox/src/labelbox/schema/project.py @@ -327,6 +327,13 @@ def labels(self, datasets=None, order_by=None) -> PaginatedCollection: """ Label = Entity.Label + if datasets or order_by: + warnings.warn( + "The datasets and order_by arguments are deprecated and will be removed in the next major release.", + DeprecationWarning, + stacklevel=2, + ) + if datasets is not None: where = " where:{dataRow: {dataset: {id_in: [%s]}}}" % ", ".join( '"%s"' % dataset.uid for dataset in datasets diff --git a/libs/labelbox/tests/integration/test_label.py b/libs/labelbox/tests/integration/test_label.py index 12d3a247c..54e929efc 100644 --- a/libs/labelbox/tests/integration/test_label.py +++ b/libs/labelbox/tests/integration/test_label.py @@ -41,17 +41,6 @@ def test_label_update(configured_project_with_label): assert label.label == "something else" -def test_label_filter_order(configured_project_with_label, label_helpers): - project, _, _, label = configured_project_with_label - - project.create_label() - label_helpers.wait_for_labels(project, 2) - - list_asc = list(project.labels(order_by=Label.created_at.asc)) - list_desc = list(project.labels(order_by=Label.created_at.desc)) - assert list_asc == list_desc[::-1] - - def test_label_bulk_deletion(configured_project_with_label): project, _, _, _ = configured_project_with_label