kleinkram 0.35.10.dev20241105101726__py3-none-any.whl → 0.36.0.dev20241105123056__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kleinkram might be problematic. Click here for more details.
- kleinkram/main.py +21 -8
- {kleinkram-0.35.10.dev20241105101726.dist-info → kleinkram-0.36.0.dev20241105123056.dist-info}/METADATA +1 -1
- {kleinkram-0.35.10.dev20241105101726.dist-info → kleinkram-0.36.0.dev20241105123056.dist-info}/RECORD +6 -6
- {kleinkram-0.35.10.dev20241105101726.dist-info → kleinkram-0.36.0.dev20241105123056.dist-info}/WHEEL +0 -0
- {kleinkram-0.35.10.dev20241105101726.dist-info → kleinkram-0.36.0.dev20241105123056.dist-info}/entry_points.txt +0 -0
- {kleinkram-0.35.10.dev20241105101726.dist-info → kleinkram-0.36.0.dev20241105123056.dist-info}/licenses/LICENSE +0 -0
kleinkram/main.py
CHANGED
|
@@ -164,6 +164,10 @@ def upload(
|
|
|
164
164
|
"'some-name.mcap' file will be deleted."
|
|
165
165
|
),
|
|
166
166
|
] = False,
|
|
167
|
+
ignore_tags: Annotated[
|
|
168
|
+
bool,
|
|
169
|
+
typer.Option(help="Ignore required tags for the mission."),
|
|
170
|
+
] = False,
|
|
167
171
|
):
|
|
168
172
|
"""
|
|
169
173
|
Upload files matching the path to a mission in a project.
|
|
@@ -233,14 +237,7 @@ def upload(
|
|
|
233
237
|
"Access Denied",
|
|
234
238
|
)
|
|
235
239
|
|
|
236
|
-
if not tags:
|
|
237
|
-
tags = []
|
|
238
|
-
tags_dict = {item.split(":")[0]: item.split(":")[1] for item in tags}
|
|
239
240
|
|
|
240
|
-
required_tags = (
|
|
241
|
-
project_json["requiredTags"] if "requiredTags" in project_json else []
|
|
242
|
-
)
|
|
243
|
-
promptForTags(tags_dict, required_tags)
|
|
244
241
|
|
|
245
242
|
##############################
|
|
246
243
|
# Check if mission exists
|
|
@@ -250,7 +247,7 @@ def upload(
|
|
|
250
247
|
mission_response = client.get(get_mission_url, params={"uuid": mission})
|
|
251
248
|
else:
|
|
252
249
|
get_mission_url = "/mission/byName"
|
|
253
|
-
mission_response = client.get(get_mission_url, params={"name": mission})
|
|
250
|
+
mission_response = client.get(get_mission_url, params={"name": mission, "projectUUID": project_json["uuid"]})
|
|
254
251
|
|
|
255
252
|
if mission_response.status_code >= 400:
|
|
256
253
|
if not create_mission:
|
|
@@ -263,12 +260,28 @@ def upload(
|
|
|
263
260
|
else:
|
|
264
261
|
print(f"Mission '{mission}' does not exist. Creating it now.")
|
|
265
262
|
create_mission_url = "/mission/create"
|
|
263
|
+
if not tags:
|
|
264
|
+
tags = []
|
|
265
|
+
tags_dict = {item.split(":")[0]: item.split(":")[1] for item in tags}
|
|
266
|
+
required_tags = (
|
|
267
|
+
project_json["requiredTags"] if "requiredTags" in project_json else []
|
|
268
|
+
)
|
|
269
|
+
missing_tags = [tag_key for tag_key in required_tags if (tag_key["uuid"] not in tags_dict)]
|
|
270
|
+
if not ignore_tags:
|
|
271
|
+
if missing_tags and not ignore_tags:
|
|
272
|
+
promptForTags(tags_dict, required_tags)
|
|
273
|
+
else:
|
|
274
|
+
print("Ignoring required tags for the mission:")
|
|
275
|
+
for tag_key in missing_tags:
|
|
276
|
+
print(f" - {tag_key}")
|
|
277
|
+
|
|
266
278
|
mission_response = client.post(
|
|
267
279
|
create_mission_url,
|
|
268
280
|
json={
|
|
269
281
|
"name": mission,
|
|
270
282
|
"projectUUID": project_json["uuid"],
|
|
271
283
|
"tags": tags_dict,
|
|
284
|
+
"ignoreTags": ignore_tags,
|
|
272
285
|
},
|
|
273
286
|
)
|
|
274
287
|
if mission_response.status_code >= 400:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: kleinkram
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.36.0.dev20241105123056
|
|
4
4
|
Summary: A CLI for the ETH project kleinkram
|
|
5
5
|
Project-URL: Homepage, https://github.com/leggedrobotics/kleinkram
|
|
6
6
|
Project-URL: Issues, https://github.com/leggedrobotics/kleinkram/issues
|
|
@@ -3,7 +3,7 @@ kleinkram/api_client.py,sha256=1GPsM-XFbPYEKP7RfWmzMTwxRqnVh4wtHVuW25KT8kA,2264
|
|
|
3
3
|
kleinkram/consts.py,sha256=pm_6OuQcO-tYcRhwauTtyRRsuYY0y0yb6EGuIl49LnI,50
|
|
4
4
|
kleinkram/error_handling.py,sha256=vvNtXSOnXs4b-aYEUIA0GVQWXLRW5I5FtNE1PZPHEPc,4704
|
|
5
5
|
kleinkram/helper.py,sha256=ELvs-p7zpJUP_rtTIVpcUCTz0D4WegoUZQ11UqUrUkg,9288
|
|
6
|
-
kleinkram/main.py,sha256=
|
|
6
|
+
kleinkram/main.py,sha256=sxSiTh9p7LlenJFDdZaZXUPll4VjvgTYSyt4b3JG91Y,17992
|
|
7
7
|
kleinkram/auth/auth.py,sha256=w3-TsxWxURzLQ3_p43zgV4Rlh4dVL_WqI6HG2aes-b4,4991
|
|
8
8
|
kleinkram/endpoint/endpoint.py,sha256=WmHUH10_OSZUMrovh2yBeth9dBcn0yE7PxnnD4yPW-Y,1582
|
|
9
9
|
kleinkram/file/file.py,sha256=1IRXTxGGH5tIvvmMoee5jvmN4QGyIJSJ2xtHraHGFHE,5390
|
|
@@ -13,8 +13,8 @@ kleinkram/queue/queue.py,sha256=MaLBjAu8asi9BkPvbbT-5AobCcpy3ex5rxM1kHpRINA,181
|
|
|
13
13
|
kleinkram/tag/tag.py,sha256=JSHbDPVfsvP34MuQhw__DPQk-Bah5G9BgwYsj_K_JGc,1805
|
|
14
14
|
kleinkram/topic/topic.py,sha256=IaXhrIHcJ3FSIr0WC-N7u9fkz-lAvSBgQklTX67t0Yc,1641
|
|
15
15
|
kleinkram/user/user.py,sha256=SzUM-CTTmC3TYCNt4Crizc7n3Rpf2ObJeNWEeEmMfpo,1893
|
|
16
|
-
kleinkram-0.
|
|
17
|
-
kleinkram-0.
|
|
18
|
-
kleinkram-0.
|
|
19
|
-
kleinkram-0.
|
|
20
|
-
kleinkram-0.
|
|
16
|
+
kleinkram-0.36.0.dev20241105123056.dist-info/METADATA,sha256=HEiqHCOMhqJtP8K98ZgdpO_Yv73AviDz4hz0oZnmjKk,845
|
|
17
|
+
kleinkram-0.36.0.dev20241105123056.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
18
|
+
kleinkram-0.36.0.dev20241105123056.dist-info/entry_points.txt,sha256=RHXtRzcreVHImatgjhQwZQ6GdJThElYjHEWcR1BPXUI,45
|
|
19
|
+
kleinkram-0.36.0.dev20241105123056.dist-info/licenses/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
|
20
|
+
kleinkram-0.36.0.dev20241105123056.dist-info/RECORD,,
|
{kleinkram-0.35.10.dev20241105101726.dist-info → kleinkram-0.36.0.dev20241105123056.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|