yellowdog-python-examples 8.4.2__tar.gz → 8.4.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-8.4.2 → yellowdog_python_examples-8.4.3}/PKG-INFO +1 -1
- yellowdog_python_examples-8.4.3/yellowdog_cli/__init__.py +1 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/show.py +17 -17
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/args.py +4 -14
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/variables.py +7 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_python_examples.egg-info/PKG-INFO +1 -1
- yellowdog_python_examples-8.4.2/yellowdog_cli/__init__.py +0 -1
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/LICENSE +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/PYPI_README.md +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/README.md +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/pyproject.toml +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/requirements.txt +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/setup.cfg +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/tests/test_create_remove.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/tests/test_demos.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/tests/test_dryruns.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/tests/test_entrypoints.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/tests/test_gui.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/tests/test_list.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/tests/test_objects.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/tests/test_variable_processing.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/abort.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/admin.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/application.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/boost.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/cancel.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/cloudwizard.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/compare.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/create.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/delete.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/download.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/finish.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/follow.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/format_json.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/hold.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/instantiate.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/jsonnet2json.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/list.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/provision.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/remove.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/resize.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/shutdown.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/start.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/submit.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/terminate.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/upload.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/__init__.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/check_imports.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/cloudwizard_aws.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/cloudwizard_aws_types.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/cloudwizard_azure.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/cloudwizard_common.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/cloudwizard_gcp.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/compact_json.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/config_types.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/csv_data.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/entity_utils.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/follow_utils.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/interactive.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/items.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/load_config.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/load_resources.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/misc_utils.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/printing.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/property_names.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/provision_utils.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/rich_console_input_fixed.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/settings.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/start_hold_common.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/submit_utils.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/type_check.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/upload_utils.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/validate_properties.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/wrapper.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/ydid_utils.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/version.py +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_python_examples.egg-info/SOURCES.txt +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_python_examples.egg-info/dependency_links.txt +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_python_examples.egg-info/entry_points.txt +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_python_examples.egg-info/requires.txt +0 -0
- {yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_python_examples.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "8.4.3"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
Command to show the JSON details of YellowDog entities via their IDs.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
+
from typing import List
|
|
8
|
+
|
|
7
9
|
from yellowdog_client.model import ConfiguredWorkerPool
|
|
8
10
|
|
|
9
11
|
from yellowdog_cli.list import get_keyring
|
|
@@ -33,16 +35,16 @@ from yellowdog_cli.utils.settings import (
|
|
|
33
35
|
RN_ROLE,
|
|
34
36
|
RN_SOURCE_TEMPLATE,
|
|
35
37
|
)
|
|
36
|
-
from yellowdog_cli.utils.variables import get_user_variable
|
|
37
|
-
from yellowdog_cli.utils.wrapper import ARGS_PARSER, CLIENT,
|
|
38
|
+
from yellowdog_cli.utils.variables import get_all_user_variables, get_user_variable
|
|
39
|
+
from yellowdog_cli.utils.wrapper import ARGS_PARSER, CLIENT, main_wrapper
|
|
38
40
|
from yellowdog_cli.utils.ydid_utils import YDIDType, get_ydid_type
|
|
39
41
|
|
|
40
42
|
|
|
41
43
|
@main_wrapper
|
|
42
44
|
def main():
|
|
43
45
|
|
|
44
|
-
if ARGS_PARSER.
|
|
45
|
-
_report_variables()
|
|
46
|
+
if ARGS_PARSER.report_variables is not None: # Report selected variables and return
|
|
47
|
+
_report_variables(ARGS_PARSER.report_variables)
|
|
46
48
|
return
|
|
47
49
|
|
|
48
50
|
# Generate a JSON list of resources if there are multiple YDIDs
|
|
@@ -281,31 +283,29 @@ def show_details(ydid: str, initial_indent: int = 0, with_final_comma: bool = Fa
|
|
|
281
283
|
print_error(f"Unable to show details for '{ydid}': {e}")
|
|
282
284
|
|
|
283
285
|
|
|
284
|
-
def _report_variables():
|
|
286
|
+
def _report_variables(variable_names: List[str]):
|
|
285
287
|
"""
|
|
286
288
|
Convenience function to report the processed values of user variables.
|
|
287
289
|
"""
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
if "all" in variable_names:
|
|
291
|
+
variables = get_all_user_variables()
|
|
292
|
+
else:
|
|
293
|
+
variables = {
|
|
292
294
|
variable_name: get_user_variable(variable_name)
|
|
293
295
|
for variable_name in ARGS_PARSER.report_variables
|
|
294
296
|
}
|
|
295
|
-
)
|
|
296
|
-
if ARGS_PARSER.quiet:
|
|
297
|
-
print_json(data)
|
|
298
|
-
return
|
|
297
|
+
variables_sorted = dict(sorted(variables.items()))
|
|
299
298
|
|
|
300
|
-
if ARGS_PARSER.
|
|
301
|
-
|
|
299
|
+
if ARGS_PARSER.quiet:
|
|
300
|
+
print_json(variables_sorted)
|
|
302
301
|
return
|
|
303
302
|
|
|
304
303
|
print_info("Reporting selected variable values:")
|
|
305
|
-
for name
|
|
304
|
+
max_var_name = max(len(name) for name in variables_sorted)
|
|
305
|
+
for name, value in variables_sorted.items():
|
|
306
306
|
print(
|
|
307
307
|
f" {name}"
|
|
308
|
-
f"{' '* (
|
|
308
|
+
f"{' '* (max_var_name - len(name))} "
|
|
309
309
|
f"= {value}"
|
|
310
310
|
)
|
|
311
311
|
return
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/args.py
RENAMED
|
@@ -1202,12 +1202,6 @@ class CLIParser:
|
|
|
1202
1202
|
"configured worker pool"
|
|
1203
1203
|
),
|
|
1204
1204
|
)
|
|
1205
|
-
parser.add_argument(
|
|
1206
|
-
"--parse-config",
|
|
1207
|
-
action="store_true",
|
|
1208
|
-
required=False,
|
|
1209
|
-
help="parse the config and return namespace, tag, username, then exit",
|
|
1210
|
-
)
|
|
1211
1205
|
parser.add_argument(
|
|
1212
1206
|
"--report-variable",
|
|
1213
1207
|
"-r",
|
|
@@ -1215,9 +1209,10 @@ class CLIParser:
|
|
|
1215
1209
|
required=False,
|
|
1216
1210
|
action="append",
|
|
1217
1211
|
help=(
|
|
1218
|
-
"report the processed value of the specified variable
|
|
1219
|
-
"
|
|
1220
|
-
"
|
|
1212
|
+
"report the processed value of the specified variable and exit; "
|
|
1213
|
+
"the option can be supplied multiple times, one per variable, "
|
|
1214
|
+
"or use 'all' to report all variables; use with '--quiet' for "
|
|
1215
|
+
"output in JSON"
|
|
1221
1216
|
),
|
|
1222
1217
|
metavar="<var>",
|
|
1223
1218
|
)
|
|
@@ -1330,11 +1325,6 @@ class CLIParser:
|
|
|
1330
1325
|
def print_pid(self) -> Optional[bool]:
|
|
1331
1326
|
return self.args.print_pid
|
|
1332
1327
|
|
|
1333
|
-
@property
|
|
1334
|
-
@allow_missing_attribute
|
|
1335
|
-
def parse_config(self) -> Optional[bool]:
|
|
1336
|
-
return self.args.parse_config
|
|
1337
|
-
|
|
1338
1328
|
@property
|
|
1339
1329
|
@allow_missing_attribute
|
|
1340
1330
|
def no_config(self) -> Optional[bool]:
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/variables.py
RENAMED
|
@@ -137,6 +137,13 @@ def get_user_variable(variable_name: str) -> Optional[str]:
|
|
|
137
137
|
return VARIABLE_SUBSTITUTIONS.get(variable_name)
|
|
138
138
|
|
|
139
139
|
|
|
140
|
+
def get_all_user_variables() -> Dict:
|
|
141
|
+
"""
|
|
142
|
+
Return all the user variables.
|
|
143
|
+
"""
|
|
144
|
+
return VARIABLE_SUBSTITUTIONS
|
|
145
|
+
|
|
146
|
+
|
|
140
147
|
def process_variable_substitutions_insitu(
|
|
141
148
|
data: Union[Dict, List], prefix: str = "", postfix: str = ""
|
|
142
149
|
) -> Union[Dict, List]:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "8.4.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/tests/test_create_remove.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/tests/test_entrypoints.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/application.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/cloudwizard.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/compare.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/download.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/format_json.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/instantiate.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/jsonnet2json.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/provision.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/shutdown.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/terminate.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/__init__.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
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/csv_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/items.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/printing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/settings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/utils/wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.2 → yellowdog_python_examples-8.4.3}/yellowdog_cli/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|