yellowdog-python-examples 8.4.1__tar.gz → 8.4.2__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.1 → yellowdog_python_examples-8.4.2}/PKG-INFO +1 -1
- yellowdog_python_examples-8.4.2/yellowdog_cli/__init__.py +1 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/show.py +32 -21
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/args.py +24 -8
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_python_examples.egg-info/PKG-INFO +1 -1
- yellowdog_python_examples-8.4.1/yellowdog_cli/__init__.py +0 -1
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/LICENSE +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/PYPI_README.md +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/README.md +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/pyproject.toml +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/requirements.txt +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/setup.cfg +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/tests/test_create_remove.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/tests/test_demos.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/tests/test_dryruns.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/tests/test_entrypoints.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/tests/test_gui.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/tests/test_list.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/tests/test_objects.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/tests/test_variable_processing.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/abort.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/admin.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/application.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/boost.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/cancel.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/cloudwizard.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/compare.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/create.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/delete.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/download.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/finish.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/follow.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/format_json.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/hold.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/instantiate.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/jsonnet2json.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/list.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/provision.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/remove.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/resize.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/shutdown.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/start.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/submit.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/terminate.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/upload.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/__init__.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/check_imports.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/cloudwizard_aws.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/cloudwizard_aws_types.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/cloudwizard_azure.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/cloudwizard_common.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/cloudwizard_gcp.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/compact_json.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/config_types.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/csv_data.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/entity_utils.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/follow_utils.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/interactive.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/items.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/load_config.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/load_resources.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/misc_utils.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/printing.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/property_names.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/provision_utils.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/rich_console_input_fixed.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/settings.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/start_hold_common.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/submit_utils.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/type_check.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/upload_utils.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/validate_properties.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/variables.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/wrapper.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/ydid_utils.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/version.py +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_python_examples.egg-info/SOURCES.txt +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_python_examples.egg-info/dependency_links.txt +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_python_examples.egg-info/entry_points.txt +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_python_examples.egg-info/requires.txt +0 -0
- {yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_python_examples.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "8.4.2"
|
|
@@ -41,27 +41,8 @@ from yellowdog_cli.utils.ydid_utils import YDIDType, get_ydid_type
|
|
|
41
41
|
@main_wrapper
|
|
42
42
|
def main():
|
|
43
43
|
|
|
44
|
-
if ARGS_PARSER.parse_config:
|
|
45
|
-
|
|
46
|
-
if ARGS_PARSER.quiet:
|
|
47
|
-
# Output properties in JSON format
|
|
48
|
-
print_json(
|
|
49
|
-
{
|
|
50
|
-
"namespace": CONFIG_COMMON.namespace,
|
|
51
|
-
"tag": CONFIG_COMMON.name_tag,
|
|
52
|
-
"username": username,
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
else:
|
|
56
|
-
# Print properties inline
|
|
57
|
-
print_info("Showing configuration values:")
|
|
58
|
-
print(f" namespace = {CONFIG_COMMON.namespace}")
|
|
59
|
-
print(f" tag = {CONFIG_COMMON.name_tag}")
|
|
60
|
-
print(f" username = {username}")
|
|
61
|
-
return
|
|
62
|
-
|
|
63
|
-
if len(ARGS_PARSER.yellowdog_ids) == 0:
|
|
64
|
-
print_info("No YellowDog IDs to show")
|
|
44
|
+
if ARGS_PARSER.parse_config: # Report selected variables and return
|
|
45
|
+
_report_variables()
|
|
65
46
|
return
|
|
66
47
|
|
|
67
48
|
# Generate a JSON list of resources if there are multiple YDIDs
|
|
@@ -300,6 +281,36 @@ def show_details(ydid: str, initial_indent: int = 0, with_final_comma: bool = Fa
|
|
|
300
281
|
print_error(f"Unable to show details for '{ydid}': {e}")
|
|
301
282
|
|
|
302
283
|
|
|
284
|
+
def _report_variables():
|
|
285
|
+
"""
|
|
286
|
+
Convenience function to report the processed values of user variables.
|
|
287
|
+
"""
|
|
288
|
+
data = (
|
|
289
|
+
{}
|
|
290
|
+
if ARGS_PARSER.report_variables is None
|
|
291
|
+
else {
|
|
292
|
+
variable_name: get_user_variable(variable_name)
|
|
293
|
+
for variable_name in ARGS_PARSER.report_variables
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
if ARGS_PARSER.quiet:
|
|
297
|
+
print_json(data)
|
|
298
|
+
return
|
|
299
|
+
|
|
300
|
+
if ARGS_PARSER.report_variables is None:
|
|
301
|
+
print_info("No variables selected for reporting")
|
|
302
|
+
return
|
|
303
|
+
|
|
304
|
+
print_info("Reporting selected variable values:")
|
|
305
|
+
for name, value in data.items():
|
|
306
|
+
print(
|
|
307
|
+
f" {name}"
|
|
308
|
+
f"{' '* (20 - len(name)) if len(name) < 20 else ''} "
|
|
309
|
+
f"= {value}"
|
|
310
|
+
)
|
|
311
|
+
return
|
|
312
|
+
|
|
313
|
+
|
|
303
314
|
# Entry point
|
|
304
315
|
if __name__ == "__main__":
|
|
305
316
|
main()
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/args.py
RENAMED
|
@@ -1001,14 +1001,6 @@ class CLIParser:
|
|
|
1001
1001
|
help=f"the YellowDog ID(s) of the item(s) to {verb}",
|
|
1002
1002
|
)
|
|
1003
1003
|
|
|
1004
|
-
if any(module in sys.argv[0] for module in ["show"]):
|
|
1005
|
-
parser.add_argument(
|
|
1006
|
-
"--parse-config",
|
|
1007
|
-
action="store_true",
|
|
1008
|
-
required=False,
|
|
1009
|
-
help="parse the config and return namespace, tag, username, then exit",
|
|
1010
|
-
)
|
|
1011
|
-
|
|
1012
1004
|
if any(
|
|
1013
1005
|
module in sys.argv[0]
|
|
1014
1006
|
for module in ["upload", "submit", "provision", "instantiate"]
|
|
@@ -1210,6 +1202,25 @@ class CLIParser:
|
|
|
1210
1202
|
"configured worker pool"
|
|
1211
1203
|
),
|
|
1212
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
|
+
parser.add_argument(
|
|
1212
|
+
"--report-variable",
|
|
1213
|
+
"-r",
|
|
1214
|
+
type=str,
|
|
1215
|
+
required=False,
|
|
1216
|
+
action="append",
|
|
1217
|
+
help=(
|
|
1218
|
+
"report the processed value of the specified variable, "
|
|
1219
|
+
"when used with '--parse-config; the option can be supplied "
|
|
1220
|
+
"multiple times, one per variable"
|
|
1221
|
+
),
|
|
1222
|
+
metavar="<var>",
|
|
1223
|
+
)
|
|
1213
1224
|
|
|
1214
1225
|
if any(module in sys.argv[0] for module in ["list", "show"]):
|
|
1215
1226
|
parser.add_argument(
|
|
@@ -1842,6 +1853,11 @@ class CLIParser:
|
|
|
1842
1853
|
def auto_select_all(self) -> Optional[bool]:
|
|
1843
1854
|
return self.args.auto_select_all
|
|
1844
1855
|
|
|
1856
|
+
@property
|
|
1857
|
+
@allow_missing_attribute
|
|
1858
|
+
def report_variables(self) -> Optional[List[str]]:
|
|
1859
|
+
return self.args.report_variable
|
|
1860
|
+
|
|
1845
1861
|
|
|
1846
1862
|
def lookup_module_description(module_name: str) -> Optional[str]:
|
|
1847
1863
|
"""
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "8.4.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/tests/test_create_remove.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/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.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/application.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/cloudwizard.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/compare.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/download.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/format_json.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/instantiate.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/jsonnet2json.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/provision.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/shutdown.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/terminate.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/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.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/csv_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/items.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/printing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/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.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/variables.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/utils/wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-8.4.1 → yellowdog_python_examples-8.4.2}/yellowdog_cli/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|