ciocore 7.0.2b4__py2.py3-none-any.whl → 8.0.0__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.

Files changed (112) hide show
  1. ciocore/VERSION +1 -1
  2. ciocore/__init__.py +23 -1
  3. ciocore/api_client.py +422 -156
  4. ciocore/cli.py +503 -0
  5. ciocore/common.py +10 -1
  6. ciocore/config.py +86 -54
  7. ciocore/data.py +23 -70
  8. ciocore/docsite/404.html +723 -0
  9. ciocore/docsite/apidoc/api_client/index.html +3203 -0
  10. ciocore/docsite/apidoc/apidoc/index.html +868 -0
  11. ciocore/docsite/apidoc/config/index.html +1591 -0
  12. ciocore/docsite/apidoc/data/index.html +1480 -0
  13. ciocore/docsite/apidoc/hardware_set/index.html +2367 -0
  14. ciocore/docsite/apidoc/package_environment/index.html +1450 -0
  15. ciocore/docsite/apidoc/package_tree/index.html +2310 -0
  16. ciocore/docsite/assets/_mkdocstrings.css +16 -0
  17. ciocore/docsite/assets/images/favicon.png +0 -0
  18. ciocore/docsite/assets/javascripts/bundle.4e31edb1.min.js +29 -0
  19. ciocore/docsite/assets/javascripts/bundle.4e31edb1.min.js.map +8 -0
  20. ciocore/docsite/assets/javascripts/lunr/min/lunr.ar.min.js +1 -0
  21. ciocore/docsite/assets/javascripts/lunr/min/lunr.da.min.js +18 -0
  22. ciocore/docsite/assets/javascripts/lunr/min/lunr.de.min.js +18 -0
  23. ciocore/docsite/assets/javascripts/lunr/min/lunr.du.min.js +18 -0
  24. ciocore/docsite/assets/javascripts/lunr/min/lunr.es.min.js +18 -0
  25. ciocore/docsite/assets/javascripts/lunr/min/lunr.fi.min.js +18 -0
  26. ciocore/docsite/assets/javascripts/lunr/min/lunr.fr.min.js +18 -0
  27. ciocore/docsite/assets/javascripts/lunr/min/lunr.hi.min.js +1 -0
  28. ciocore/docsite/assets/javascripts/lunr/min/lunr.hu.min.js +18 -0
  29. ciocore/docsite/assets/javascripts/lunr/min/lunr.hy.min.js +1 -0
  30. ciocore/docsite/assets/javascripts/lunr/min/lunr.it.min.js +18 -0
  31. ciocore/docsite/assets/javascripts/lunr/min/lunr.ja.min.js +1 -0
  32. ciocore/docsite/assets/javascripts/lunr/min/lunr.jp.min.js +1 -0
  33. ciocore/docsite/assets/javascripts/lunr/min/lunr.kn.min.js +1 -0
  34. ciocore/docsite/assets/javascripts/lunr/min/lunr.ko.min.js +1 -0
  35. ciocore/docsite/assets/javascripts/lunr/min/lunr.multi.min.js +1 -0
  36. ciocore/docsite/assets/javascripts/lunr/min/lunr.nl.min.js +18 -0
  37. ciocore/docsite/assets/javascripts/lunr/min/lunr.no.min.js +18 -0
  38. ciocore/docsite/assets/javascripts/lunr/min/lunr.pt.min.js +18 -0
  39. ciocore/docsite/assets/javascripts/lunr/min/lunr.ro.min.js +18 -0
  40. ciocore/docsite/assets/javascripts/lunr/min/lunr.ru.min.js +18 -0
  41. ciocore/docsite/assets/javascripts/lunr/min/lunr.sa.min.js +1 -0
  42. ciocore/docsite/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +1 -0
  43. ciocore/docsite/assets/javascripts/lunr/min/lunr.sv.min.js +18 -0
  44. ciocore/docsite/assets/javascripts/lunr/min/lunr.ta.min.js +1 -0
  45. ciocore/docsite/assets/javascripts/lunr/min/lunr.te.min.js +1 -0
  46. ciocore/docsite/assets/javascripts/lunr/min/lunr.th.min.js +1 -0
  47. ciocore/docsite/assets/javascripts/lunr/min/lunr.tr.min.js +18 -0
  48. ciocore/docsite/assets/javascripts/lunr/min/lunr.vi.min.js +1 -0
  49. ciocore/docsite/assets/javascripts/lunr/min/lunr.zh.min.js +1 -0
  50. ciocore/docsite/assets/javascripts/lunr/tinyseg.js +206 -0
  51. ciocore/docsite/assets/javascripts/lunr/wordcut.js +6708 -0
  52. ciocore/docsite/assets/javascripts/workers/search.dfff1995.min.js +42 -0
  53. ciocore/docsite/assets/javascripts/workers/search.dfff1995.min.js.map +8 -0
  54. ciocore/docsite/assets/stylesheets/main.83068744.min.css +1 -0
  55. ciocore/docsite/assets/stylesheets/main.83068744.min.css.map +1 -0
  56. ciocore/docsite/assets/stylesheets/palette.ecc896b0.min.css +1 -0
  57. ciocore/docsite/assets/stylesheets/palette.ecc896b0.min.css.map +1 -0
  58. ciocore/docsite/cmdline/docs/index.html +834 -0
  59. ciocore/docsite/cmdline/downloader/index.html +897 -0
  60. ciocore/docsite/cmdline/packages/index.html +841 -0
  61. ciocore/docsite/cmdline/uploader/index.html +950 -0
  62. ciocore/docsite/how-to-guides/index.html +831 -0
  63. ciocore/docsite/index.html +853 -0
  64. ciocore/docsite/logo.png +0 -0
  65. ciocore/docsite/objects.inv +0 -0
  66. ciocore/docsite/search/search_index.json +1 -0
  67. ciocore/docsite/sitemap.xml +3 -0
  68. ciocore/docsite/sitemap.xml.gz +0 -0
  69. ciocore/docsite/stylesheets/extra.css +26 -0
  70. ciocore/docsite/stylesheets/tables.css +167 -0
  71. ciocore/downloader/__init__.py +0 -0
  72. ciocore/downloader/base_downloader.py +644 -0
  73. ciocore/downloader/download_runner_base.py +47 -0
  74. ciocore/downloader/job_downloader.py +119 -0
  75. ciocore/{downloader.py → downloader/legacy_downloader.py} +0 -1
  76. ciocore/downloader/log.py +73 -0
  77. ciocore/downloader/logging_download_runner.py +87 -0
  78. ciocore/downloader/perpetual_downloader.py +63 -0
  79. ciocore/downloader/registry.py +97 -0
  80. ciocore/downloader/reporter.py +135 -0
  81. ciocore/file_utils.py +3 -3
  82. ciocore/hardware_set.py +0 -4
  83. ciocore/package_environment.py +67 -75
  84. ciocore/package_query.py +171 -0
  85. ciocore/package_tree.py +300 -377
  86. ciocore/retry.py +0 -0
  87. ciocore/uploader/_uploader.py +205 -152
  88. {ciocore-7.0.2b4.dist-info → ciocore-8.0.0.dist-info}/METADATA +33 -12
  89. ciocore-8.0.0.dist-info/RECORD +127 -0
  90. {ciocore-7.0.2b4.dist-info → ciocore-8.0.0.dist-info}/WHEEL +1 -1
  91. ciocore-8.0.0.dist-info/entry_points.txt +2 -0
  92. tests/extra_env_fixtures.py +57 -0
  93. tests/instance_type_fixtures.py +42 -8
  94. tests/project_fixtures.py +8 -0
  95. tests/test_api_client.py +125 -4
  96. tests/test_base_downloader.py +104 -0
  97. tests/test_cli.py +163 -0
  98. tests/test_common.py +8 -8
  99. tests/test_config.py +23 -9
  100. tests/test_data.py +148 -160
  101. tests/test_downloader.py +118 -0
  102. tests/test_hardware_set.py +70 -20
  103. tests/test_job_downloader.py +213 -0
  104. tests/test_submit.py +9 -2
  105. ciocore/__about__.py +0 -10
  106. ciocore/cli/__init__.py +0 -3
  107. ciocore/cli/conductor.py +0 -210
  108. ciocore-7.0.2b4.data/scripts/conductor +0 -19
  109. ciocore-7.0.2b4.data/scripts/conductor.bat +0 -13
  110. ciocore-7.0.2b4.dist-info/RECORD +0 -51
  111. tests/mocks/api_client_mock.py +0 -31
  112. {ciocore-7.0.2b4.dist-info → ciocore-8.0.0.dist-info}/top_level.txt +0 -0
