Skip to content

Commit ae02ba0

Browse files
authored
Merge branch 'develop' into pno/PLT-2503-workflow-management
2 parents fb437f0 + c5025f1 commit ae02ba0

File tree

7 files changed

+9
-44
lines changed

7 files changed

+9
-44
lines changed

libs/labelbox/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ dependencies = [
1111
"strenum>=0.4.15",
1212
"tqdm>=4.66.2",
1313
"geojson>=3.1.0",
14-
"mypy==1.10.1",
1514
"lbox-clients==1.1.2",
1615
]
1716
readme = "README.md"

libs/labelbox/src/labelbox/schema/foundry/foundry_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def _create_app(self, app: App) -> App:
1818
$name: String!, $modelId: ID!, $ontologyId: ID!, $description: String, $inferenceParams: Json!, $classToSchemaId: Json!
1919
){{
2020
createModelFoundryApp(input: {{
21-
name: $name
22-
modelId: $modelId
21+
name: $name
22+
modelId: $modelId
2323
ontologyId: $ontologyId
2424
description: $description
2525
inferenceParams: $inferenceParams
@@ -89,6 +89,7 @@ def run_app(
8989
"classToSchemaId": app.class_to_schema_id,
9090
"inferenceParams": app.inference_params,
9191
"ontologyId": app.ontology_id,
92+
"modelAppId": app.id,
9293
}
9394

9495
data_rows_key = (

libs/labelbox/src/labelbox/schema/model_run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class ModelRun(DbObject):
5656
created_by_id = Field.String("created_by_id", "createdBy")
5757
model_id = Field.String("model_id")
5858
training_metadata = Field.Json("training_metadata")
59+
model_app_id = Field.String("model_app_id")
5960

6061
class Status(Enum):
6162
EXPORTING_DATA = "EXPORTING_DATA"

libs/labelbox/src/labelbox/schema/timeunit.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class TimeUnit(Enum):
1414
WEEK (int): 604800 seconds (7 days)
1515
"""
1616

17-
SECOND: int = 1
18-
MINUTE: int = 60
19-
HOUR: int = 60 * 60
20-
DAY: int = 24 * 60 * 60
21-
WEEK: int = 7 * 24 * 60 * 60
17+
SECOND = 1
18+
MINUTE = 60
19+
HOUR = 60 * 60
20+
DAY = 24 * 60 * 60
21+
WEEK = 7 * 24 * 60 * 60

libs/labelbox/tests/integration/test_api_keys.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -227,27 +227,3 @@ def test_create_api_key_invalid_time_unit(client):
227227
time_unit="days", # String instead of TimeUnit enum
228228
)
229229
assert "valid TimeUnit" in str(excinfo.value)
230-
231-
232-
@pytest.mark.skipif(
233-
condition=os.environ["LABELBOX_TEST_ENVIRON"] == "prod",
234-
reason="Accounts with sdmin permission can create API keys",
235-
)
236-
def test_create_api_key_insufficient_permissions(client):
237-
"""Test that creating an API key fails when the user has insufficient permissions."""
238-
user_email = client.get_user().email
239-
240-
assert client.get_user().org_role().name == "Admin"
241-
242-
# Attempt to create another API key using the limited permissions client
243-
# This should fail due to insufficient permissions
244-
with pytest.raises(LabelboxError) as excinfo:
245-
client.create_api_key(
246-
name=f"Test Key {uuid.uuid4()}",
247-
user=user_email,
248-
role="Admin",
249-
validity=5,
250-
time_unit=TimeUnit.MINUTE,
251-
)
252-
253-
assert "192" in str(excinfo.value)

requirements-dev.lock

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
# features: []
77
# all-features: true
88
# with-sources: false
9-
# generate-hashes: false
10-
# universal: false
119

1210
-e file:libs/labelbox
1311
-e file:libs/lbox-clients
@@ -125,7 +123,6 @@ matplotlib-inline==0.1.7
125123
mistune==3.0.2
126124
# via nbconvert
127125
mypy==1.10.1
128-
# via labelbox
129126
mypy-extensions==1.0.0
130127
# via black
131128
# via mypy

requirements.lock

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
# features: []
77
# all-features: true
88
# with-sources: false
9-
# generate-hashes: false
10-
# universal: false
119

1210
-e file:libs/labelbox
1311
-e file:libs/lbox-clients
@@ -52,10 +50,6 @@ jinja2==3.1.4
5250
# via sphinx
5351
markupsafe==2.1.5
5452
# via jinja2
55-
mypy==1.10.1
56-
# via labelbox
57-
mypy-extensions==1.0.0
58-
# via mypy
5953
numpy==2.0.2
6054
# via labelbox
6155
# via opencv-python-headless
@@ -123,15 +117,12 @@ sphinxcontrib-serializinghtml==1.1.5
123117
# via sphinx
124118
strenum==0.4.15
125119
# via labelbox
126-
tomli==2.2.1
127-
# via mypy
128120
tqdm==4.66.4
129121
# via labelbox
130122
typeguard==4.3.0
131123
# via labelbox
132124
typing-extensions==4.12.2
133125
# via labelbox
134-
# via mypy
135126
# via pydantic
136127
# via pydantic-core
137128
# via typeguard

0 commit comments

Comments
 (0)