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.
Files changed (77) hide show
  1. {yellowdog_python_examples-7.11.1/yellowdog_python_examples.egg-info → yellowdog_python_examples-7.11.2}/PKG-INFO +2 -1
  2. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/PYPI_README.md +1 -0
  3. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/README.md +1 -1
  4. yellowdog_python_examples-7.11.2/yd_commands/__init__.py +1 -0
  5. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/utils.py +2 -2
  6. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/variables.py +17 -5
  7. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2/yellowdog_python_examples.egg-info}/PKG-INFO +2 -1
  8. yellowdog_python_examples-7.11.1/yd_commands/__init__.py +0 -1
  9. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/LICENSE +0 -0
  10. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/pyproject.toml +0 -0
  11. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/requirements.txt +0 -0
  12. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/setup.cfg +0 -0
  13. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/setup.py +0 -0
  14. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_create_remove.py +0 -0
  15. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_demos.py +0 -0
  16. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_dryruns.py +0 -0
  17. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_entrypoints.py +0 -0
  18. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_gui.py +0 -0
  19. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_list.py +0 -0
  20. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_objects.py +0 -0
  21. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/tests/test_variable_processing.py +0 -0
  22. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/abort.py +0 -0
  23. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/admin.py +0 -0
  24. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/args.py +0 -0
  25. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/boost.py +0 -0
  26. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cancel.py +0 -0
  27. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/check_imports.py +0 -0
  28. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard.py +0 -0
  29. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_aws.py +0 -0
  30. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_aws_types.py +0 -0
  31. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_azure.py +0 -0
  32. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_common.py +0 -0
  33. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/cloudwizard_gcp.py +0 -0
  34. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/compact_json.py +0 -0
  35. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/config_types.py +0 -0
  36. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/create.py +0 -0
  37. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/csv_data.py +0 -0
  38. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/delete.py +0 -0
  39. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/download.py +0 -0
  40. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/follow.py +0 -0
  41. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/follow_utils.py +0 -0
  42. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/format_json.py +0 -0
  43. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/hold.py +0 -0
  44. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/id_utils.py +0 -0
  45. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/instantiate.py +0 -0
  46. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/interactive.py +0 -0
  47. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/items.py +0 -0
  48. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/jsonnet2json.py +0 -0
  49. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/list.py +0 -0
  50. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/load_config.py +0 -0
  51. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/load_resources.py +0 -0
  52. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/object_utilities.py +0 -0
  53. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/printing.py +0 -0
  54. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/property_names.py +0 -0
  55. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/provision.py +0 -0
  56. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/provision_utils.py +0 -0
  57. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/remove.py +0 -0
  58. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/resize.py +0 -0
  59. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/settings.py +0 -0
  60. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/show.py +0 -0
  61. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/shutdown.py +0 -0
  62. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/start.py +0 -0
  63. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/start_hold_common.py +0 -0
  64. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/submit.py +0 -0
  65. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/submit_utils.py +0 -0
  66. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/terminate.py +0 -0
  67. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/type_check.py +0 -0
  68. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/upload.py +0 -0
  69. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/upload_utils.py +0 -0
  70. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/validate_properties.py +0 -0
  71. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/version.py +0 -0
  72. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yd_commands/wrapper.py +0 -0
  73. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yellowdog_python_examples.egg-info/SOURCES.txt +0 -0
  74. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yellowdog_python_examples.egg-info/dependency_links.txt +0 -0
  75. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yellowdog_python_examples.egg-info/entry_points.txt +0 -0
  76. {yellowdog_python_examples-7.11.1 → yellowdog_python_examples-7.11.2}/yellowdog_python_examples.egg-info/requires.txt +0 -0
  77. {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.1
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.utcnow()
21
+ UTCNOW = datetime.now(timezone.utc)
22
22
 
23
23
 
24
24
  def unpack_namespace_in_prefix(namespace: str, prefix: str) -> (str, str):
@@ -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
- print_log(f"Adding environment-defined variable substitution for '{key}'")
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
- print_log(
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.1
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"