ciocore 8.3.1__py2.py3-none-any.whl → 9.0.0b2__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 +3 -2
- ciocore/docsite/apidoc/api_client/index.html +3 -2
- ciocore/docsite/apidoc/package_tree/index.html +0 -5
- ciocore/docsite/search/search_index.json +1 -1
- ciocore/docsite/sitemap.xml.gz +0 -0
- ciocore/package_query.py +14 -3
- ciocore/package_tree.py +0 -4
- ciocore/worker.py +1 -5
- {ciocore-8.3.1.dist-info → ciocore-9.0.0b2.dist-info}/METADATA +17 -8
- {ciocore-8.3.1.dist-info → ciocore-9.0.0b2.dist-info}/RECORD +23 -23
- {ciocore-8.3.1.dist-info → ciocore-9.0.0b2.dist-info}/WHEEL +1 -1
- tests/package_fixtures.py +18 -5
- tests/test_api_client.py +1 -4
- tests/test_common.py +1 -11
- tests/test_config.py +1 -4
- tests/test_data.py +1 -4
- tests/test_package_query.py +38 -0
- tests/test_package_tree.py +1 -1
- tests/test_submit.py +1 -4
- tests/test_uploader.py +1 -4
- ciocore/compat.py +0 -15
- {ciocore-8.3.1.dist-info → ciocore-9.0.0b2.dist-info}/entry_points.txt +0 -0
- {ciocore-8.3.1.dist-info → ciocore-9.0.0b2.dist-info}/top_level.txt +0 -0
ciocore/docsite/sitemap.xml.gz
CHANGED
|
Binary file
|
ciocore/package_query.py
CHANGED
|
@@ -120,14 +120,25 @@ def write_text(hostnames, tree_data, platform, color_func, stream):
|
|
|
120
120
|
),
|
|
121
121
|
stream,
|
|
122
122
|
)
|
|
123
|
-
|
|
123
|
+
|
|
124
|
+
def sort_hostnames_by_version(hostnames):
|
|
125
|
+
def sort_version(pkg):
|
|
126
|
+
hostname, product, version, platform = pkg
|
|
127
|
+
return f"{version} {product} {platform}"
|
|
128
|
+
def sort_product(pkg):
|
|
129
|
+
hostname, product, version, platform = pkg
|
|
130
|
+
return f"{product} {platform}"
|
|
131
|
+
pkg_sortable = [(hostname, hostname.split()[0], hostname.split()[1], hostname.split()[2]) for hostname in hostnames]
|
|
132
|
+
_psorted = sorted(pkg_sortable, key=sort_version, reverse=True)
|
|
133
|
+
_sorted = sorted(_psorted, key=sort_product)
|
|
134
|
+
return [pkg[0] for pkg in _sorted]
|
|
124
135
|
|
|
125
136
|
def pq(format="text"):
|
|
126
137
|
packages = api_client.request_software_packages()
|
|
127
138
|
|
|
128
139
|
tree_data = PackageTree(packages)
|
|
129
140
|
|
|
130
|
-
hostnames = tree_data.supported_host_names()
|
|
141
|
+
hostnames = sort_hostnames_by_version(tree_data.supported_host_names())
|
|
131
142
|
linux_hostnames = [h for h in hostnames if h.endswith("linux")]
|
|
132
143
|
windows_hostnames = [h for h in hostnames if h.endswith("windows")]
|
|
133
144
|
|
|
@@ -168,4 +179,4 @@ def pq(format="text"):
|
|
|
168
179
|
def decorate(html):
|
|
169
180
|
html = html.replace("<table>", '<table class="pure-table pure-table-bordered">')
|
|
170
181
|
html = '<html><head>{}</head><body style="margin: 2em;">{}</body></html>'.format(PURE, html)
|
|
171
|
-
return html
|
|
182
|
+
return html
|
ciocore/package_tree.py
CHANGED
ciocore/worker.py
CHANGED
|
@@ -621,11 +621,7 @@ class JobManager():
|
|
|
621
621
|
q_size = self.work_queues[index].qsize()
|
|
622
622
|
worker_threads = self.workers[index].threads
|
|
623
623
|
|
|
624
|
-
|
|
625
|
-
try:
|
|
626
|
-
num_active_threads = len([thd for thd in worker_threads if thd.isAlive()])
|
|
627
|
-
except AttributeError:
|
|
628
|
-
num_active_threads = len([thd for thd in worker_threads if thd.is_alive()])
|
|
624
|
+
num_active_threads = len([thd for thd in worker_threads if thd.is_alive()])
|
|
629
625
|
|
|
630
626
|
msg += '%s \titems in queue: %s' % (q_size, worker_class.__name__)
|
|
631
627
|
msg += '\t\t%s threads' % num_active_threads
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ciocore
|
|
3
|
-
Version:
|
|
3
|
+
Version: 9.0.0b2
|
|
4
4
|
Summary: Core functionality for Conductor's client tools
|
|
5
5
|
Home-page: https://github.com/ConductorTechnologies/ciocore
|
|
6
6
|
Author: conductor
|
|
@@ -9,13 +9,12 @@ Classifier: Operating System :: OS Independent
|
|
|
9
9
|
Classifier: Programming Language :: Python
|
|
10
10
|
Classifier: Topic :: Multimedia :: Graphics :: 3D Rendering
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
|
-
Requires-Dist: requests
|
|
13
|
-
Requires-Dist: pyjwt
|
|
14
|
-
Requires-Dist:
|
|
15
|
-
Requires-Dist:
|
|
16
|
-
Requires-Dist:
|
|
17
|
-
Requires-Dist:
|
|
18
|
-
Requires-Dist: colorlog <7.0.0,>=6.8.2
|
|
12
|
+
Requires-Dist: requests>=2.31.0
|
|
13
|
+
Requires-Dist: pyjwt==2.9.0
|
|
14
|
+
Requires-Dist: cioseq<1.0.0,>=0.4.1
|
|
15
|
+
Requires-Dist: Click<9.0.0,>=8.1.3
|
|
16
|
+
Requires-Dist: markdown<4.0.0,>=3.5.2
|
|
17
|
+
Requires-Dist: colorlog<7.0.0,>=6.8.2
|
|
19
18
|
|
|
20
19
|
## Introduction
|
|
21
20
|
|
|
@@ -51,6 +50,16 @@ See [CONTRIBUTING](CONTRIBUTING.md)
|
|
|
51
50
|
|
|
52
51
|
## Changelog
|
|
53
52
|
|
|
53
|
+
## Unreleased:
|
|
54
|
+
|
|
55
|
+
* 9.0.0-beta.1
|
|
56
|
+
* Use the new required jwt parameters
|
|
57
|
+
* Removing py2.7 compatibility
|
|
58
|
+
|
|
59
|
+
## Version:8.3.2 -- 01 Oct 2024
|
|
60
|
+
|
|
61
|
+
* Tweak to package order behavior for markdown package query
|
|
62
|
+
|
|
54
63
|
## Version:8.3.1 -- 05 Sep 2024
|
|
55
64
|
|
|
56
65
|
* Fixes a bug of the Conductor log going to the wrong path on Windows
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
ciocore/VERSION,sha256=
|
|
1
|
+
ciocore/VERSION,sha256=e7b7GJz44Hd6emuQcgfrIGtfwzF3N98xAT6OKsX1sRE,12
|
|
2
2
|
ciocore/__init__.py,sha256=aTP7LeeosQA8BZE67gDV4jgfTK5zxmwZRjiTRu_ZWj0,646
|
|
3
|
-
ciocore/api_client.py,sha256=
|
|
3
|
+
ciocore/api_client.py,sha256=XuTON9guZ8a4DMJlU2U2O3RHkimriXG20NJMNi-LGCY,32902
|
|
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
|
-
ciocore/compat.py,sha256=5uEXPSog_jxsDMaHBswAKEtfyXT25VgU6WNGIhz9PHU,256
|
|
8
7
|
ciocore/conductor_submit.py,sha256=bxvzdyNzscAOOOsqTvAYh5DQsTWyCQJNb16Mf-n_F0M,9702
|
|
9
8
|
ciocore/config.py,sha256=rCL7kaFn1tYgSglN8q9Wx6SwMpoXTq0BMQGwPRVwVIg,8973
|
|
10
9
|
ciocore/data.py,sha256=Ji0qUk8nJXBNakoHSqBiVx8O58SbZXyt273SHlEDn3U,7027
|
|
@@ -13,12 +12,12 @@ ciocore/file_utils.py,sha256=swA7th9WhDEloW69YViRTKB-oeC9UmNdEGegfH1r-Gw,17176
|
|
|
13
12
|
ciocore/hardware_set.py,sha256=FlRQiGCLRcSW7Oko_gzgVK8ZqJ_J92eT8e_AleAbS2E,17047
|
|
14
13
|
ciocore/loggeria.py,sha256=dk8n899TYFiMTD2gjjj8oiumJkPtCus0a_IY2GORAvU,15251
|
|
15
14
|
ciocore/package_environment.py,sha256=MEHV7jfs3NJIEYCIaW8JfJdBmelvPHZMmBzPlXETiRo,7808
|
|
16
|
-
ciocore/package_query.py,sha256=
|
|
17
|
-
ciocore/package_tree.py,sha256=
|
|
15
|
+
ciocore/package_query.py,sha256=hWi_JmRieZ8f2Ji5JR7tQnHnm29Ktb88scbIXNsDu-8,6181
|
|
16
|
+
ciocore/package_tree.py,sha256=FDKHxYZS8ZAkz3hpjMYFy-P8hwU1V9w4wA7gNqhruqs,15569
|
|
18
17
|
ciocore/post_install.py,sha256=zu5Ctz2ANbKD-f5G2ODLIhKkWENBi4F3UKKu50OEWrg,1000
|
|
19
18
|
ciocore/retry.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
19
|
ciocore/validator.py,sha256=f_K7gxz122W_i5AxVx6dKhckOygl8TnmQiVj7tyX5zw,2344
|
|
21
|
-
ciocore/worker.py,sha256=
|
|
20
|
+
ciocore/worker.py,sha256=3C4KJuBTdeqvMWdBn3cRnTju5dUjNKG0OGtHp0SZ4l8,21613
|
|
22
21
|
ciocore/auth/__init__.py,sha256=cdS-xZzMq41yXM5cz8sUlcYgo8CJYh8HcCCWmhbDgf0,606
|
|
23
22
|
ciocore/auth/server.py,sha256=8btX9-EokUl6q55V8muDmEV2tvvbTBD0BHeWFbwkzUc,3892
|
|
24
23
|
ciocore/docsite/404.html,sha256=xP-mZwn-87pnlkD-paIYzdXDLQr7DS551KflVdFfrCk,17207
|
|
@@ -26,14 +25,14 @@ ciocore/docsite/index.html,sha256=NEK4HaX2yaetTajVtQuTmS9C5cPnkAtxgeKEj7wQ9t0,20
|
|
|
26
25
|
ciocore/docsite/logo.png,sha256=gArgFFWdw8w985-0TkuGIgU_pW9sziEMZdqytXb5WLo,2825
|
|
27
26
|
ciocore/docsite/objects.inv,sha256=XwmLactPEWWC4fAWqHNPBXGsluRxLLTrwDLQqq51ONY,775
|
|
28
27
|
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=
|
|
28
|
+
ciocore/docsite/sitemap.xml.gz,sha256=kwrVA-e-YnpIkhePqDzoqyW7P-aZd0a6d9_dx9Mdv08,127
|
|
29
|
+
ciocore/docsite/apidoc/api_client/index.html,sha256=_aLYBFhVNk2VtDAoC7vTeKisdh2BVN39VnVvlk4SlAk,188875
|
|
31
30
|
ciocore/docsite/apidoc/apidoc/index.html,sha256=GOSvv6KZPOtgekgshRE4j7aDvJkkaiBQLwA_By9J94g,26171
|
|
32
31
|
ciocore/docsite/apidoc/config/index.html,sha256=WDqy4MLR3EMp9T_2-Z9Op61rTFkvb0aTWmtjiR8sbjA,72559
|
|
33
32
|
ciocore/docsite/apidoc/data/index.html,sha256=vjC5u7wcm2ryOW28GctA9ZG6dXgBTkMJLLomJ9Kqxo0,50850
|
|
34
33
|
ciocore/docsite/apidoc/hardware_set/index.html,sha256=SpYg-lwuCvfLPbNIIM7aQL2jGt-NA5wlVMlIKixGwBo,123042
|
|
35
34
|
ciocore/docsite/apidoc/package_environment/index.html,sha256=V6_ah3V1_4_aOwJbEcITCdwuHxe1vGtfn0maRrbflUs,69248
|
|
36
|
-
ciocore/docsite/apidoc/package_tree/index.html,sha256=
|
|
35
|
+
ciocore/docsite/apidoc/package_tree/index.html,sha256=5_4vV8x_GmpsyWHnMP62gBaAcdzfM7L-mP7uQKh_DH4,109054
|
|
37
36
|
ciocore/docsite/assets/_mkdocstrings.css,sha256=K3bqYEmxlOHQ3-M11JNbBWHCBDBLarkFRm8HuEYrAG4,341
|
|
38
37
|
ciocore/docsite/assets/images/favicon.png,sha256=AjhUxD_Eslt5XuSVHIAZ494Fk__rb5GLXR8qm0elfP4,1870
|
|
39
38
|
ciocore/docsite/assets/javascripts/bundle.4e31edb1.min.js,sha256=vMxCR_BtNIcbmbPV6j8Z-YDLQ9ckt4RzvGuzCTg034s,97250
|
|
@@ -81,7 +80,7 @@ ciocore/docsite/cmdline/downloader/index.html,sha256=nygj-0GQmpD79B5AxHjwzQxOFv8
|
|
|
81
80
|
ciocore/docsite/cmdline/packages/index.html,sha256=_kXB85PBAgrqW09OerYpxnJuyERHMbcLn6qBGRdyHwk,20923
|
|
82
81
|
ciocore/docsite/cmdline/uploader/index.html,sha256=vuQ06Gys9Eoxs87PXlqnM5AgB6Ag00BlDIy6oaprjis,25123
|
|
83
82
|
ciocore/docsite/how-to-guides/index.html,sha256=KifCHl2S3RfPBZhP1UXwUNWuhcXPlPPqM4Gk6rVGhjQ,20100
|
|
84
|
-
ciocore/docsite/search/search_index.json,sha256=
|
|
83
|
+
ciocore/docsite/search/search_index.json,sha256=_jxoQQikc4cA_9YiODWM6TBSyWdgReOMtlZpSbB1fi0,189108
|
|
85
84
|
ciocore/docsite/stylesheets/extra.css,sha256=_Cxe9Dhg1BBi6Kqaz_iZD9z9VyqxA9vtONRjP4PVic0,354
|
|
86
85
|
ciocore/docsite/stylesheets/tables.css,sha256=LE_zwGRxGcdPIy-9QiVPecOzlEBSqZb_WP5vDkFE0ZM,3235
|
|
87
86
|
ciocore/downloader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -101,27 +100,28 @@ ciocore/uploader/upload_stats/stats_formats.py,sha256=giNirtObU66VALWghPFSRhg3q_
|
|
|
101
100
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
102
101
|
tests/extra_env_fixtures.py,sha256=8qvU4d8SXGKzRVNR5whVqKCQOwOVMiFVfbKBAjxa2gE,1119
|
|
103
102
|
tests/instance_type_fixtures.py,sha256=uIzQduqKQVgjllMuyXaYnRC-pwqk5lnTx3NY2M5Nujo,4320
|
|
104
|
-
tests/package_fixtures.py,sha256=
|
|
103
|
+
tests/package_fixtures.py,sha256=od7ZHofG8ubpQ3PqlUsrcHBcbmD3qVWih9eiIg1WtSQ,5361
|
|
105
104
|
tests/project_fixtures.py,sha256=iBm_th_JtAw76vlNu7Jjhh9tLH4oOaNi-MgtPzCV7yQ,138
|
|
106
|
-
tests/test_api_client.py,sha256=
|
|
105
|
+
tests/test_api_client.py,sha256=isntMDs3QTyTWdghBa_LbFAiC7ydZD1RWb655oEZo24,14452
|
|
107
106
|
tests/test_base_downloader.py,sha256=SS7tWKv2ZZhpUDk4UCg1TkrNrpntjSewgzLl1mEubSE,3603
|
|
108
107
|
tests/test_cli.py,sha256=_WTs2SWlEgd6wtg1hmOBlFnbWVdFLvqp0KqNhy-y2e8,5532
|
|
109
|
-
tests/test_common.py,sha256=
|
|
110
|
-
tests/test_config.py,sha256
|
|
111
|
-
tests/test_data.py,sha256=
|
|
108
|
+
tests/test_common.py,sha256=5N9xeeGVuwN4kcjIg30eBliUD8PePzCNNLuLipGuTgk,410
|
|
109
|
+
tests/test_config.py,sha256=iiMPwoVA9C3vvGGR6_gKKMbYkSxheNLdljeOA-iPrJU,13295
|
|
110
|
+
tests/test_data.py,sha256=u9XS4xOXugKNwuHBuQl3TxjZi7zybs6X9yq40r6XbzY,5388
|
|
112
111
|
tests/test_downloader.py,sha256=hceljsjnuvk5Vk5X4mHgavIEcpbv8ylPwpz7rTwJ-aE,4721
|
|
113
112
|
tests/test_hardware_set.py,sha256=hW7A_suyYdU7WkB7qoHSBPLxaAP2CKqI0i_ULfO5GeY,4408
|
|
114
113
|
tests/test_imports_2and3.py,sha256=ehqpRYPVY7djBcb8OT_cnh86iCJJ9wuMWnfSR9RHxmY,507
|
|
115
114
|
tests/test_job_downloader.py,sha256=_dZqyLZhc2Bq2n7-skERfodHx1JgFyHw8TamHp6ID9I,7025
|
|
116
115
|
tests/test_package_environment.py,sha256=CdiC2PDVSnbcwTb4fsDTWqGYSzs1n5ca2KMoyISckGA,5893
|
|
117
|
-
tests/
|
|
118
|
-
tests/
|
|
119
|
-
tests/
|
|
116
|
+
tests/test_package_query.py,sha256=LZqvCrGkWs0lMtIMumjDatX0ypeYYvabh_k1R0A6sS0,1451
|
|
117
|
+
tests/test_package_tree.py,sha256=K2kzJwRHCr6ojc4MZHjdH7VtmvG5O97OoH6vzwAE9GQ,6780
|
|
118
|
+
tests/test_submit.py,sha256=v75ciL-C0XjiO7wUFQvYBZj0UoqhYOmTLa8TiUyhKqw,5769
|
|
119
|
+
tests/test_uploader.py,sha256=JGp6GEyqRXRtbQSb-IW-cCX_BzNotWdCbnJnLwZvpUM,2869
|
|
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-
|
|
124
|
-
ciocore-
|
|
125
|
-
ciocore-
|
|
126
|
-
ciocore-
|
|
127
|
-
ciocore-
|
|
123
|
+
ciocore-9.0.0b2.dist-info/METADATA,sha256=7bbe60ozciKLWntbeZqWmTh_jtrOAPpmoiLN4s-p6Io,18918
|
|
124
|
+
ciocore-9.0.0b2.dist-info/WHEEL,sha256=qUzzGenXXuJTzyjFah76kDVqDvnk-YDzY00svnrl84w,109
|
|
125
|
+
ciocore-9.0.0b2.dist-info/entry_points.txt,sha256=cCqcALMYbC4d8545V9w0Zysfg9MVuKWhzDQ2er4UfGE,47
|
|
126
|
+
ciocore-9.0.0b2.dist-info/top_level.txt,sha256=SvlM5JlqULzAz00JZWfiUhfjhqDzYzSWssA87zdJl0o,14
|
|
127
|
+
ciocore-9.0.0b2.dist-info/RECORD,,
|
tests/package_fixtures.py
CHANGED
|
@@ -139,12 +139,25 @@ C4D_DATA = [
|
|
|
139
139
|
"minor_version": "0",
|
|
140
140
|
"package_id": "id_9",
|
|
141
141
|
},
|
|
142
|
+
{
|
|
143
|
+
"product": "c4d",
|
|
144
|
+
"major_version": "1",
|
|
145
|
+
"minor_version": "1",
|
|
146
|
+
"package_id": "id_10",
|
|
147
|
+
},
|
|
142
148
|
{
|
|
143
149
|
"product": "c4d",
|
|
144
150
|
"platform": "windows",
|
|
145
151
|
"major_version": "1",
|
|
146
152
|
"minor_version": "0",
|
|
147
|
-
"package_id": "
|
|
153
|
+
"package_id": "id_11",
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"product": "c4d",
|
|
157
|
+
"platform": "windows",
|
|
158
|
+
"major_version": "1",
|
|
159
|
+
"minor_version": "1",
|
|
160
|
+
"package_id": "id_12",
|
|
148
161
|
},
|
|
149
162
|
]
|
|
150
163
|
|
|
@@ -152,20 +165,20 @@ BLENDER_DATA = [
|
|
|
152
165
|
{
|
|
153
166
|
"product": "blender",
|
|
154
167
|
"major_version": "1",
|
|
155
|
-
"package_id": "
|
|
168
|
+
"package_id": "id_13",
|
|
156
169
|
},
|
|
157
170
|
{
|
|
158
171
|
"product": "blender",
|
|
159
172
|
"major_version": "1",
|
|
160
173
|
"minor_version": "0",
|
|
161
|
-
"package_id": "
|
|
174
|
+
"package_id": "id_14",
|
|
162
175
|
},
|
|
163
176
|
{
|
|
164
177
|
"product": "blender",
|
|
165
178
|
"major_version": "1",
|
|
166
179
|
"minor_version": "0",
|
|
167
180
|
"release_version": "2",
|
|
168
|
-
"package_id": "
|
|
181
|
+
"package_id": "id_15",
|
|
169
182
|
},
|
|
170
183
|
{
|
|
171
184
|
"product": "blender",
|
|
@@ -173,7 +186,7 @@ BLENDER_DATA = [
|
|
|
173
186
|
"minor_version": "0",
|
|
174
187
|
"release_version": "2",
|
|
175
188
|
"build_version": "3",
|
|
176
|
-
"package_id": "
|
|
189
|
+
"package_id": "id_16",
|
|
177
190
|
},
|
|
178
191
|
]
|
|
179
192
|
|
tests/test_api_client.py
CHANGED
tests/test_common.py
CHANGED
|
@@ -9,17 +9,7 @@ FILES_PATH = os.path.join(os.path.dirname(__file__), "files")
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class TestMd5(unittest.TestCase):
|
|
12
|
-
|
|
13
|
-
# def test_get_base64_md5_is_correct_md5(self):
|
|
14
|
-
# from ciocore import common
|
|
15
|
-
# fn1 = os.path.join(FILES_PATH, "one")
|
|
16
|
-
# md5=common.get_base64_md5(fn1)
|
|
17
|
-
# if os.name == "nt":
|
|
18
|
-
# self.assertEqual(md5, "w8F8opHbdwHIozghPc63XA==")
|
|
19
|
-
# else:
|
|
20
|
-
# self.assertEqual(md5, "9iVbsBxkj+lncU1SqJ6OnA==")
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
|
|
23
13
|
def test_get_base64_md5_is_correct_type(self):
|
|
24
14
|
from ciocore import common
|
|
25
15
|
from builtins import str
|
tests/test_config.py
CHANGED
|
@@ -6,10 +6,7 @@ import sys
|
|
|
6
6
|
import os
|
|
7
7
|
import logging
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
from unittest import mock
|
|
11
|
-
except ImportError:
|
|
12
|
-
import mock
|
|
9
|
+
from unittest import mock
|
|
13
10
|
|
|
14
11
|
APIKEY = '{"auth_provider_x509_cert_url": "https://www.exampleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.example.com/o/oauth2/auth", "client_email": "account-5641301770895360@eloquent-vector-104019.iam.gserviceaccount.com", "client_id": "106815243682887997903", "client_x509_cert_url": "https://www.exampleapis.com/robot/v1/metadata/x509/account-5641301770895360%40eloquent-vector-104019.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDcadqRWyd7VpYN\n804fEn07qlqNXU0ihz6g2dfbj9gzZDhHGVCI5QvPFskAQcV91k8cDdFu380m+sh1\nz9wlcdaM/lksRV/DRJiV76qrqyrNi0gSekZUuYhSsyMWUGvG4aSbf5BzVf1j8W4I\nUArH+ht5pgdSjowNc4zQIqmMH2XY+Ntr+NysBBfIv1PI6GoHFgDYOTSzsvz0qFYS\nWuonYGTjzNz4CY9Yh5ki8iq0/ijKzpUWeRUkpK9uF7WBoxrj3EyFFHejtfhVX2l0\n2KxrIF0kkmy5nmxVUck76FqdQ6vyvaHudREd3z/08hgdYogemQUTKFE/0LQmKuBV\nIJipPvORAgMBAAECggEAZvPMozN8LBikC00XstzMgRePp1MqydN5NeG6+TPlrQ+F\nV/RjkSXHT8oZRdTy3dXB6t0rc4n2xdvC0YCvGBBlwkK1vT+EPO2oBfTF99yCKDME\nDZlui3mDyvkgjPYweVuBKx65Bp5mNo4ZMqnMd18EAVxDM9UgZtIPtlJSdoBd7qtk\nyCGr03l+SV0krmvPV+KS9vyDOg/7Km5gMhTMaIveNyS1pG6AmZ0ggQA5djg/P2iF\nxGwYdvfADY5cBzg0OG5ELv9hvyA4CKN6RLfYv3JJS2gbNaMknjmsjaM/p0LtE2HL\n+uFPL0ZjoMwV3BlEFQIHwhNWS63H43ISBa1/2XvGPwKBgQDw4a4kQ9+Ce3edWonz\n3Fm/3no+HrMSVjbv28qphAHMFrSUdbMejQm4QSbNeOW1pEcVvW21u8tYagrJEsaU\ns4DulFXRep36teVDWpc1FrNowWEPPVeC8CO74VfssK1h2Itqis8JPbzXOcNtSH9+\nAg1EvrB9XnyEvJuM6GOGo3juTwKBgQDqP058+H3iSZe6al4P6Ib3g/82nr2dHeN5\n4xxGu1fzTMNX5lopbNji6tQcsMoMVPdOvCQy5c0PEUbvo7mxfZ8fOZwgBjIcXbYg\nzIJkPTSv7nxSE5M5lW5juzLkdq2k5k0qt9ByWuWEA3PSn/DEANa5888phSCoJSw/\nPjpwHhZoHwKBgQDCoQbMxI6e5lYCrToT8PIPhpptAO8dnM2sxoGcsE2ncp0b63H7\n+GdnGjVZBhtMxdyt4y33DjLCUIRAbUxIsDU4EGC67oEhJsGEx3iva5Uwyjc7UgwY\nfyHQV8ZsN2EQUyBqyJd6VwjzOff+n/prfQrthcoisiqYMbDZjJeGHSXEHwKBgAo4\nBsmG4Z78jOTx/PZ+s1ya4ohUdnsjMahAkxw20ghoIeF0yBwkhnWnvucdg0L0dfF2\nXbHmuoJcw5ZyswgeLdHj5n6zJn58TBS0Nz/+N40xPzUpa3PIpA8vvHGhB8Q408b4\nS9yhQH/40pWuqocybiugijoKd7k+HecIZO49MccLAoGBAPDScJHSxKPW6wJKjxDC\nXXWWQ2flbwv4Sja487QV/trWMSRnHJHnCVHqv/F7ThPaoHM+MJSzrJ7wr/CJhk0H\noEt+0Rn6qPd/A36bSjTfXMFLXWi75ovek+IJGKxr7B46jrcS/oe1XIIOlV1+OvOY\nVoO6vgYkPhpMkth2hyZ/luea\n-----END PRIVATE KEY-----\n", "private_key_id": "3dfe3bdc40d4dc431d283bf22feb113c9b622dd3", "project_id": "eloquent-vector-104019", "token_uri": "https://oauth2.exampleapis.com/token", "type": "service_account"}'
|
|
15
12
|
|
tests/test_data.py
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
""" test package_query
|
|
2
|
+
"""
|
|
3
|
+
import unittest
|
|
4
|
+
import os
|
|
5
|
+
import sys
|
|
6
|
+
import copy
|
|
7
|
+
from ciocore import package_tree
|
|
8
|
+
from ciocore import package_query
|
|
9
|
+
from package_fixtures import *
|
|
10
|
+
|
|
11
|
+
class HostnameSortByVersionTest(unittest.TestCase):
|
|
12
|
+
def setUp(self):
|
|
13
|
+
self.packages = copy.deepcopy(SOFTWARE_DATA)
|
|
14
|
+
self.pt = package_tree.PackageTree(self.packages)
|
|
15
|
+
self.hostname_list = self.pt.supported_host_names()
|
|
16
|
+
|
|
17
|
+
def test_sort_hostnames_by_version(self):
|
|
18
|
+
sorted_hostnames = package_query.sort_hostnames_by_version(self.hostname_list)
|
|
19
|
+
sorted_data = {}
|
|
20
|
+
for item in sorted_hostnames:
|
|
21
|
+
product, version, platform = item.split()
|
|
22
|
+
data = {
|
|
23
|
+
'version': version,
|
|
24
|
+
'platform': platform
|
|
25
|
+
}
|
|
26
|
+
if product in sorted_data.keys():
|
|
27
|
+
sorted_data[product].append(data)
|
|
28
|
+
else:
|
|
29
|
+
sorted_data[product] = [data]
|
|
30
|
+
self.assertTrue(sorted(list(sorted_data.keys())) == list(sorted_data.keys()))
|
|
31
|
+
for product in sorted_data.keys():
|
|
32
|
+
platform_list = [pkg['platform'] for pkg in sorted_data[product]]
|
|
33
|
+
self.assertTrue(sorted(platform_list) == platform_list)
|
|
34
|
+
version_list = [pkg['version'] for pkg in sorted_data[product] if pkg['platform'] == 'linux']
|
|
35
|
+
self.assertTrue(sorted(version_list, reverse=True) == version_list)
|
|
36
|
+
|
|
37
|
+
if __name__ == "__main__":
|
|
38
|
+
unittest.main()
|
tests/test_package_tree.py
CHANGED
|
@@ -163,7 +163,7 @@ class SupportedHostNamesTest(unittest.TestCase):
|
|
|
163
163
|
def test_supported_host_names_windows(self):
|
|
164
164
|
self.pt = package_tree.PackageTree(self.packages, product="c4d", platforms=["windows"])
|
|
165
165
|
host_names = self.pt.supported_host_names()
|
|
166
|
-
self.assertEqual(len(host_names),
|
|
166
|
+
self.assertEqual(len(host_names), 2)
|
|
167
167
|
self.assertIn('c4d 1.0 windows', host_names)
|
|
168
168
|
|
|
169
169
|
|
tests/test_submit.py
CHANGED
tests/test_uploader.py
CHANGED
ciocore/compat.py
DELETED
|
File without changes
|
|
File without changes
|