aap-utils 0.2.3__py3-none-any.whl → 0.2.5__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.
- aap_utils/cli.py +9 -4
- {aap_utils-0.2.3.dist-info → aap_utils-0.2.5.dist-info}/METADATA +1 -1
- aap_utils-0.2.5.dist-info/RECORD +8 -0
- aap_utils-0.2.3.dist-info/RECORD +0 -8
- {aap_utils-0.2.3.dist-info → aap_utils-0.2.5.dist-info}/WHEEL +0 -0
- {aap_utils-0.2.3.dist-info → aap_utils-0.2.5.dist-info}/entry_points.txt +0 -0
- {aap_utils-0.2.3.dist-info → aap_utils-0.2.5.dist-info}/top_level.txt +0 -0
aap_utils/cli.py
CHANGED
@@ -20,8 +20,8 @@ def validate_image_name(image_name):
|
|
20
20
|
|
21
21
|
def validate_tags(tags):
|
22
22
|
"""Validate tags: lowercase, alphanumeric with underscores, and no spaces."""
|
23
|
-
tag_list =
|
24
|
-
|
23
|
+
tag_list = {tag.strip().lower() for tag in tags.split() if tag.strip()} # Use set to remove duplicates
|
24
|
+
|
25
25
|
if not tag_list:
|
26
26
|
return None # No valid tags
|
27
27
|
|
@@ -29,7 +29,7 @@ def validate_tags(tags):
|
|
29
29
|
if not re.fullmatch(r'[a-z0-9_]+', tag):
|
30
30
|
return None # Found an invalid tag
|
31
31
|
|
32
|
-
return tag_list #
|
32
|
+
return list(tag_list) # Convert back to list before returning
|
33
33
|
|
34
34
|
def get_username():
|
35
35
|
"""Retrieve the username from the environment variable KERNEL_AP_USER or use 'unname'."""
|
@@ -66,7 +66,12 @@ def publish_env():
|
|
66
66
|
try:
|
67
67
|
response = requests.post(API_URL, json=data)
|
68
68
|
if response.status_code == 200:
|
69
|
-
|
69
|
+
response_json = response.json()
|
70
|
+
if response_json.get("result") == "success":
|
71
|
+
print("✅ Successfully published the environment!")
|
72
|
+
else:
|
73
|
+
error_message = response_json.get("error", "Unknown error occurred.")
|
74
|
+
print(f"❌ Failed to publish: {error_message}")
|
70
75
|
else:
|
71
76
|
print(f"❌ Failed to publish. Server responded with: {response.status_code}, {response.text}")
|
72
77
|
except requests.RequestException as e:
|
@@ -0,0 +1,8 @@
|
|
1
|
+
aap_utils/__init__.py,sha256=g6G3i3a5ANDJWqFX2oPsLpP93aTaoTj0gkMQzeqQIJw,172
|
2
|
+
aap_utils/cli.py,sha256=zyUUM0G5q25hGI0NrRLn9hlH29JF8hhaWRyAT-tagmA,3200
|
3
|
+
aap_utils/register.py,sha256=J9tukByU1mcy4SoaJOoGY8jjzL9JMuNTZGtCBSwwon0,3823
|
4
|
+
aap_utils-0.2.5.dist-info/METADATA,sha256=niazcBHz4-NjU-BhT1c6t2iilxkcgrSs7GEwvgeAUBs,346
|
5
|
+
aap_utils-0.2.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
+
aap_utils-0.2.5.dist-info/entry_points.txt,sha256=K-h2toLoqFxAg4Bx2r7FWggKgYnAX9zp9s4Ms4r-d6s,49
|
7
|
+
aap_utils-0.2.5.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
|
8
|
+
aap_utils-0.2.5.dist-info/RECORD,,
|
aap_utils-0.2.3.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
aap_utils/__init__.py,sha256=g6G3i3a5ANDJWqFX2oPsLpP93aTaoTj0gkMQzeqQIJw,172
|
2
|
-
aap_utils/cli.py,sha256=aMd7ErwL0XMgYmCnWn8MyOrXkC8e_PWZ2374hcfnKYI,2877
|
3
|
-
aap_utils/register.py,sha256=J9tukByU1mcy4SoaJOoGY8jjzL9JMuNTZGtCBSwwon0,3823
|
4
|
-
aap_utils-0.2.3.dist-info/METADATA,sha256=jEzkBZdLTaps9GWURqOONx2gsRZxCfzCEn4dyBwanGY,346
|
5
|
-
aap_utils-0.2.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
-
aap_utils-0.2.3.dist-info/entry_points.txt,sha256=K-h2toLoqFxAg4Bx2r7FWggKgYnAX9zp9s4Ms4r-d6s,49
|
7
|
-
aap_utils-0.2.3.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
|
8
|
-
aap_utils-0.2.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|