ciocore/cli/conductor.py DELETED
@@ -1,210 +0,0 @@
1
- #!/usr/bin/env python
2
- # Use absolute imports to avoid a "conductor" name clash (this module name vs conductor package).
3
- from __future__ import absolute_import
4
-
5
- import argparse
6
- import os
7
- import sys
8
-
9
- sys.path.append(os.path.dirname(os.path.dirname(__file__)))
10
-
11
- from ciocore import downloader, uploader, loggeria, config
12
-
13
- def build_parser():
14
- cfg = config.config().config
15
-
16
- # Create a parent parser. Arguments that are common across all subparsers can be added to this parser
17
- parent_parser = argparse.ArgumentParser(add_help=False)
18
-
19
- # create the main parser. Not sure why this parser is required, but got parsing tracebacks when excluding it (it gets confused about the arguments provided)
20
- parser = argparse.ArgumentParser(description="description")
21
- subparsers = parser.add_subparsers(title="actions")
22
-
23
-
24
- #############################
25
- # UPLOADER PARSER
26
- #############################
27
- uploader_parser_desciption = "parse uploader arguments"
28
- uploader_parser_help = ("Starts the Uploader in a continous running mode, polling Conductor for "
29
- "paths to upload unless a list of paths are provided."
30
- )
31
-
32
- uploader_parser = subparsers.add_parser("uploader", parents=[parent_parser],
33
- help=uploader_parser_help,
34
- description=uploader_parser_desciption,
35
- formatter_class=argparse.RawTextHelpFormatter)
36
-
37
- uploader_parser.add_argument("--database_filepath",
38
- help=("The filepath to the local md5 caching database. If no filepath "
39
- "is specified, the database will be created in a temp directory"))
40
-
41
- uploader_parser.add_argument("--location",
42
- help=('An optional string to indicate which location this uploader '
43
- 'executable should register as. This option is only relevant '
44
- 'for conductor accounts which submits jobs from different locations '
45
- '(e.g. differing geographic locations or office locations that have differing file systems).'
46
- ' Typically each location would have its own conductor uploader process running. This location '
47
- 'string allows each uploader to target specific upload jobs (files to upload) that are appropriate '
48
- 'for it. This is potentially useful as each location may have differing file systems '
49
- 'available to it (e.g. uploader1 has /filesystem1 available to it, but uploader2 only '
50
- 'has /filesystem2 available to it). In this case uploader1 should only upload files '
51
- 'that exist on /filesystem1 and uploader2 should only upload files that exist on /filesystem2. '
52
- 'This is achieved by including a location argument (such as "location1" or "location2") '
53
- 'when submitting jobs, as well as when launching this uploader command.'))
54
-
55
- uploader_parser.add_argument("--md5_caching",
56
- help=("Use cached md5s. This can dramatically improve the uploading "
57
- "times, as md5 checking can be very time consuming. Caching md5s "
58
- "allows subsequent uploads (of the same files) to skip the "
59
- "md5 generation process (if the files appear to not have been "
60
- "modified since the last time they were submitted). The cache is "
61
- "stored locally and uses a file's modification time and file size "
62
- "to intelligently guess whether the file has changed. Set this "
63
- "flag to False if there is concern that files may not be getting "
64
- "re-uploaded properly"),
65
- choices=[False, True],
66
- type=cast_to_bool,
67
- default=None)
68
-
69
- uploader_parser.add_argument("--log_level",
70
- choices=loggeria.LEVELS,
71
- help="The logging level to display")
72
-
73
- uploader_parser.add_argument("--log_dir",
74
- help=("When provided, will write a log file to "
75
- "the provided directory. This will be a "
76
- "rotating log, creating a new log file "
77
- "everyday, while storing the last 7 days "
78
- "of logs"))
79
-
80
- uploader_parser.add_argument("--thread_count",
81
- type=int,
82
- default=cfg["thread_count"],
83
- help=('The number of threads that should download simultaneously'))
84
-
85
- uploader_parser.add_argument("--paths",
86
- type=str,
87
- action="append",
88
- nargs="+",
89
- help=('A list of explicit paths to upload. Paths with spaces and/or special characters should be encapsulated in quotes'))
90
-
91
- uploader_parser.add_argument("--log-to-console",
92
- help=("If set, logging will be output to the console as well as the logging file."),
93
- action='store_true')
94
-
95
- uploader_parser.set_defaults(func=run_uploader)
96
-
97
- #############################
98
- # DOWNLOADER PARSER
99
- #############################
100
-
101
- downloader_parser_desciption = "parse downloader arguments"
102
- downloader_parser_help = ""
103
-
104
- downloader_parser = subparsers.add_parser("downloader", parents=[parent_parser],
105
- help=downloader_parser_help,
106
- description=downloader_parser_desciption,
107
- formatter_class=argparse.RawTextHelpFormatter)
108
-
109
- downloader_parser.add_argument("--job_id",
110
- help=("The job id(s) to download. When specified "
111
- "will only download those jobs and terminate "
112
- "afterwards"),
113
- action='append')
114
-
115
- downloader_parser.add_argument("--task_id",
116
- help="Manually download output for specific tasks - use a comma-separated list of tasks if you wish")
117
-
118
- downloader_parser.add_argument("--output",
119
- help="Override for the output directory")
120
-
121
- downloader_parser.add_argument("--location",
122
- help=('An optional string to indicate which location this downloader '
123
- 'executable should register as. This option is only relevant for '
124
- 'conductor accounts which submits jobs from different locations '
125
- '(e.g. differing geographic locations or office locations that '
126
- 'have differing file systems). Typically each location would '
127
- 'have its own conductor downloader process running. This location '
128
- 'argument allows each downloader to target specific jobs (to '
129
- 'download upon job-completion) that match its appropriate location. '
130
- 'Essentially this allows the location of which a job was submitted '
131
- 'from to also be the destination in which to deliver completed '
132
- 'renders to (which would typically be the desired behavior).'))
133
-
134
- downloader_parser.add_argument("--project",
135
- help=('An optional string to indicate which project that this downloader executable should register as.'))
136
-
137
- downloader_parser.add_argument("--log_level",
138
- choices=loggeria.LEVELS,
139
- default=cfg["log_level"],
140
- help="The logging level to display")
141
-
142
- downloader_parser.add_argument("--log_dir",
143
- help=("When provided, will write a log file to "
144
- "the provided directory. This will be a "
145
- "rotating log, creating a new log file "
146
- "everyday, while storing the last 7 days "
147
- "of logs"))
148
-
149
- downloader_parser.add_argument("--thread_count",
150
- type=int,
151
- default=cfg["thread_count"],
152
- help=('The number of threads that should download simultaneously'))
153
-
154
- downloader_parser.add_argument("--alt",
155
- help=('Run an alternative version of the downloader'),
156
- action='store_true')
157
-
158
- downloader_parser.set_defaults(func=run_downloader)
159
-
160
- return parser
161
-
162
-
163
- def cast_to_bool(string):
164
- '''
165
- Ensure that the argument provided is either "True" or "False (or "true" or
166
- "false") and convert that argument to an actual bool value (True or False).
167
- '''
168
- string_lower = string.lower()
169
- if string_lower == "true":
170
- return True
171
- elif string_lower == "false":
172
- return False
173
- raise argparse.ArgumentTypeError('Argument must be True or False')
174
-
175
- def run_uploader(args):
176
- uploader.run_uploader(args)
177
-
178
-
179
- def run_downloader(args):
180
- '''
181
- Convert the argparse Namespace object to a dictionary and run the downloader
182
- with the given args.
183
- '''
184
- # Convert Namespace args object to args dict
185
- args_dict = vars(args)
186
-
187
- if args_dict.get("task_id") and not args_dict.get("job_id"):
188
- raise argparse.ArgumentTypeError('Must supply a job_id with task_id.')
189
-
190
- # New downloader broke in python 3. It was used only for linux and in
191
- # daemon mode, so for now we'll use the old downloader for everything.
192
-
193
- return downloader.run_downloader(args_dict)
194
-
195
-
196
- def main():
197
- parser = build_parser()
198
- args = parser.parse_args()
199
- # Handle calling the script without an argument, fixes argparse issue
200
- # https://bugs.python.org/issue16308
201
- try:
202
- func = args.func
203
- except AttributeError:
204
- parser.error("too few arguments")
205
- func(args)
206
-
207
-
208
- if __name__ == '__main__':
209
- main()
210
-
@@ -1,19 +0,0 @@
1
- #!python
2
- # -*- coding: utf-8 -*-
3
- # WHY CHANGE
4
-
5
- # DO NOT SORT IMPORTS
6
- import os
7
- import re
8
- import sys
9
-
10
- CIO_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
11
- sys.path.insert(0, CIO_DIR)
12
-
13
- print("Inserted {} into sys.path".format(CIO_DIR))
14
-
15
- from ciocore.cli.conductor import main
16
-
17
- if __name__ == '__main__':
18
- sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
19
- sys.exit(main())
@@ -1,13 +0,0 @@
1
- @echo off
2
-
3
- echo Looking for Python...
4
-
5
- WHERE python.exe
6
- if ERRORLEVEL 1 (
7
- echo WARNING: python.exe not found.
8
- echo Please find or install Python and add it to your Path variable. Then run this command again.
9
- echo If you don't want to add python to your Path, then you can use the full path to a Python installation.
10
- echo Example: "C:\some\tools\python\python.exe" "%~dp0conductor %*
11
- exit /b
12
- )
13
- python.exe "%~dp0\conductor" %*
@@ -1,51 +0,0 @@
1
- ciocore/VERSION,sha256=eENWDwLWupe_pnzJwB5MWu2a6ahzZNZYF0nA_Y9S9R8,12
2
- ciocore/__about__.py,sha256=nTb4Xx0r9QtGROSFKgwDZ-Mr2LKjm2wVt1OkMQAkRAQ,241
3
- ciocore/__init__.py,sha256=zB_e7gBW2QloqbrGzcvccfpZhOhd6o9KACnScrwylm8,25
4
- ciocore/api_client.py,sha256=LKfJRqf7U2ubv7cm1ZhMlGJ6IGIvS3my5kpu0dkS23Q,17986
5
- ciocore/client_db.py,sha256=tTz3bl2xeDPPcYSDS3g3QgV_xYihJMx0Kj6OeN2klK0,12978
6
- ciocore/common.py,sha256=FnggAL-IGW8VQB6kLsrKLnxWFgLpwGBhOtiZSHz130M,14725
7
- ciocore/compat.py,sha256=5uEXPSog_jxsDMaHBswAKEtfyXT25VgU6WNGIhz9PHU,256
8
- ciocore/conductor_submit.py,sha256=ONE0LsA5hGavTJIOXXYx8qzl8_vBPADwhd6Ytq_0E0c,9382
9
- ciocore/config.py,sha256=6QVbg5dbPH_PL4sdeyoYUDMeOu9bNOnTMSsEv6zh7LQ,6027
10
- ciocore/data.py,sha256=zsAz6I3MKqVi3DJqFnVPQLfFbCHyIhe-kkOMaVoKnU0,8593
11
- ciocore/downloader.py,sha256=ZrZvDKUhc3q3_wur7ImEDzdVrMdQO1t8cBIQVjDAaOc,51228
12
- ciocore/exceptions.py,sha256=4Oq-WX-qiN6kPUdBCHvvd6mtSQ0nCkDbJxWt2CNtpv8,1504
13
- ciocore/file_utils.py,sha256=bAlL31B4YkRgX-yT8kF8UXBFktQlsE1PvxbKqTeAeOU,17174
14
- ciocore/hardware_set.py,sha256=XIs46d161URzlsG7XuGOIR_-5kQ4H5AuNkKRZdkwayk,17051
15
- ciocore/loggeria.py,sha256=2xdQRFb9NyXynU2O_pSOszJWcpoHgPwTUWJvERg7ODY,15251
16
- ciocore/package_environment.py,sha256=oEbNKXRtPSPzKR-yCoKtvgzu4OCmr-zaqAcNoLAN9Uk,7238
17
- ciocore/package_tree.py,sha256=kH03HVfjomj7nsaxJJtr-1KSQ_9ZSQY5msG_l9btvg8,16277
18
- ciocore/post_install.py,sha256=zu5Ctz2ANbKD-f5G2ODLIhKkWENBi4F3UKKu50OEWrg,1000
19
- ciocore/validator.py,sha256=f_K7gxz122W_i5AxVx6dKhckOygl8TnmQiVj7tyX5zw,2344
20
- ciocore/worker.py,sha256=h6JophGBWqLdLdvphlzkkVMt0ojLw7_1Vrz4dikPRYE,21743
21
- ciocore/auth/__init__.py,sha256=cdS-xZzMq41yXM5cz8sUlcYgo8CJYh8HcCCWmhbDgf0,606
22
- ciocore/auth/server.py,sha256=8btX9-EokUl6q55V8muDmEV2tvvbTBD0BHeWFbwkzUc,3892
23
- ciocore/cli/__init__.py,sha256=RmZKWJaMpzNyMdyYc2W3VXglaJiC8vyR2cgUlA-9Qmw,26
24
- ciocore/cli/conductor.py,sha256=7rIYkUNtkhsRDQjb4eurj0hLTHmbLviK3-H40Q3qE9A,11096
25
- ciocore/uploader/__init__.py,sha256=hxRFJf5Lo86rtRObFXSjjot8nybQd-SebSfYCbgZwow,24
26
- ciocore/uploader/_uploader.py,sha256=FCLycIK_tSRMk17sdNt_M6pY1mes2XgbeJV9XQN2618,37687
27
- ciocore/uploader/upload_stats/__init__.py,sha256=Lg1y4zq1i0cwc6Hh2K1TAQDYymLff49W-uIo1xjcvdI,5309
28
- ciocore/uploader/upload_stats/stats_formats.py,sha256=giNirtObU66VALWghPFSRhg3q_vw5MvESsnXhb_I3y8,2402
29
- ciocore-7.0.2b4.data/scripts/conductor,sha256=Nk3QsLQqbUUrtaKDp4b5mr9__4tz-xnssENpQe5vuIo,409
30
- ciocore-7.0.2b4.data/scripts/conductor.bat,sha256=T1_9ByheubBczgQZn8_LwfvMtWgE7Bt64EsEScnSXMs,447
31
- tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
- tests/instance_type_fixtures.py,sha256=V0piP6z2fl_m9iupm0rzGeQRzOz7-HWQyK-5Vu7kbpM,3630
33
- tests/package_fixtures.py,sha256=CsJnhB7oYzIxJH7b1tCOPyvnnVSCqEbSPhtCnsHL-nA,5070
34
- tests/test_api_client.py,sha256=gC9WubTvH-sV6JbdWivag0EnqYk3HXg6kVq6Du-2QYo,1357
35
- tests/test_common.py,sha256=xA0y_KgEmag7jRKfhEHZgIQkS2WmjrYEcss-rwhQOOs,747
36
- tests/test_config.py,sha256=nSmpinX2SmDNAprIcxs9UHdB0VakJB0snXaZmAoKJSc,12863
37
- tests/test_data.py,sha256=YdP1kZJivQ6yb9z96UK6oMDaOfJAl4YMJqzKvlCQaes,5744
38
- tests/test_hardware_set.py,sha256=uKuiOxaum-3Ub38GdOVbClSBF4ru7vNc1J2UrrZV4wQ,3136
39
- tests/test_imports_2and3.py,sha256=ehqpRYPVY7djBcb8OT_cnh86iCJJ9wuMWnfSR9RHxmY,507
40
- tests/test_package_environment.py,sha256=CdiC2PDVSnbcwTb4fsDTWqGYSzs1n5ca2KMoyISckGA,5893
41
- tests/test_package_tree.py,sha256=xCwNwYUmJrfmgCP2FGoHRFG-L0JPy8s4-66icxAls4o,6780
42
- tests/test_submit.py,sha256=4idfa48IouM4JgfQzBLiZyygtU-jwLdOBtV0AgfBzH0,4834
43
- tests/test_uploader.py,sha256=B1llTJt_fqR6e_V_Jxfw9z73QgkFlEPU87xLYGzt-TQ,2914
44
- tests/test_validator.py,sha256=2fY66ayNc08PGyj2vTI-V_1yeCWJDngkj2zkUM5TTCI,1526
45
- tests/mocks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
- tests/mocks/api_client_mock.py,sha256=Wfv2JPFSZfyHftVqsqxcpXWJn136pEHx26I_esz567E,943
47
- tests/mocks/glob.py,sha256=J2MH7nqi6NJOHuGdVWxhfeBd700_Ckj6cLh_8jSNkfg,215
48
- ciocore-7.0.2b4.dist-info/METADATA,sha256=mEVpLfEGvAuhWBe6dYu4RwG63nTatxIdk-s0IOehqYI,14916
49
- ciocore-7.0.2b4.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
50
- ciocore-7.0.2b4.dist-info/top_level.txt,sha256=SvlM5JlqULzAz00JZWfiUhfjhqDzYzSWssA87zdJl0o,14
51
- ciocore-7.0.2b4.dist-info/RECORD,,
@@ -1,31 +0,0 @@
1
- """Mock ApiClient for requests to get packages and projects.
2
- """
3
- import json
4
- import os
5
-
6
- import package_fixtures
7
-
8
- PROJECTS_RESPONSE = {"data": [
9
- {"id": "123|deadpool", "name": "Deadpool",
10
- "status": "active"},
11
- {"id": "456|harrypotter", "name": "Harry Potter & the chamber of secrets",
12
- "status": "active"},
13
- {"id": "789|corelli", "name": "Captain Corelli's Mandolin",
14
- "status": "active"},
15
- {"id": "000|gwtw", "name": "Gone with the Wind",
16
- "status": "inactive"}
17
- ]}
18
-
19
- PACKAGES_RESPONSE = {"data": package_fixtures.SOFTWARE_DATA}
20
-
21
- class ApiClient(object):
22
- def make_request(self, **kw):
23
- path = kw.get("uri_path", "")
24
-
25
- print("Using mock %s call to %s" % (self.__class__.__name__, path))
26
-
27
- if path.startswith("api/v1/projects"):
28
- return [json.dumps(PROJECTS_RESPONSE), 200]
29
-
30
- if path.startswith("api/v1/ee/packages"):
31
- return [json.dumps(PACKAGES_RESPONSE), 200]