cloud-files 5.1.1__py3-none-any.whl → 5.1.2__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.
- {cloud_files-5.1.1.dist-info → cloud_files-5.1.2.dist-info}/METADATA +1 -1
- {cloud_files-5.1.1.dist-info → cloud_files-5.1.2.dist-info}/RECORD +10 -9
- cloud_files-5.1.2.dist-info/pbr.json +1 -0
- cloudfiles/compression.py +7 -2
- cloudfiles/test.py +28 -0
- cloud_files-5.1.1.dist-info/pbr.json +0 -1
- {cloud_files-5.1.1.dist-info → cloud_files-5.1.2.dist-info}/AUTHORS +0 -0
- {cloud_files-5.1.1.dist-info → cloud_files-5.1.2.dist-info}/LICENSE +0 -0
- {cloud_files-5.1.1.dist-info → cloud_files-5.1.2.dist-info}/WHEEL +0 -0
- {cloud_files-5.1.1.dist-info → cloud_files-5.1.2.dist-info}/entry_points.txt +0 -0
- {cloud_files-5.1.1.dist-info → cloud_files-5.1.2.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
cloudfiles/__init__.py,sha256=pLB4CcV2l3Jgv_ni1520Np1pfzFj8Cpr87vNxFT3rNI,493
|
|
2
2
|
cloudfiles/cloudfiles.py,sha256=K8rKzrzDzbi1HjGoPMsXSMFzTbe_KLfDIyk4tRjoGEI,51070
|
|
3
|
-
cloudfiles/compression.py,sha256=
|
|
3
|
+
cloudfiles/compression.py,sha256=09FM4fZcNkSy5zg6GjBzanAMtuvV5kTosc6gvloiSiU,6255
|
|
4
4
|
cloudfiles/connectionpools.py,sha256=aL8RiSjRepECfgAFmJcz80aJFKbou7hsbuEgugDKwB8,4814
|
|
5
5
|
cloudfiles/exceptions.py,sha256=N0oGQNG-St6RvnT8e5p_yC_E61q2kgAe2scwAL0F49c,843
|
|
6
6
|
cloudfiles/gcs.py,sha256=unqu5KxGKaPq6N4QeHSpCDdtnK1BzPOAerTZ8FLt2_4,3820
|
|
@@ -10,16 +10,17 @@ cloudfiles/paths.py,sha256=4B3qWjR2TP8wAYK4NLw-iy2KUn3VNspKp6_Vy4j3I8A,11592
|
|
|
10
10
|
cloudfiles/resumable_tools.py,sha256=NyuSoGh1SaP5akrHCpd9kgy2-JruEWrHW9lvJxV7jpE,6711
|
|
11
11
|
cloudfiles/scheduler.py,sha256=DqDANmOpB3NdzFgJDNMMibRIkCrXQqIh2XGL8GWoc9c,3668
|
|
12
12
|
cloudfiles/secrets.py,sha256=791b5a8nWSBYtlleGzKeoYIR5jl-FI1bw6INRM4Wy-0,5295
|
|
13
|
+
cloudfiles/test.py,sha256=jktBhzKLU448QPs5H7QVnTvpYMo4lBBWG1aE7-uzVGQ,678
|
|
13
14
|
cloudfiles/threaded_queue.py,sha256=Nl4vfXhQ6nDLF8PZpSSBpww0M2zWtcd4DLs3W3BArBw,7082
|
|
14
15
|
cloudfiles/typing.py,sha256=f3ZYkNfN9poxhGu5j-P0KCxjCCqSn9HAg5KiIPkjnCg,416
|
|
15
16
|
cloudfiles_cli/LICENSE,sha256=Jna4xYE8CCQmaxjr5Fs-wmUBnIQJ1DGcNn9MMjbkprk,1538
|
|
16
17
|
cloudfiles_cli/__init__.py,sha256=Wftt3R3F21QsHtWqx49ODuqT9zcSr0em7wk48kcH0WM,29
|
|
17
18
|
cloudfiles_cli/cloudfiles_cli.py,sha256=_2Amjp3vsdq7vQgF2utD6BJqjOPKXOTjrJyehnlojpQ,34893
|
|
18
|
-
cloud_files-5.1.
|
|
19
|
-
cloud_files-5.1.
|
|
20
|
-
cloud_files-5.1.
|
|
21
|
-
cloud_files-5.1.
|
|
22
|
-
cloud_files-5.1.
|
|
23
|
-
cloud_files-5.1.
|
|
24
|
-
cloud_files-5.1.
|
|
25
|
-
cloud_files-5.1.
|
|
19
|
+
cloud_files-5.1.2.dist-info/AUTHORS,sha256=BFVmobgAhaVFI5fqbuqAY5XmBQxe09ZZAsAOTy87hKQ,318
|
|
20
|
+
cloud_files-5.1.2.dist-info/LICENSE,sha256=Jna4xYE8CCQmaxjr5Fs-wmUBnIQJ1DGcNn9MMjbkprk,1538
|
|
21
|
+
cloud_files-5.1.2.dist-info/METADATA,sha256=znVdwBEwK11C2z5OVF87VHUAKXzz046vHDV4aX3kK4M,27047
|
|
22
|
+
cloud_files-5.1.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
23
|
+
cloud_files-5.1.2.dist-info/entry_points.txt,sha256=xlirb1FVhn1mbcv4IoyMEGumDqKOA4VMVd3drsRQxIg,51
|
|
24
|
+
cloud_files-5.1.2.dist-info/pbr.json,sha256=3bJhiZoxbezXPczAXpnP1R4rkDWW-NnjoFBNZJvHEbI,46
|
|
25
|
+
cloud_files-5.1.2.dist-info/top_level.txt,sha256=xPyrST3okJbsmdCF5IC2gYAVxg_aD5AYVTnNo8UuoZU,26
|
|
26
|
+
cloud_files-5.1.2.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "02bf227", "is_release": true}
|
cloudfiles/compression.py
CHANGED
|
@@ -171,7 +171,7 @@ def gzip_compress(content, compresslevel=None):
|
|
|
171
171
|
compresslevel = 9
|
|
172
172
|
|
|
173
173
|
if deflate:
|
|
174
|
-
return deflate.gzip_compress(content, compresslevel)
|
|
174
|
+
return bytes(deflate.gzip_compress(content, compresslevel))
|
|
175
175
|
|
|
176
176
|
stringio = BytesIO()
|
|
177
177
|
gzip_obj = gzip.GzipFile(mode='wb', fileobj=stringio, compresslevel=compresslevel)
|
|
@@ -190,7 +190,12 @@ def gunzip(content):
|
|
|
190
190
|
raise DecompressionError('File contains zero bytes.')
|
|
191
191
|
|
|
192
192
|
gzip_magic_numbers = [ 0x1f, 0x8b ]
|
|
193
|
-
|
|
193
|
+
|
|
194
|
+
if isinstance(content, (bytes, bytearray)):
|
|
195
|
+
first_two_bytes = list(content[:2])
|
|
196
|
+
else:
|
|
197
|
+
first_two_bytes = [ byte for byte in bytearray(content)[:2] ]
|
|
198
|
+
|
|
194
199
|
if first_two_bytes != gzip_magic_numbers:
|
|
195
200
|
raise DecompressionError('File is not in gzip format. Magic numbers {}, {} did not match {}, {}.'.format(
|
|
196
201
|
hex(first_two_bytes[0]), hex(first_two_bytes[1]), hex(gzip_magic_numbers[0]), hex(gzip_magic_numbers[1])
|
cloudfiles/test.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import igneous.task_creation as tc
|
|
2
|
+
import os
|
|
3
|
+
from taskqueue import totask
|
|
4
|
+
import igneous.tasks
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def process_task(msg):
|
|
8
|
+
task = totask(msg)
|
|
9
|
+
task.execute()
|
|
10
|
+
return None
|
|
11
|
+
|
|
12
|
+
def submit_tasks():
|
|
13
|
+
paths = [
|
|
14
|
+
"gs://ng_scratch_ranl_7/make_cv_happy/seg/20250403024338",]
|
|
15
|
+
all_tasks = []
|
|
16
|
+
for img_path in paths:
|
|
17
|
+
mip = 0
|
|
18
|
+
num_mips = 2
|
|
19
|
+
tasks = tc.create_downsampling_tasks(img_path,
|
|
20
|
+
fill_missing=False,
|
|
21
|
+
delete_black_uploads=True,
|
|
22
|
+
mip=mip, num_mips=num_mips)
|
|
23
|
+
all_tasks += list(tasks)
|
|
24
|
+
return all_tasks
|
|
25
|
+
|
|
26
|
+
if __name__ == "__main__":
|
|
27
|
+
tasks = submit_tasks()
|
|
28
|
+
process_task(tasks[0])
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"git_version": "39ec622", "is_release": true}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|