ciocore 8.0.0b29__py2.py3-none-any.whl → 8.0.0b30__py2.py3-none-any.whl

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.

Potentially problematic release.


This version of ciocore might be problematic. Click here for more details.

Binary file
@@ -35,9 +35,9 @@ class PackageEnvironment(object):
35
35
 
36
36
  The first time data is added to a PackageEnvironment, the platform is set in stone. Subsequent `adds` that try to change the platform are considered an error.
37
37
 
38
- Each variable to be added specifies a merge_policy: `append` or `exclusive`. Once an individual variable has been initialized with a merge policy, it can't be changed. This means:
38
+ Each variable to be added specifies a merge_policy: `append`, `prepend`, or `exclusive` `append` and `prepend` can be thought of as lists= types. Once an individual variable has been initialized as a list, it can't be changed to `exclusive`. This means:
39
39
 
40
- 1. It's not possible to overwrite variables that have been set as append.
40
+ 1. It's not possible to overwrite variables that have been added as `append` or `prepend`.
41
41
  2. Exclusive variables are always overwritten by subsequent adds.
42
42
 
43
43
  Raises:
@@ -95,11 +95,13 @@ class PackageEnvironment(object):
95
95
  name = var["name"]
96
96
  value = var["value"]
97
97
  policy = var["merge_policy"]
98
- if policy not in ["append", "exclusive"]:
98
+ if policy not in ["append", "prepend", "exclusive"]:
99
99
  raise ValueError("Unexpected merge policy: %s" % policy)
100
100
 
101
101
  if policy == "append":
102
102
  self._append(name, value)
103
+ elif policy == "prepend":
104
+ self._prepend(name, value)
103
105
  else:
104
106
  self._set(name, value)
105
107
 
@@ -133,6 +135,22 @@ class PackageEnvironment(object):
133
135
  self._env[name] = []
134
136
  self._env[name].append(value)
135
137
 
138
+ def _prepend(self, name, value):
139
+ """Set the value of an append/prepend variable.
140
+
141
+ Can be appended to with subsequent adds.
142
+
143
+ It is an error if the variable has already been declared with policy=exclusive.
144
+ """
145
+ if self._env.get(name):
146
+ if not isinstance(self._env[name], list):
147
+ raise ValueError(
148
+ "Can't change merge policy for '{}' from 'exclusive' to 'prepend'.".format(name)
149
+ )
150
+ else:
151
+ self._env[name] = []
152
+ self._env[name].insert(0, value)
153
+
136
154
  def __iter__(self):
137
155
  """Cast the object as a dict."""
138
156
  sep = ";" if self.platform == "windows" else ":"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ciocore
3
- Version: 8.0.0b29
3
+ Version: 8.0.0b30
4
4
  Summary: Core functionality for Conductor's client tools
5
5
  Home-page: https://github.com/ConductorTechnologies/ciocore
6
6
  Author: conductor
@@ -51,7 +51,8 @@ See [CONTRIBUTING](CONTRIBUTING.md)
51
51
 
52
52
  ## Changelog
53
53
 
54
- ## Version: 8.0.0-beta.29 -- 30 Mar 2024
54
+ ## Version: 8.0.0-beta.30 -- 30 Mar 2024
55
+
55
56
 
56
57
  Major Updates in Version 8.0.0
57
58
 
@@ -61,7 +62,8 @@ Major Updates in Version 8.0.0
61
62
  * The `conductor` commandline now supports a new subcommand, `docs`, which opens API and commandline documentation in a local web browser. The documentation is generated using `mkdocs` and is included in the package. This command is useful as it ensures the **API** documentation is relevant to the version of the tool being used.
62
63
  * The `conductor` commandline now supports a new subcommand, `packages`, which displays all available software packages on Conductor's cloud. The command can output the document as text, markdown, or nicely formatted HTML. The data is pulled from the Conductor server and is always up-to-date.
63
64
  * The Python API now provides four new endpoints: `kill_tasks`, `kill_jobs`, `get_jobs`, and `get_log`.
64
- * The Python API now provides access to entries in the Dashboard's Extra Environment Variables section. This feature allows administrators to set environment variables that are passed to all jobs run on the cloud. It's especially useful for setting up access to license servers or other shared resources.
65
+ * The Python API now provides access to entries in the Dashboard's Extra Environment Variables section. This feature allows administrators to set environment variables that are passed to all jobs run on the cloud. It's useful for setting up access to license servers or other shared resources. The API is open to clients so that they may insert account-widse variables with the correct level of precedence.
66
+ * In addition, the environment variable schema has been extended to support a merge policy of `prepend`. This policy allows users to add new values to the beginning of the list of values for an environment variable and is useful for search paths.
65
67
 
