Skip to content

Commit e983dfe

Browse files
mnoszczakVal Brodskydubininsergey
authored
[X-0] Attempt to reduce SDK tests flakiness (#1153)
Co-authored-by: Val Brodsky <vbrodsky@labelbox.com> Co-authored-by: Sergey Dubinin <sdubinin@labelbox.com>
1 parent c54cc8e commit e983dfe

File tree

6 files changed

+13
-16
lines changed

6 files changed

+13
-16
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ jobs:
8989

9090
DA_GCP_LABELBOX_API_KEY: ${{ secrets[matrix.da-test-key] }}
9191
run: |
92-
tox -e py -- -n 10 -svv --reruns 3 --reruns-delay 3
92+
tox -e py -- -n 10 -svv --reruns 3 --reruns-delay 8

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ google-api-core>=1.22.1
44
imagesize
55
nbconvert~=7.2.6
66
nbformat~=5.7.0
7-
numpy~=1.21.6
87
opencv-python
98
PILLOW
109
pydantic>=1.8,<2.0

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@
2020
url="https://labelbox.com",
2121
packages=setuptools.find_packages(),
2222
install_requires=[
23-
"backoff==1.10.0", "requests>=2.22.0", "google-api-core>=1.22.1",
24-
"pydantic>=1.8,<2.0", "tqdm", "python-dateutil>=2.8.2,<2.9.0"
23+
"backoff==1.10.0",
24+
"requests>=2.22.0",
25+
"google-api-core>=1.22.1",
26+
"pydantic>=1.8,<2.0",
27+
"tqdm",
28+
"python-dateutil>=2.8.2,<2.9.0",
29+
'numpy==1.21.6; python_version<"3.8"',
30+
'numpy~=1.23.5; python_version>="3.8"',
2531
],
2632
extras_require={
2733
'data': [

tests/integration/annotation_import/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from labelbox.schema.annotation_import import LabelImport, AnnotationImportState
1212
from labelbox.schema.queue_mode import QueueMode
1313

14-
DATA_ROW_PROCESSING_WAIT_TIMEOUT_SECONDS = 30
15-
DATA_ROW_PROCESSING_WAIT_SLEEP_INTERNAL_SECONDS = 5
14+
DATA_ROW_PROCESSING_WAIT_TIMEOUT_SECONDS = 40
15+
DATA_ROW_PROCESSING_WAIT_SLEEP_INTERNAL_SECONDS = 7
1616

1717

1818
@pytest.fixture()

tests/integration/annotation_import/test_data_types.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ def test_import_data_types_v2(client, configured_project,
234234
exported_project_labels = exported_project['labels'][0]
235235
exported_annotations = exported_project_labels['annotations']
236236

237-
remove_keys_recursive(exported_annotations, ['feature_id'])
237+
remove_keys_recursive(exported_annotations,
238+
['feature_id', 'feature_schema_id'])
238239
rename_cuid_key_recursive(exported_annotations)
239240
assert exported_annotations == exports_v2_by_data_type[data_type_string]
240241

tests/integration/test_ontology.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,6 @@ def test_cant_delete_an_ontology_with_project(client):
106106
client.delete_unused_feature_schema(feature_schema_id)
107107

108108

109-
def test_cant_delete_an_ontology_that_doesnt_exist(client):
110-
with pytest.raises(
111-
Exception,
112-
match=
113-
"Failed to delete the ontology, message: Failed to find ontology by id: doesntexist"
114-
):
115-
client.delete_unused_ontology("doesntexist")
116-
117-
118109
def test_inserts_a_feature_schema_at_given_position(client):
119110
tool1 = {'tool': 'polygon', 'name': 'tool1', 'color': 'blue'}
120111
tool2 = {'tool': 'polygon', 'name': 'tool2', 'color': 'blue'}

0 commit comments

Comments
 (0)