Skip to content

Commit ee78c0a

Browse files
committed
Merge branch 'develop' of https://github.com/Labelbox/labelbox-python into mmw/create-model-run-with-config
2 parents b196bb2 + 710169e commit ee78c0a

File tree

6 files changed

+426
-164
lines changed

6 files changed

+426
-164
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The Labelbox Python API offers a simple, user-friendly way to interact with the
2020

2121
- Use Python 3.7, 3.8 or 3.9
2222
- [Create an account](http://app.labelbox.com/)
23-
- [Generate an API key](https://labelbox.com/docs/api/getting-started#create_api_key)
23+
- [Generate an API key](https://docs.labelbox.com/docs/create-an-api-key)
2424

2525
## Installation
2626

@@ -59,9 +59,9 @@ pip install labelbox[data]
5959

6060
## Documentation
6161

62-
- [Visit our docs](https://labelbox.com/docs/python-api) to learn how the SDK works
62+
- [Visit our docs](https://docs.labelbox.com/reference) to learn how the SDK works
6363
- Checkout our [notebook examples](examples/) to follow along with interactive tutorials
64-
- view our [API reference](https://labelbox.com/docs/python-api/api-reference).
64+
- view our [API reference](https://labelbox-python.readthedocs.io/en/latest/index.html).
6565

6666
## Authentication
6767

examples/annotation_import/image.ipynb

Lines changed: 409 additions & 155 deletions
Large diffs are not rendered by default.

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[pytest]
2-
addopts = -s -vv -x --reruns 5 --reruns-delay 10
2+
addopts = -s -vv -x --reruns 5 --reruns-delay 10 --durations=100
33
markers =
44
slow: marks tests as slow (deselect with '-m "not slow"')

tests/integration/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from labelbox.schema.invite import Invite
1919
from labelbox.schema.user import User
2020

21-
IMG_URL = "https://picsum.photos/200/300"
21+
IMG_URL = "https://picsum.photos/200/300.jpg"
2222

2323

2424
class Environ(Enum):
@@ -147,8 +147,8 @@ def client(environ: str):
147147
@pytest.fixture(scope="session")
148148
def image_url(client):
149149
return client.upload_data(requests.get(IMG_URL).content,
150-
content_type="application/json",
151-
filename="json_import.json",
150+
content_type="image/jpeg",
151+
filename="image.jpeg",
152152
sign=True)
153153

154154

tests/integration/test_label.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ def test_labels(configured_project_with_label):
1919

2020
label.delete()
2121

22+
# TODO: Added sleep to account for ES from catching up to deletion.
23+
# Need a better way to query labels in `project.labels()`, because currently,
24+
# it intermittently takes too long to sync, causing flaky SDK tests
25+
time.sleep(5)
26+
2227
assert list(project.labels()) == []
2328
assert list(data_row.labels()) == []
2429

@@ -36,7 +41,10 @@ def test_label_export(configured_project_with_label):
3641
# The new exporter doesn't work with the create_label mutation
3742

3843

39-
@pytest.mark.skipif(condition=os.environ['LABELBOX_TEST_ENVIRON'] == "onprem",
44+
# TODO: Skipping this test in staging due to label not updating
45+
@pytest.mark.skipif(condition=os.environ['LABELBOX_TEST_ENVIRON'] == "onprem" or
46+
os.environ['LABELBOX_TEST_ENVIRON'] == "staging" or
47+
os.environ['LABELBOX_TEST_ENVIRON'] == "custom",
4048
reason="does not work for onprem")
4149
def test_label_update(configured_project_with_label):
4250
_, _, _, label = configured_project_with_label

tests/integration/test_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,4 @@ def test_media_type(client, configured_project: Project, rand_gen):
238238
project = client.create_project(name=rand_gen(str),
239239
media_type=MediaType[media_type])
240240
assert project.media_type == MediaType[media_type]
241-
project.delete()
241+
project.delete()

0 commit comments

Comments
 (0)