yellowdog-python-examples 7.11.1__tar.gz → 7.11.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-7.11.1/yellowdog_python_examples.egg-info → yellowdog_python_examples-7.11.2}/PKG-INFO +2 -1
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/PYPI_README.md +1 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/README.md +1 -1
- yellowdog_python_examples-7.11.2/yd_commands/__init__.py +1 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/utils.py +2 -2
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/variables.py +17 -5
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2/yellowdog_python_examples.egg-info}/PKG-INFO +2 -1
- yellowdog_python_examples-7.11.1/yd_commands/__init__.py +0 -1
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/LICENSE +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/pyproject.toml +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/requirements.txt +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/setup.cfg +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/setup.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_create_remove.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_demos.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_dryruns.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_entrypoints.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_gui.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_list.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_objects.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_variable_processing.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/abort.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/admin.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/args.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/boost.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cancel.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/check_imports.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_aws.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_aws_types.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_azure.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_common.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_gcp.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/compact_json.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/config_types.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/create.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/csv_data.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/delete.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/download.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/follow.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/follow_utils.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/format_json.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/hold.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/id_utils.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/instantiate.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/interactive.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/items.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/jsonnet2json.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/list.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/load_config.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/load_resources.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/object_utilities.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/printing.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/property_names.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/provision.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/provision_utils.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/remove.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/resize.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/settings.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/show.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/shutdown.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/start.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/start_hold_common.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/submit.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/submit_utils.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/terminate.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/type_check.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/upload.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/upload_utils.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/validate_properties.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/version.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/wrapper.py +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yellowdog_python_examples.egg-info/SOURCES.txt +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yellowdog_python_examples.egg-info/dependency_links.txt +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yellowdog_python_examples.egg-info/entry_points.txt +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yellowdog_python_examples.egg-info/requires.txt +0 -0
- {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yellowdog_python_examples.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: yellowdog-python-examples
|
|
3
|
-
Version: 7.11.
|
|
3
|
+
Version: 7.11.2
|
|
4
4
|
Summary: Example Python commands using the YellowDog Python SDK
|
|
5
5
|
Home-page: https://github.com/yellowdog/python-examples
|
|
6
6
|
Author: YellowDog Limited
|
|
@@ -57,5 +57,6 @@ The command scripts support:
|
|
|
57
57
|
- **Boosting** Allowances with the **`yd-boost`** command
|
|
58
58
|
- **Creating, Updating and Removing** Source Templates, Compute Templates, Keyrings, Credentials, Namespace Storage Configurations, Image Families, Allowances, and Configured Worker Pools with the **`yd-create`** and **`yd-remove`** commands
|
|
59
59
|
- **Following Event Streams** for Work Requirements, Worker Pools and Compute Requirements with the **`yd-follow`** command
|
|
60
|
+
- **Showing** the details of any YellowDog entity by its YellowDog ID with the **`yd-show`** command
|
|
60
61
|
|
|
61
62
|
Please see the documenation in the [GitHub repository](https://github.com/yellowdog/python-examples) for more details.
|
|
@@ -22,5 +22,6 @@ The command scripts support:
|
|
|
22
22
|
- **Boosting** Allowances with the **`yd-boost`** command
|
|
23
23
|
- **Creating, Updating and Removing** Source Templates, Compute Templates, Keyrings, Credentials, Namespace Storage Configurations, Image Families, Allowances, and Configured Worker Pools with the **`yd-create`** and **`yd-remove`** commands
|
|
24
24
|
- **Following Event Streams** for Work Requirements, Worker Pools and Compute Requirements with the **`yd-follow`** command
|
|
25
|
+
- **Showing** the details of any YellowDog entity by its YellowDog ID with the **`yd-show`** command
|
|
25
26
|
|
|
26
27
|
Please see the documenation in the [GitHub repository](https://github.com/yellowdog/python-examples) for more details.
|
|
@@ -152,7 +152,7 @@ The commands provide the following capabilities:
|
|
|
152
152
|
- **Boosting** Allowances with the **`yd-boost`** command
|
|
153
153
|
- **Creating, Updating and Removing** Source Templates, Compute Templates, Keyrings, Credentials, Namespace Storage Configurations, Image Families, Allowances, and Configured Worker Pools with the **`yd-create`** and **`yd-remove`** commands
|
|
154
154
|
- **Following Event Streams** for Work Requirements, Worker Pools and Compute Requirements with the **`yd-follow`** command
|
|
155
|
-
- **Showing** the details of any YellowDog entity by its YellowDog ID
|
|
155
|
+
- **Showing** the details of any YellowDog entity by its YellowDog ID with the **`yd-show`** command
|
|
156
156
|
|
|
157
157
|
The operation of the commands is controlled using TOML configuration files and/or environment variables and command line arguments. In addition, Work Requirements and Worker Pools can be defined using JSON files providing extensive configurability.
|
|
158
158
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "7.11.2"
|
|
@@ -4,7 +4,7 @@ General utility functions.
|
|
|
4
4
|
|
|
5
5
|
import re
|
|
6
6
|
from dataclasses import dataclass
|
|
7
|
-
from datetime import datetime
|
|
7
|
+
from datetime import datetime, timezone
|
|
8
8
|
from os.path import join, normpath, relpath
|
|
9
9
|
from typing import List, Optional
|
|
10
10
|
from urllib.parse import urlparse
|
|
@@ -18,7 +18,7 @@ from yellowdog_client.model import (
|
|
|
18
18
|
|
|
19
19
|
from yd_commands.settings import NAMESPACE_PREFIX_SEPARATOR
|
|
20
20
|
|
|
21
|
-
UTCNOW = datetime.
|
|
21
|
+
UTCNOW = datetime.now(timezone.utc)
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
def unpack_namespace_in_prefix(namespace: str, prefix: str) -> (str, str):
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/variables.py
RENAMED
|
@@ -70,29 +70,41 @@ if "submit" in sys.argv[0]:
|
|
|
70
70
|
L_TASK_GROUP_COUNT = "task_group_count"
|
|
71
71
|
|
|
72
72
|
# Substitutions from environment variables
|
|
73
|
+
subs_list = []
|
|
73
74
|
for key, value in os.environ.items():
|
|
74
75
|
if key.startswith(ENV_VAR_PREFIX):
|
|
75
76
|
key = key[len(ENV_VAR_PREFIX) :]
|
|
76
77
|
VARIABLE_SUBSTITUTIONS[key] = value
|
|
77
|
-
|
|
78
|
+
subs_list.append(f"'{key}'")
|
|
79
|
+
|
|
80
|
+
if len(subs_list) > 0:
|
|
81
|
+
print_log(
|
|
82
|
+
f"Adding environment-defined variable substitution for: {', '.join(subs_list)}"
|
|
83
|
+
)
|
|
78
84
|
|
|
79
85
|
# Substitutions from the command line, which take precedence over
|
|
80
86
|
# environment variables
|
|
87
|
+
subs_list = []
|
|
81
88
|
if ARGS_PARSER.variables is not None:
|
|
82
89
|
for variable in ARGS_PARSER.variables:
|
|
83
90
|
key_value: List = variable.split("=")
|
|
84
91
|
if len(key_value) == 2:
|
|
85
92
|
VARIABLE_SUBSTITUTIONS[key_value[0]] = key_value[1]
|
|
86
|
-
|
|
87
|
-
"Adding command-line-defined variable substitution for "
|
|
88
|
-
f"'{key_value[0]}'"
|
|
89
|
-
)
|
|
93
|
+
subs_list.append(f"'{key_value[0]}'")
|
|
90
94
|
else:
|
|
91
95
|
print_error(
|
|
92
96
|
f"Error in variable substitution '{key_value[0]}'",
|
|
93
97
|
)
|
|
94
98
|
exit(1) # Note: exception trap not yet in place
|
|
95
99
|
|
|
100
|
+
if len(subs_list) > 0:
|
|
101
|
+
print_log(
|
|
102
|
+
"Adding command-line-defined variable substitutions for "
|
|
103
|
+
f"{', '.join(subs_list)}"
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
del subs_list
|
|
107
|
+
|
|
96
108
|
|
|
97
109
|
def add_substitutions_without_overwriting(subs: Dict):
|
|
98
110
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: yellowdog-python-examples
|
|
3
|
-
Version: 7.11.
|
|
3
|
+
Version: 7.11.2
|
|
4
4
|
Summary: Example Python commands using the YellowDog Python SDK
|
|
5
5
|
Home-page: https://github.com/yellowdog/python-examples
|
|
6
6
|
Author: YellowDog Limited
|
|
@@ -57,5 +57,6 @@ The command scripts support:
|
|
|
57
57
|
- **Boosting** Allowances with the **`yd-boost`** command
|
|
58
58
|
- **Creating, Updating and Removing** Source Templates, Compute Templates, Keyrings, Credentials, Namespace Storage Configurations, Image Families, Allowances, and Configured Worker Pools with the **`yd-create`** and **`yd-remove`** commands
|
|
59
59
|
- **Following Event Streams** for Work Requirements, Worker Pools and Compute Requirements with the **`yd-follow`** command
|
|
60
|
+
- **Showing** the details of any YellowDog entity by its YellowDog ID with the **`yd-show`** command
|
|
60
61
|
|
|
61
62
|
Please see the documenation in the [GitHub repository](https://github.com/yellowdog/python-examples) for more details.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "7.11.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_create_remove.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/check_imports.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_aws.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_gcp.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/compact_json.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/config_types.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/csv_data.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/download.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/follow_utils.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/format_json.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/id_utils.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/instantiate.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/interactive.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/jsonnet2json.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/load_config.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/load_resources.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/printing.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/property_names.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/provision.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/provision_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/settings.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/shutdown.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/submit_utils.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/terminate.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/type_check.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/upload_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/version.py
RENAMED
|
File without changes
|
{yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/wrapper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|