66
68
 
67
69
  ## Version:7.0.2 -- 10 Nov 2023
@@ -1,4 +1,4 @@
1
- ciocore/VERSION,sha256=XlqO4qN_smGJF38Bz0RcIlXfqSCxhHSod3Bi6Rj2Z8o,13
1
+ ciocore/VERSION,sha256=Vkxt3Epb7bEJgkFq0a_kSETZOTosIK30xjlYmzpMRB0,13
2
2
  ciocore/__init__.py,sha256=aTP7LeeosQA8BZE67gDV4jgfTK5zxmwZRjiTRu_ZWj0,646
3
3
  ciocore/api_client.py,sha256=TyHXGmK4uTmKV93O_IpAvttZhbexIIZTGP-IVn_WyWM,24599
4
4
  ciocore/cli.py,sha256=BXgULpqElTHwX6nUcSFVVh99MCBSG2FjuOzRKhIa6Hk,15399
@@ -13,7 +13,7 @@ ciocore/exceptions.py,sha256=4Oq-WX-qiN6kPUdBCHvvd6mtSQ0nCkDbJxWt2CNtpv8,1504
13
13
  ciocore/file_utils.py,sha256=bAlL31B4YkRgX-yT8kF8UXBFktQlsE1PvxbKqTeAeOU,17174
14
14
  ciocore/hardware_set.py,sha256=FlRQiGCLRcSW7Oko_gzgVK8ZqJ_J92eT8e_AleAbS2E,17047
15
15
  ciocore/loggeria.py,sha256=2xdQRFb9NyXynU2O_pSOszJWcpoHgPwTUWJvERg7ODY,15251
16
- ciocore/package_environment.py,sha256=9lPyZqFPnycDcGKpL8HG2XMxmblrRTK00ze8-peS5mE,7045
16
+ ciocore/package_environment.py,sha256=MEHV7jfs3NJIEYCIaW8JfJdBmelvPHZMmBzPlXETiRo,7808
17
17
  ciocore/package_query.py,sha256=2m5EBXfu1lmqupZrFF8f8mfkX_PgijpdMxCtFI5e5s0,5574
18
18
  ciocore/package_tree.py,sha256=vkORKXxQ7dO8l0_96eFwm-5AUVL0rP9bhgWYhW_v3lo,15649
19
19
  ciocore/post_install.py,sha256=zu5Ctz2ANbKD-f5G2ODLIhKkWENBi4F3UKKu50OEWrg,1000
@@ -27,13 +27,13 @@ ciocore/docsite/index.html,sha256=p_Dq_6_8cwZZPDI5zjahfCWUkfbSj14NJtoQFAZv0WI,20
27
27
  ciocore/docsite/logo.png,sha256=gArgFFWdw8w985-0TkuGIgU_pW9sziEMZdqytXb5WLo,2825
28
28
  ciocore/docsite/objects.inv,sha256=s2FKStLlVIQbfG7U2-nw-7rz4unvd1W0u00YtLBxAKo,758
29
29
  ciocore/docsite/sitemap.xml,sha256=M_V85zl0y2adRvzJAnoCxlZH_Hl7TLnIb1A-6l_xGmI,109
30
- ciocore/docsite/sitemap.xml.gz,sha256=w5DLJrlr2lrhIadg85ABMEdEM0uhOIlOUoYF7J_4zjQ,127
30
+ ciocore/docsite/sitemap.xml.gz,sha256=tbhqnE2N3ntESeUk70fCrxZKJ1spKDyCkwJGAC9CnL0,127
31
31
  ciocore/docsite/apidoc/api_client/index.html,sha256=mHDq-zdWuilDKUluzmQNdOsImRoGEnnK5Ul2ApajgdU,170218
32
32
  ciocore/docsite/apidoc/apidoc/index.html,sha256=NQn8wjapxa7O2IQhsbE7Y-VMfMFL6Tby-L7qIF6K3m4,26171
33
33
  ciocore/docsite/apidoc/config/index.html,sha256=1GWkyClM7LJlLBpx07BqCi3xDkU-SKVPjNUEeKuwbNs,72559
34
34
  ciocore/docsite/apidoc/data/index.html,sha256=9DonjpASPYZGYRHjyaodkK3AxSlTHsvm1xdq2cqMxPI,50850
