Skip to content

Commit 688aea7

Browse files
authored
[PLT-2437][PLT-2438] Disable python sdk version in tests and deprecate label parameters (#1955)
1 parent 3027b8b commit 688aea7

File tree

4 files changed

+8
-19
lines changed

4 files changed

+8
-19
lines changed

.github/workflows/python-package-develop.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,15 @@ jobs:
6161
- python-version: "3.9"
6262
api-key: STAGING_LABELBOX_API_KEY_3
6363
da-test-key: DA_GCP_LABELBOX_API_KEY
64-
sdk-version: ${{ fromJson(needs.get_sdk_versions.outputs.sdk_versions)[3] }}
6564
- python-version: "3.10"
6665
api-key: STAGING_LABELBOX_API_KEY_4
6766
da-test-key: DA_GCP_LABELBOX_API_KEY
68-
sdk-version: ${{ fromJson(needs.get_sdk_versions.outputs.sdk_versions)[2] }}
6967
- python-version: "3.11"
7068
api-key: STAGING_LABELBOX_API_KEY
7169
da-test-key: DA_GCP_LABELBOX_API_KEY
72-
sdk-version: ${{ fromJson(needs.get_sdk_versions.outputs.sdk_versions)[1] }}
7370
- python-version: "3.12"
7471
api-key: STAGING_LABELBOX_API_KEY_5
75-
da-test-key: DA_GCP_LABELBOX_API_KEY
76-
sdk-version: ${{ fromJson(needs.get_sdk_versions.outputs.sdk_versions)[0] }}
72+
da-test-key: DA_GCP_LABELBOX_API_KEY
7773
- python-version: "3.13"
7874
api-key: STAGING_LABELBOX_API_KEY_2
7975
da-test-key: DA_GCP_LABELBOX_API_KEY

libs/labelbox/src/labelbox/orm/model.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ class Field:
2929
These `Comparison` objects can then be used for filtering:
3030
>>> project = client.get_projects(comparison)
3131
32-
Also exposes the ordering property used for sorting:
33-
>>> labels = project.labels(order_by=Label.label.asc)
34-
3532
Attributes:
3633
field_type (Field.Type): The type of the field.
3734
name (str): name that the attribute has in client-side Python objects

libs/labelbox/src/labelbox/schema/project.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,13 @@ def labels(self, datasets=None, order_by=None) -> PaginatedCollection:
327327
"""
328328
Label = Entity.Label
329329

330+
if datasets or order_by:
331+
warnings.warn(
332+
"The datasets and order_by arguments are deprecated and will be removed in the next major release.",
333+
DeprecationWarning,
334+
stacklevel=2,
335+
)
336+
330337
if datasets is not None:
331338
where = " where:{dataRow: {dataset: {id_in: [%s]}}}" % ", ".join(
332339
'"%s"' % dataset.uid for dataset in datasets

libs/labelbox/tests/integration/test_label.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,6 @@ def test_label_update(configured_project_with_label):
4141
assert label.label == "something else"
4242

4343

44-
def test_label_filter_order(configured_project_with_label, label_helpers):
45-
project, _, _, label = configured_project_with_label
46-
47-
project.create_label()
48-
label_helpers.wait_for_labels(project, 2)
49-
50-
list_asc = list(project.labels(order_by=Label.created_at.asc))
51-
list_desc = list(project.labels(order_by=Label.created_at.desc))
52-
assert list_asc == list_desc[::-1]
53-
54-
5544
def test_label_bulk_deletion(configured_project_with_label):
5645
project, _, _, _ = configured_project_with_label
5746

0 commit comments

Comments
 (0)