ciocore 8.2.0b2__py2.py3-none-any.whl → 8.3.0b1__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.
- ciocore/VERSION +1 -1
- ciocore/api_client.py +1 -1
- ciocore/conductor_submit.py +71 -50
- ciocore/docsite/apidoc/api_client/index.html +1 -1
- ciocore/docsite/apidoc/hardware_set/index.html +10 -12
- ciocore/docsite/search/search_index.json +1 -1
- ciocore/docsite/sitemap.xml.gz +0 -0
- ciocore/hardware_set.py +10 -14
- {ciocore-8.2.0b2.dist-info → ciocore-8.3.0b1.dist-info}/METADATA +3 -2
- {ciocore-8.2.0b2.dist-info → ciocore-8.3.0b1.dist-info}/RECORD +14 -14
- tests/test_submit.py +40 -16
- {ciocore-8.2.0b2.dist-info → ciocore-8.3.0b1.dist-info}/WHEEL +0 -0
- {ciocore-8.2.0b2.dist-info → ciocore-8.3.0b1.dist-info}/entry_points.txt +0 -0
- {ciocore-8.2.0b2.dist-info → ciocore-8.3.0b1.dist-info}/top_level.txt +0 -0
ciocore/docsite/sitemap.xml.gz
CHANGED
|
Binary file
|
ciocore/hardware_set.py
CHANGED
|
@@ -30,12 +30,10 @@ logger = logging.getLogger(__name__)
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
DESCRIPTION_TEMPLATE_OS = {
|
|
33
|
-
"best-fit": "{operating_system} {description}",
|
|
34
33
|
"cpu": "{operating_system} {cores} core {memory}GB Mem",
|
|
35
34
|
"gpu": "{operating_system} {cores} core {memory}GB Mem ({gpu_count} {gpu_model} GPUs {gpu_memory}GB Mem)",
|
|
36
35
|
}
|
|
37
36
|
DESCRIPTION_TEMPLATE = {
|
|
38
|
-
"best-fit": "{description}",
|
|
39
37
|
"cpu": "{cores} core {memory}GB Mem",
|
|
40
38
|
"gpu": "{cores} core {memory}GB Mem ({gpu_count} {gpu_model} GPUs {gpu_memory}GB Mem)",
|
|
41
39
|
}
|
|
@@ -391,21 +389,19 @@ class HardwareSet(object):
|
|
|
391
389
|
if dual_platforms:
|
|
392
390
|
for it in instance_types:
|
|
393
391
|
flat_dict = flatten_dict(it)
|
|
394
|
-
|
|
395
|
-
if
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
it["description"] = DESCRIPTION_TEMPLATE_OS[template_key].format(**flat_dict)
|
|
392
|
+
is_gpu = "gpu_count" in flat_dict
|
|
393
|
+
if is_gpu:
|
|
394
|
+
it["description"] = DESCRIPTION_TEMPLATE_OS["gpu"].format(**flat_dict)
|
|
395
|
+
else:
|
|
396
|
+
it["description"] = DESCRIPTION_TEMPLATE_OS["cpu"].format(**flat_dict)
|
|
400
397
|
else:
|
|
401
398
|
for it in instance_types:
|
|
402
399
|
flat_dict = flatten_dict(it)
|
|
403
|
-
|
|
404
|
-
if
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
it["description"] = DESCRIPTION_TEMPLATE[template_key].format(**flat_dict)
|
|
400
|
+
is_gpu = "gpu_count" in flat_dict
|
|
401
|
+
if is_gpu:
|
|
402
|
+
it["description"] = DESCRIPTION_TEMPLATE["gpu"].format(**flat_dict)
|
|
403
|
+
else:
|
|
404
|
+
it["description"] = DESCRIPTION_TEMPLATE["cpu"].format(**flat_dict)
|
|
409
405
|
|
|
410
406
|
return instance_types
|
|
411
407
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ciocore
|
|
3
|
-
Version: 8.
|
|
3
|
+
Version: 8.3.0b1
|
|
4
4
|
Summary: Core functionality for Conductor's client tools
|
|
5
5
|
Home-page: https://github.com/ConductorTechnologies/ciocore
|
|
6
6
|
Author: conductor
|
|
@@ -53,7 +53,8 @@ See [CONTRIBUTING](CONTRIBUTING.md)
|
|
|
53
53
|
|
|
54
54
|
## Unreleased:
|
|
55
55
|
|
|
56
|
-
*
|
|
56
|
+
* 8.3.0-beta.1
|
|
57
|
+
* Fixes a bug where the uploader would hang if there were no uploads.
|
|
57
58
|
|
|
58
59
|
## Version:8.1.0 -- 10 Jun 2024
|
|
59
60
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
ciocore/VERSION,sha256=
|
|
1
|
+
ciocore/VERSION,sha256=3mUYLmyGL0374GNF_GDf_gUk_KtaMp0-KqahsFaemM0,12
|
|
2
2
|
ciocore/__init__.py,sha256=aTP7LeeosQA8BZE67gDV4jgfTK5zxmwZRjiTRu_ZWj0,646
|
|
3
|
-
ciocore/api_client.py,sha256=
|
|
3
|
+
ciocore/api_client.py,sha256=SBxEwAiwn2XtH7T_ipefUbWhczXjoNdNbQBur1RV-Bw,32810
|
|
4
4
|
ciocore/cli.py,sha256=jZ1lOKQiUcrMhsVmD9SVmPMFwHtgDF4SaoAf2-PBS54,15449
|
|
5
5
|
ciocore/client_db.py,sha256=tTz3bl2xeDPPcYSDS3g3QgV_xYihJMx0Kj6OeN2klK0,12978
|
|
6
6
|
ciocore/common.py,sha256=mBIS6KiYoQsjWe6aIFUGRRvCMl8BIN2kmLZ4J8icap8,14982
|
|
7
7
|
ciocore/compat.py,sha256=5uEXPSog_jxsDMaHBswAKEtfyXT25VgU6WNGIhz9PHU,256
|
|
8
|
-
ciocore/conductor_submit.py,sha256=
|
|
8
|
+
ciocore/conductor_submit.py,sha256=bxvzdyNzscAOOOsqTvAYh5DQsTWyCQJNb16Mf-n_F0M,9702
|
|
9
9
|
ciocore/config.py,sha256=rCL7kaFn1tYgSglN8q9Wx6SwMpoXTq0BMQGwPRVwVIg,8973
|
|
10
10
|
ciocore/data.py,sha256=Ji0qUk8nJXBNakoHSqBiVx8O58SbZXyt273SHlEDn3U,7027
|
|
11
11
|
ciocore/exceptions.py,sha256=4Oq-WX-qiN6kPUdBCHvvd6mtSQ0nCkDbJxWt2CNtpv8,1504
|
|
12
12
|
ciocore/file_utils.py,sha256=swA7th9WhDEloW69YViRTKB-oeC9UmNdEGegfH1r-Gw,17176
|
|
13
|
-
ciocore/hardware_set.py,sha256
|
|
13
|
+
ciocore/hardware_set.py,sha256=FlRQiGCLRcSW7Oko_gzgVK8ZqJ_J92eT8e_AleAbS2E,17047
|
|
14
14
|
ciocore/loggeria.py,sha256=2xdQRFb9NyXynU2O_pSOszJWcpoHgPwTUWJvERg7ODY,15251
|
|
15
15
|
ciocore/package_environment.py,sha256=MEHV7jfs3NJIEYCIaW8JfJdBmelvPHZMmBzPlXETiRo,7808
|
|
16
16
|
ciocore/package_query.py,sha256=2m5EBXfu1lmqupZrFF8f8mfkX_PgijpdMxCtFI5e5s0,5574
|
|
@@ -26,12 +26,12 @@ ciocore/docsite/index.html,sha256=xz215H_KHWBYI1HT7IRpAZ4d1ptUiO8Y4DlOmbEPgPk,20
|
|
|
26
26
|
ciocore/docsite/logo.png,sha256=gArgFFWdw8w985-0TkuGIgU_pW9sziEMZdqytXb5WLo,2825
|
|
27
27
|
ciocore/docsite/objects.inv,sha256=XwmLactPEWWC4fAWqHNPBXGsluRxLLTrwDLQqq51ONY,775
|
|
28
28
|
ciocore/docsite/sitemap.xml,sha256=M_V85zl0y2adRvzJAnoCxlZH_Hl7TLnIb1A-6l_xGmI,109
|
|
29
|
-
ciocore/docsite/sitemap.xml.gz,sha256=
|
|
30
|
-
ciocore/docsite/apidoc/api_client/index.html,sha256=
|
|
29
|
+
ciocore/docsite/sitemap.xml.gz,sha256=UoThZxwc5AswRffOCwmnivnuvsBJrVhPkT3MoZqOlMg,127
|
|
30
|
+
ciocore/docsite/apidoc/api_client/index.html,sha256=mh9VwU1J3Ks6MWvo5a-PcUt5GYdm8s7KsIVDWfnOeXY,188372
|
|
31
31
|
ciocore/docsite/apidoc/apidoc/index.html,sha256=KGsHBY6GBF380w338GfOIMWnwAyyLvw2i1RQFORdwlE,26171
|
|
32
32
|
ciocore/docsite/apidoc/config/index.html,sha256=n3koKPRUza5-uHUt8hK8H8XyH6HG_U2CsGobdaN4KfY,72559
|
|
33
33
|
ciocore/docsite/apidoc/data/index.html,sha256=QhqiXUd_3qk_jGRYB5JiqlJTem8Jg7aKa5mPPDT1978,50850
|
|
34
|
-
ciocore/docsite/apidoc/hardware_set/index.html,sha256=
|
|
34
|
+
ciocore/docsite/apidoc/hardware_set/index.html,sha256=4GEBYy5uLVlJqvdG71RdyrN7sKKuxszxipgmRi_NCbM,123042
|
|
35
35
|
ciocore/docsite/apidoc/package_environment/index.html,sha256=1d4hVlBXPy4bldkBH1GsRjVd-bxdYANmB-Mg7xIAC_4,69248
|
|
36
36
|
ciocore/docsite/apidoc/package_tree/index.html,sha256=7GaOHXeM_oKH8Db25f2-h5kUI1R6pcp0bXxW1COCJxs,109393
|
|
37
37
|
ciocore/docsite/assets/_mkdocstrings.css,sha256=K3bqYEmxlOHQ3-M11JNbBWHCBDBLarkFRm8HuEYrAG4,341
|
|
@@ -81,7 +81,7 @@ ciocore/docsite/cmdline/downloader/index.html,sha256=917XE3waukGnIXI9qxl0zYEf3vH
|
|
|
81
81
|
ciocore/docsite/cmdline/packages/index.html,sha256=Ssb2R7eSubBNR824oc3jjhJfrG3JKOPojA-uiAczgeQ,20923
|
|
82
82
|
ciocore/docsite/cmdline/uploader/index.html,sha256=TtLbHNlu4ofZ4bQBqam87RelWdHnVDSL7_rw_YqBbC8,25123
|
|
83
83
|
ciocore/docsite/how-to-guides/index.html,sha256=rF-DMyk4k_jGUJRF3dKtMMiOgXS8OvBqAn-zxWy3AGs,20100
|
|
84
|
-
ciocore/docsite/search/search_index.json,sha256=
|
|
84
|
+
ciocore/docsite/search/search_index.json,sha256=vBLU-rkC0pxOPX0O3MNKXRKGfgsaS1-91KsV17Gf9SY,189092
|
|
85
85
|
ciocore/docsite/stylesheets/extra.css,sha256=_Cxe9Dhg1BBi6Kqaz_iZD9z9VyqxA9vtONRjP4PVic0,354
|
|
86
86
|
ciocore/docsite/stylesheets/tables.css,sha256=LE_zwGRxGcdPIy-9QiVPecOzlEBSqZb_WP5vDkFE0ZM,3235
|
|
87
87
|
ciocore/downloader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -115,13 +115,13 @@ tests/test_imports_2and3.py,sha256=ehqpRYPVY7djBcb8OT_cnh86iCJJ9wuMWnfSR9RHxmY,5
|
|
|
115
115
|
tests/test_job_downloader.py,sha256=_dZqyLZhc2Bq2n7-skERfodHx1JgFyHw8TamHp6ID9I,7025
|
|
116
116
|
tests/test_package_environment.py,sha256=CdiC2PDVSnbcwTb4fsDTWqGYSzs1n5ca2KMoyISckGA,5893
|
|
117
117
|
tests/test_package_tree.py,sha256=xCwNwYUmJrfmgCP2FGoHRFG-L0JPy8s4-66icxAls4o,6780
|
|
118
|
-
tests/test_submit.py,sha256
|
|
118
|
+
tests/test_submit.py,sha256=ppijBcpLXeHUZh7UXyClxLalSV6cTfKb6Ygw5zXQPKo,5836
|
|
119
119
|
tests/test_uploader.py,sha256=B1llTJt_fqR6e_V_Jxfw9z73QgkFlEPU87xLYGzt-TQ,2914
|
|
120
120
|
tests/test_validator.py,sha256=2fY66ayNc08PGyj2vTI-V_1yeCWJDngkj2zkUM5TTCI,1526
|
|
121
121
|
tests/mocks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
122
122
|
tests/mocks/glob.py,sha256=J2MH7nqi6NJOHuGdVWxhfeBd700_Ckj6cLh_8jSNkfg,215
|
|
123
|
-
ciocore-8.
|
|
124
|
-
ciocore-8.
|
|
125
|
-
ciocore-8.
|
|
126
|
-
ciocore-8.
|
|
127
|
-
ciocore-8.
|
|
123
|
+
ciocore-8.3.0b1.dist-info/METADATA,sha256=ytQ5OLjvyM5Snxcz3tmIvYfTVVPuY57tEraxPW83n7g,18671
|
|
124
|
+
ciocore-8.3.0b1.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
|
|
125
|
+
ciocore-8.3.0b1.dist-info/entry_points.txt,sha256=cCqcALMYbC4d8545V9w0Zysfg9MVuKWhzDQ2er4UfGE,47
|
|
126
|
+
ciocore-8.3.0b1.dist-info/top_level.txt,sha256=SvlM5JlqULzAz00JZWfiUhfjhqDzYzSWssA87zdJl0o,14
|
|
127
|
+
ciocore-8.3.0b1.dist-info/RECORD,,
|
tests/test_submit.py
CHANGED
|
@@ -9,7 +9,6 @@ try:
|
|
|
9
9
|
from unittest.mock import MagicMock, patch
|
|
10
10
|
except ImportError:
|
|
11
11
|
from mock import MagicMock, patch
|
|
12
|
-
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
def get_required_args():
|
|
@@ -28,7 +27,9 @@ class InitTest(unittest.TestCase):
|
|
|
28
27
|
self.kSubmit = Submit
|
|
29
28
|
self.required_args = get_required_args()
|
|
30
29
|
|
|
31
|
-
getuser_patcher = patch(
|
|
30
|
+
getuser_patcher = patch(
|
|
31
|
+
"getpass.getuser", return_value="joe.bloggs@example.com"
|
|
32
|
+
)
|
|
32
33
|
self.mock_getuser = getuser_patcher.start()
|
|
33
34
|
self.addCleanup(getuser_patcher.stop)
|
|
34
35
|
|
|
@@ -70,42 +71,48 @@ class SendTest(unittest.TestCase):
|
|
|
70
71
|
self.kSubmit = Submit
|
|
71
72
|
self.required_args = get_required_args()
|
|
72
73
|
|
|
73
|
-
getuser_patcher = patch(
|
|
74
|
+
getuser_patcher = patch(
|
|
75
|
+
"getpass.getuser", return_value="joe.bloggs@example.com"
|
|
76
|
+
)
|
|
74
77
|
self.mock_getuser = getuser_patcher.start()
|
|
75
78
|
self.addCleanup(getuser_patcher.stop)
|
|
76
79
|
|
|
77
80
|
file_utils_process_patcher = patch(
|
|
78
|
-
"ciocore.file_utils.process_upload_filepaths",
|
|
79
|
-
return_value=[]
|
|
81
|
+
"ciocore.file_utils.process_upload_filepaths", return_value=[]
|
|
80
82
|
)
|
|
81
83
|
self.mock_file_utils_process = file_utils_process_patcher.start()
|
|
82
84
|
self.addCleanup(file_utils_process_patcher.stop)
|
|
83
85
|
|
|
84
86
|
make_request_patcher = patch(
|
|
85
87
|
"ciocore.api_client.ApiClient.make_request",
|
|
86
|
-
return_value=(
|
|
88
|
+
return_value=("{}", 201),
|
|
87
89
|
)
|
|
88
90
|
self.mock_make_request = make_request_patcher.start()
|
|
89
91
|
self.addCleanup(make_request_patcher.stop)
|
|
90
92
|
|
|
91
|
-
|
|
92
|
-
def test_send_calls_handle_local_upload_by_default(self):
|
|
93
|
+
def test_send_calls_handle_local_upload_by_default_when_upload_paths_present(self):
|
|
93
94
|
args = self.required_args
|
|
95
|
+
args["upload_paths"] = ["/a/b"]
|
|
96
|
+
|
|
94
97
|
submission = self.kSubmit(args)
|
|
95
98
|
submission._handle_local_upload = MagicMock()
|
|
96
99
|
submission.main()
|
|
97
100
|
submission._handle_local_upload.assert_called_with({})
|
|
98
101
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
def test_send_calls_enforce_md5s_if_local_upload_off_and_enforced_md5s_when_upload_paths_present(
|
|
103
|
+
self,
|
|
104
|
+
):
|
|
105
|
+
args = {"local_upload": False, "enforced_md5s": {"a": "1"}}
|
|
106
|
+
args["upload_paths"] = ["/a/b"]
|
|
102
107
|
args.update(self.required_args)
|
|
103
108
|
submission = self.kSubmit(args)
|
|
104
109
|
submission._enforce_md5s = MagicMock()
|
|
105
110
|
submission.main()
|
|
106
111
|
submission._enforce_md5s.assert_called_with({})
|
|
107
112
|
|
|
108
|
-
def test_send_doesnt_call_enforce_md5s_if_local_upload_off_and_no_enforced_md5s(
|
|
113
|
+
def test_send_doesnt_call_enforce_md5s_if_local_upload_off_and_no_enforced_md5s(
|
|
114
|
+
self,
|
|
115
|
+
):
|
|
109
116
|
args = {"local_upload": False}
|
|
110
117
|
args.update(self.required_args)
|
|
111
118
|
submission = self.kSubmit(args)
|
|
@@ -113,14 +120,30 @@ class SendTest(unittest.TestCase):
|
|
|
113
120
|
submission.main()
|
|
114
121
|
self.assertEqual(submission._enforce_md5s.call_count, 0)
|
|
115
122
|
|
|
123
|
+
def test_send_doesnt_call_any_upload_methods_if_no_upload_paths(self):
|
|
124
|
+
args = self.required_args
|
|
125
|
+
submission = self.kSubmit(args)
|
|
126
|
+
submission._handle_local_upload = MagicMock()
|
|
127
|
+
submission._enforce_md5s = MagicMock()
|
|
128
|
+
submission.main()
|
|
129
|
+
self.assertEqual(submission._handle_local_upload.call_count, 0)
|
|
130
|
+
self.assertEqual(submission._enforce_md5s.call_count, 0)
|
|
131
|
+
|
|
132
|
+
def test_send_switches_local_upload_true_if_no_upload_paths_and_local_upload_false(
|
|
133
|
+
self,
|
|
134
|
+
):
|
|
135
|
+
args = {"local_upload": False}
|
|
136
|
+
args.update(self.required_args)
|
|
137
|
+
submission = self.kSubmit(args)
|
|
138
|
+
self.assertEqual(submission.payload["local_upload"], True)
|
|
116
139
|
|
|
117
140
|
def test_send_raise_if_bad_response_code(self):
|
|
118
141
|
make_request_patcher = patch(
|
|
119
142
|
"ciocore.api_client.ApiClient.make_request",
|
|
120
|
-
return_value=(
|
|
143
|
+
return_value=("{}", 404),
|
|
121
144
|
)
|
|
122
145
|
self.mock_make_request = make_request_patcher.start()
|
|
123
|
-
|
|
146
|
+
|
|
124
147
|
with self.assertRaises(Exception):
|
|
125
148
|
submission = self.kSubmit(self.required_args)
|
|
126
149
|
submission._handle_daemon_upload = MagicMock()
|
|
@@ -129,11 +152,12 @@ class SendTest(unittest.TestCase):
|
|
|
129
152
|
make_request_patcher.stop()
|
|
130
153
|
|
|
131
154
|
|
|
132
|
-
class uploaderTest
|
|
155
|
+
class uploaderTest:
|
|
133
156
|
|
|
134
157
|
def test_smoke(self):
|
|
135
158
|
|
|
136
159
|
from ciocore import uploader
|
|
160
|
+
|
|
137
161
|
uploader_args = {
|
|
138
162
|
"location": "here",
|
|
139
163
|
"database_filepath": "/path/to/db",
|
|
@@ -142,5 +166,5 @@ class uploaderTest():
|
|
|
142
166
|
}
|
|
143
167
|
up = uploader.Uploader(uploader_args)
|
|
144
168
|
manager = up.create_manager("some_project")
|
|
145
|
-
filemap = {"/a/b1": None,"/a/b2": None}
|
|
169
|
+
filemap = {"/a/b1": None, "/a/b2": None}
|
|
146
170
|
# self.assertEqual(uploader_args["thread_count"], 4)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|