35
35
  ciocore/docsite/apidoc/hardware_set/index.html,sha256=DMlpzQCy2ypJ078tcFNrZAvG2sU7P5-ZwU4ZRCObtQg,123042
36
- ciocore/docsite/apidoc/package_environment/index.html,sha256=S5IE1EgnJaaLVsEpgPogwBvj3jxT6ycNp-1GAlJrPt4,65729
36
+ ciocore/docsite/apidoc/package_environment/index.html,sha256=M2L6Pu00jYj5AdhHQXrNZjOKVWCXYtgL8I34zL6B0i4,69248
37
37
  ciocore/docsite/apidoc/package_tree/index.html,sha256=wKW5dsHBlcDyvCGakSNzYHX8z99F1Vhu2NyqAW6c1ko,109393
38
38
  ciocore/docsite/assets/_mkdocstrings.css,sha256=K3bqYEmxlOHQ3-M11JNbBWHCBDBLarkFRm8HuEYrAG4,341
39
39
  ciocore/docsite/assets/images/favicon.png,sha256=AjhUxD_Eslt5XuSVHIAZ494Fk__rb5GLXR8qm0elfP4,1870
@@ -82,7 +82,7 @@ ciocore/docsite/cmdline/downloader/index.html,sha256=DAVErhWEPuEtkQr7y9D_wjylzM9
82
82
  ciocore/docsite/cmdline/packages/index.html,sha256=j1YeMgdwZ6FyJGJii05AdtUWKRjyu1fOr3_bKJsLfEU,20923
83
83
  ciocore/docsite/cmdline/uploader/index.html,sha256=y0728lIAYC4b9mfpjNVfwQqXoqJrsdG49UY5u7B1p94,25123
84
84
  ciocore/docsite/how-to-guides/index.html,sha256=OFrFBTb9tuMn60Jd4oeM10Mw-d-0pyqwoKoo9g1biBM,20100
85
- ciocore/docsite/search/search_index.json,sha256=8R5VcEveS35Oe-LACgZF4QjnvO6ds5HhAhyAlRMjOeA,181518
85
+ ciocore/docsite/search/search_index.json,sha256=ZMAbHLAlwOTujgA32XJTA7SHogRYh9i-ioPFOxjjJ0s,182633
86
86
  ciocore/docsite/stylesheets/extra.css,sha256=qgfcao9TEBzf6ieAWN5rPyrea7YM_YgVg5qr4NPrxoU,354
87
87
  ciocore/docsite/stylesheets/tables.css,sha256=O2PEwlKC0RfvZCRV9UERqQRvhb6jcqO84PLew0bafF0,3279
88
88
  ciocore/downloader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -121,8 +121,8 @@ tests/test_uploader.py,sha256=B1llTJt_fqR6e_V_Jxfw9z73QgkFlEPU87xLYGzt-TQ,2914
121
121
  tests/test_validator.py,sha256=2fY66ayNc08PGyj2vTI-V_1yeCWJDngkj2zkUM5TTCI,1526
122
122
  tests/mocks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
123
123
  tests/mocks/glob.py,sha256=J2MH7nqi6NJOHuGdVWxhfeBd700_Ckj6cLh_8jSNkfg,215
124
- ciocore-8.0.0b29.dist-info/METADATA,sha256=RhJwGlupsp9OkYWYYaHTlZXpn_yNBG0stXRyo8KZacA,17850
125
- ciocore-8.0.0b29.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
126
- ciocore-8.0.0b29.dist-info/entry_points.txt,sha256=cCqcALMYbC4d8545V9w0Zysfg9MVuKWhzDQ2er4UfGE,47
127
- ciocore-8.0.0b29.dist-info/top_level.txt,sha256=SvlM5JlqULzAz00JZWfiUhfjhqDzYzSWssA87zdJl0o,14
128
- ciocore-8.0.0b29.dist-info/RECORD,,
124
+ ciocore-8.0.0b30.dist-info/METADATA,sha256=kTpsGj7FxL7iWHOoxVXXifNG-Zi75_KJvRbUTCJAzto,18201
125
+ ciocore-8.0.0b30.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
126
+ ciocore-8.0.0b30.dist-info/entry_points.txt,sha256=cCqcALMYbC4d8545V9w0Zysfg9MVuKWhzDQ2er4UfGE,47
127
+ ciocore-8.0.0b30.dist-info/top_level.txt,sha256=SvlM5JlqULzAz00JZWfiUhfjhqDzYzSWssA87zdJl0o,14
128
+ ciocore-8.0.0b30.dist-info/RECORD,,