yellowdog-python-examples 7.16.2__tar.gz → 7.16.3__tar.gz
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.
- {yellowdog_python_examples-7.16.2/yellowdog_python_examples.egg-info → yellowdog_python_examples-7.16.3}/PKG-INFO +2 -3
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/requirements.txt +1 -2
- yellowdog_python_examples-7.16.3/yellowdog_cli/__init__.py +1 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/cancel.py +36 -81
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/create.py +7 -1
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/args.py +2 -2
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/settings.py +0 -2
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3/yellowdog_python_examples.egg-info}/PKG-INFO +2 -3
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_python_examples.egg-info/requires.txt +1 -2
- yellowdog_python_examples-7.16.2/yellowdog_cli/__init__.py +0 -1
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/LICENSE +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/PYPI_README.md +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/README.md +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/pyproject.toml +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/setup.cfg +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/tests/test_create_remove.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/tests/test_demos.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/tests/test_dryruns.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/tests/test_entrypoints.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/tests/test_gui.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/tests/test_list.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/tests/test_objects.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/tests/test_variable_processing.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/abort.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/admin.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/boost.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/cloudwizard.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/compare.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/delete.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/download.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/follow.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/format_json.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/hold.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/instantiate.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/jsonnet2json.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/list.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/provision.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/remove.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/resize.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/show.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/shutdown.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/start.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/submit.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/terminate.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/upload.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/__init__.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/check_imports.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/cloudwizard_aws.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/cloudwizard_aws_types.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/cloudwizard_azure.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/cloudwizard_common.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/cloudwizard_gcp.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/compact_json.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/config_types.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/csv_data.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/entity_utils.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/follow_utils.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/interactive.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/items.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/load_config.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/load_resources.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/misc_utils.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/printing.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/property_names.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/provision_utils.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/rich_console_input_fixed.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/start_hold_common.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/submit_utils.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/type_check.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/upload_utils.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/validate_properties.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/variables.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/wrapper.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/ydid_utils.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/version.py +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_python_examples.egg-info/SOURCES.txt +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_python_examples.egg-info/dependency_links.txt +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_python_examples.egg-info/entry_points.txt +0 -0
- {yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_python_examples.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: yellowdog-python-examples
|
|
3
|
-
Version: 7.16.
|
|
3
|
+
Version: 7.16.3
|
|
4
4
|
Summary: Python CLI commands using the YellowDog Python SDK
|
|
5
5
|
Author-email: YellowDog Limited <support@yellowdog.co>
|
|
6
6
|
Project-URL: Homepage, https://github.com/yellowdog/python-examples
|
|
@@ -15,12 +15,11 @@ Description-Content-Type: text/markdown
|
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
Requires-Dist: PyPAC>=0.16.4
|
|
17
17
|
Requires-Dist: dateparser
|
|
18
|
-
Requires-Dist: jsons==1.4.2
|
|
19
18
|
Requires-Dist: requests
|
|
20
19
|
Requires-Dist: rich==13.9.4
|
|
21
20
|
Requires-Dist: tabulate>=0.9.0
|
|
22
21
|
Requires-Dist: toml
|
|
23
|
-
Requires-Dist: yellowdog-sdk
|
|
22
|
+
Requires-Dist: yellowdog-sdk>=9.1.1
|
|
24
23
|
Provides-Extra: jsonnet
|
|
25
24
|
Requires-Dist: jsonnet; extra == "jsonnet"
|
|
26
25
|
Provides-Extra: cloudwizard
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "7.16.3"
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/cancel.py
RENAMED
|
@@ -4,13 +4,9 @@
|
|
|
4
4
|
A script to cancel Work Requirements and optionally abort Tasks.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
from time import sleep
|
|
8
7
|
from typing import List
|
|
9
8
|
|
|
10
9
|
from yellowdog_client.model import (
|
|
11
|
-
Task,
|
|
12
|
-
TaskSearch,
|
|
13
|
-
TaskStatus,
|
|
14
10
|
WorkRequirement,
|
|
15
11
|
WorkRequirementStatus,
|
|
16
12
|
WorkRequirementSummary,
|
|
@@ -18,15 +14,14 @@ from yellowdog_client.model import (
|
|
|
18
14
|
|
|
19
15
|
from yellowdog_cli.utils.entity_utils import (
|
|
20
16
|
get_filtered_work_requirements,
|
|
21
|
-
get_task_group_name,
|
|
22
17
|
get_work_requirement_summary_by_name_or_id,
|
|
23
18
|
)
|
|
24
19
|
from yellowdog_cli.utils.follow_utils import follow_ids
|
|
25
20
|
from yellowdog_cli.utils.interactive import confirmed, select
|
|
26
21
|
from yellowdog_cli.utils.misc_utils import link_entity
|
|
27
|
-
from yellowdog_cli.utils.printing import print_error, print_log
|
|
28
|
-
from yellowdog_cli.utils.settings import TASK_ABORT_CHECK_INTERVAL
|
|
22
|
+
from yellowdog_cli.utils.printing import print_error, print_log, print_warning
|
|
29
23
|
from yellowdog_cli.utils.wrapper import ARGS_PARSER, CLIENT, CONFIG_COMMON, main_wrapper
|
|
24
|
+
from yellowdog_cli.utils.ydid_utils import YDIDType, get_ydid_type
|
|
30
25
|
|
|
31
26
|
|
|
32
27
|
@main_wrapper
|
|
@@ -64,12 +59,16 @@ def main():
|
|
|
64
59
|
)
|
|
65
60
|
|
|
66
61
|
if len(selected_work_requirement_summaries) > 0 and confirmed(
|
|
67
|
-
f"Cancel {len(selected_work_requirement_summaries)}
|
|
62
|
+
f"Cancel {len(selected_work_requirement_summaries)} "
|
|
63
|
+
f"Work Requirement(s)"
|
|
64
|
+
f"{'' if not ARGS_PARSER.abort else ' and abort all allocated tasks'}?"
|
|
68
65
|
):
|
|
69
66
|
for work_summary in selected_work_requirement_summaries:
|
|
70
67
|
if work_summary.status != WorkRequirementStatus.CANCELLING:
|
|
71
68
|
try:
|
|
72
|
-
CLIENT.work_client.cancel_work_requirement_by_id(
|
|
69
|
+
CLIENT.work_client.cancel_work_requirement_by_id(
|
|
70
|
+
work_summary.id, ARGS_PARSER.abort
|
|
71
|
+
)
|
|
73
72
|
work_requirement: WorkRequirement = (
|
|
74
73
|
CLIENT.work_client.get_work_requirement_by_id(work_summary.id)
|
|
75
74
|
)
|
|
@@ -77,7 +76,9 @@ def main():
|
|
|
77
76
|
print_log(
|
|
78
77
|
f"Cancelled {link_entity(CONFIG_COMMON.url, work_requirement)} "
|
|
79
78
|
f"('{work_summary.name}')"
|
|
79
|
+
f"{'' if not ARGS_PARSER.abort else ' and aborted all allocated tasks'}"
|
|
80
80
|
)
|
|
81
|
+
|
|
81
82
|
except Exception as e:
|
|
82
83
|
print_error(
|
|
83
84
|
f"Failed to cancel Work Requirement '{work_summary.name}': {e}"
|
|
@@ -95,12 +96,6 @@ def main():
|
|
|
95
96
|
elif cancelled_count == 0 and cancelling_count == 0:
|
|
96
97
|
print_log("No Work Requirements to cancel")
|
|
97
98
|
|
|
98
|
-
if ARGS_PARSER.abort:
|
|
99
|
-
if cancelled_count == 0 and cancelling_count == 0:
|
|
100
|
-
print_log("No Tasks to abort")
|
|
101
|
-
else:
|
|
102
|
-
_abort_and_follow(selected_work_requirement_summaries)
|
|
103
|
-
|
|
104
99
|
if ARGS_PARSER.follow:
|
|
105
100
|
follow_ids(work_requirement_ids)
|
|
106
101
|
|
|
@@ -108,50 +103,27 @@ def main():
|
|
|
108
103
|
print_log("No Work Requirements to cancel")
|
|
109
104
|
|
|
110
105
|
|
|
111
|
-
def _abort_all_tasks(
|
|
112
|
-
selected_work_requirement_summaries: List[WorkRequirementSummary],
|
|
113
|
-
) -> int:
|
|
114
|
-
"""
|
|
115
|
-
Abort all Tasks in selected Work Requirements.
|
|
116
|
-
"""
|
|
117
|
-
aborted_tasks = 0
|
|
118
|
-
for wr_summary in selected_work_requirement_summaries:
|
|
119
|
-
task_search = TaskSearch(
|
|
120
|
-
workRequirementId=wr_summary.id,
|
|
121
|
-
statuses=[
|
|
122
|
-
TaskStatus.EXECUTING,
|
|
123
|
-
TaskStatus.DOWNLOADING,
|
|
124
|
-
TaskStatus.UPLOADING,
|
|
125
|
-
],
|
|
126
|
-
)
|
|
127
|
-
tasks: List[Task] = CLIENT.work_client.find_tasks(task_search)
|
|
128
|
-
for task in tasks:
|
|
129
|
-
try:
|
|
130
|
-
CLIENT.work_client.cancel_task(task, abort=True)
|
|
131
|
-
print_log(
|
|
132
|
-
f"Aborting Task '{task.name}' in Task Group"
|
|
133
|
-
f" '{get_task_group_name(CLIENT, wr_summary, task)}' in Work"
|
|
134
|
-
f" Requirement '{wr_summary.name}'"
|
|
135
|
-
)
|
|
136
|
-
aborted_tasks += 1
|
|
137
|
-
except Exception as e:
|
|
138
|
-
print_error(f"Error aborting Task '{task.name}': {e}")
|
|
139
|
-
|
|
140
|
-
if aborted_tasks == 0:
|
|
141
|
-
print_log("No Tasks to abort")
|
|
142
|
-
if aborted_tasks <= 5:
|
|
143
|
-
pass
|
|
144
|
-
else:
|
|
145
|
-
print_log(f"Aborting {aborted_tasks} Task(s)")
|
|
146
|
-
return aborted_tasks
|
|
147
|
-
|
|
148
|
-
|
|
149
106
|
def _cancel_work_requirements_by_name_or_id(names_or_ids: List[str]):
|
|
150
107
|
"""
|
|
151
108
|
Cancel Work Requirements by their names or IDs.
|
|
152
109
|
"""
|
|
153
110
|
work_requirement_summaries: List[WorkRequirementSummary] = []
|
|
111
|
+
|
|
154
112
|
for name_or_id in names_or_ids:
|
|
113
|
+
|
|
114
|
+
# Handle a task ID
|
|
115
|
+
if get_ydid_type(name_or_id) == YDIDType.TASK:
|
|
116
|
+
if not confirmed(
|
|
117
|
+
f"Cancel {'' if not ARGS_PARSER.abort else 'and abort '}"
|
|
118
|
+
f"Task '{name_or_id}'?"
|
|
119
|
+
):
|
|
120
|
+
continue
|
|
121
|
+
try:
|
|
122
|
+
CLIENT.work_client.cancel_task_by_id(name_or_id, ARGS_PARSER.abort)
|
|
123
|
+
except Exception as e:
|
|
124
|
+
print_error(f"Failed to cancel Task '{name_or_id}': {e}")
|
|
125
|
+
continue
|
|
126
|
+
|
|
155
127
|
work_requirement_summary: WorkRequirementSummary = (
|
|
156
128
|
get_work_requirement_summary_by_name_or_id(CLIENT, name_or_id)
|
|
157
129
|
)
|
|
@@ -163,53 +135,36 @@ def _cancel_work_requirements_by_name_or_id(names_or_ids: List[str]):
|
|
|
163
135
|
WorkRequirementStatus.RUNNING,
|
|
164
136
|
WorkRequirementStatus.HELD,
|
|
165
137
|
]:
|
|
166
|
-
|
|
138
|
+
print_warning(
|
|
167
139
|
f"Work Requirement '{name_or_id}' is not in a valid state"
|
|
168
140
|
f" ('{work_requirement_summary.status}') for cancellation"
|
|
169
141
|
)
|
|
142
|
+
continue
|
|
170
143
|
|
|
171
144
|
work_requirement_summaries.append(work_requirement_summary)
|
|
172
145
|
if work_requirement_summary.status == WorkRequirementStatus.CANCELLING:
|
|
173
146
|
print_log(f"Work Requirement '{name_or_id}' is already cancelling")
|
|
174
147
|
else:
|
|
175
|
-
if not confirmed(
|
|
148
|
+
if not confirmed(
|
|
149
|
+
f"Cancel Work Requirement '{name_or_id}'"
|
|
150
|
+
f"{'' if not ARGS_PARSER.abort else ' and abort all allocated tasks'}?"
|
|
151
|
+
):
|
|
176
152
|
continue
|
|
177
153
|
try:
|
|
178
154
|
CLIENT.work_client.cancel_work_requirement_by_id(
|
|
179
|
-
work_requirement_summary.id
|
|
155
|
+
work_requirement_summary.id, ARGS_PARSER.abort
|
|
156
|
+
)
|
|
157
|
+
print_log(
|
|
158
|
+
f"Cancelled Work Requirement '{name_or_id}'"
|
|
159
|
+
f"{'' if not ARGS_PARSER.abort else ' and aborted all allocated tasks'}"
|
|
180
160
|
)
|
|
181
|
-
print_log(f"Cancelled Work Requirement '{name_or_id}'")
|
|
182
161
|
except Exception as e:
|
|
183
162
|
print_error(f"Failed to cancel Work Requirement '{name_or_id}': {e}")
|
|
184
163
|
|
|
185
|
-
if ARGS_PARSER.abort:
|
|
186
|
-
_abort_and_follow(work_requirement_summaries)
|
|
187
|
-
|
|
188
164
|
if ARGS_PARSER.follow:
|
|
189
165
|
follow_ids([wrs.id for wrs in work_requirement_summaries])
|
|
190
166
|
|
|
191
167
|
|
|
192
|
-
def _abort_and_follow(work_requirement_summaries: List[WorkRequirementSummary]):
|
|
193
|
-
"""
|
|
194
|
-
Abort Tasks in one or more Work Requirements and optionally follow
|
|
195
|
-
abort progress.
|
|
196
|
-
"""
|
|
197
|
-
if ARGS_PARSER.follow:
|
|
198
|
-
attempt = 0
|
|
199
|
-
while True:
|
|
200
|
-
attempt += 1
|
|
201
|
-
print_log(f"Collecting Tasks to abort (attempt {attempt})")
|
|
202
|
-
if _abort_all_tasks(work_requirement_summaries) == 0:
|
|
203
|
-
break
|
|
204
|
-
print_log(
|
|
205
|
-
f"Waiting {TASK_ABORT_CHECK_INTERVAL}s for abort confirmation ..."
|
|
206
|
-
)
|
|
207
|
-
sleep(TASK_ABORT_CHECK_INTERVAL)
|
|
208
|
-
else:
|
|
209
|
-
print_log("Aborting all currently running Tasks")
|
|
210
|
-
_abort_all_tasks(work_requirement_summaries)
|
|
211
|
-
|
|
212
|
-
|
|
213
168
|
# Entry point
|
|
214
169
|
if __name__ == "__main__":
|
|
215
170
|
main()
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/create.py
RENAMED
|
@@ -333,10 +333,16 @@ def create_compute_requirement_template(resource: Dict):
|
|
|
333
333
|
_get_images_id(images_id, resource, PROP_IMAGES_ID)
|
|
334
334
|
|
|
335
335
|
if ARGS_PARSER.dry_run:
|
|
336
|
-
_get_model_object(type, resource) # Report extras
|
|
336
|
+
_get_model_object(type, resource) # Report omissions, extras, errors
|
|
337
337
|
print_json(resource)
|
|
338
338
|
return
|
|
339
339
|
|
|
340
|
+
# Overwrite source dictionaries with ComputeSourceUsage objects
|
|
341
|
+
resource[PROP_SOURCES] = [
|
|
342
|
+
_get_model_object("ComputeSourceUsage", source)
|
|
343
|
+
for source in resource.get(PROP_SOURCES, [])
|
|
344
|
+
]
|
|
345
|
+
|
|
340
346
|
compute_template = _get_model_object(type, resource)
|
|
341
347
|
|
|
342
348
|
# Check for an existing ID
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/args.py
RENAMED
|
@@ -343,7 +343,7 @@ class CLIParser:
|
|
|
343
343
|
"-a",
|
|
344
344
|
action="store_true",
|
|
345
345
|
required=False,
|
|
346
|
-
help="abort
|
|
346
|
+
help="abort running tasks with immediate effect",
|
|
347
347
|
)
|
|
348
348
|
parser.add_argument(
|
|
349
349
|
"--follow",
|
|
@@ -816,7 +816,7 @@ class CLIParser:
|
|
|
816
816
|
type=str,
|
|
817
817
|
help=(
|
|
818
818
|
"the name(s) or YellowDog ID(s) of the work requirement(s) to be"
|
|
819
|
-
" cancelled"
|
|
819
|
+
" cancelled; can also supply task IDs"
|
|
820
820
|
),
|
|
821
821
|
)
|
|
822
822
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: yellowdog-python-examples
|
|
3
|
-
Version: 7.16.
|
|
3
|
+
Version: 7.16.3
|
|
4
4
|
Summary: Python CLI commands using the YellowDog Python SDK
|
|
5
5
|
Author-email: YellowDog Limited <support@yellowdog.co>
|
|
6
6
|
Project-URL: Homepage, https://github.com/yellowdog/python-examples
|
|
@@ -15,12 +15,11 @@ Description-Content-Type: text/markdown
|
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
Requires-Dist: PyPAC>=0.16.4
|
|
17
17
|
Requires-Dist: dateparser
|
|
18
|
-
Requires-Dist: jsons==1.4.2
|
|
19
18
|
Requires-Dist: requests
|
|
20
19
|
Requires-Dist: rich==13.9.4
|
|
21
20
|
Requires-Dist: tabulate>=0.9.0
|
|
22
21
|
Requires-Dist: toml
|
|
23
|
-
Requires-Dist: yellowdog-sdk
|
|
22
|
+
Requires-Dist: yellowdog-sdk>=9.1.1
|
|
24
23
|
Provides-Extra: jsonnet
|
|
25
24
|
Requires-Dist: jsonnet; extra == "jsonnet"
|
|
26
25
|
Provides-Extra: cloudwizard
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "7.16.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/tests/test_create_remove.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/tests/test_entrypoints.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/abort.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/admin.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/boost.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/cloudwizard.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/compare.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/delete.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/download.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/follow.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/format_json.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/instantiate.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/jsonnet2json.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/provision.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/remove.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/resize.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/shutdown.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/start.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/submit.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/terminate.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/upload.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/items.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/utils/wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.16.2 → yellowdog_python_examples-7.16.3}/yellowdog_cli/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|