cloud-files 5.1.0__tar.gz → 5.1.2__tar.gz
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.0 → cloud_files-5.1.2}/ChangeLog +12 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/PKG-INFO +1 -1
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloud_files.egg-info/PKG-INFO +1 -1
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloud_files.egg-info/SOURCES.txt +1 -0
- cloud_files-5.1.2/cloud_files.egg-info/pbr.json +1 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/compression.py +7 -2
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/interfaces.py +9 -0
- cloud_files-5.1.2/cloudfiles/test.py +28 -0
- cloud_files-5.1.0/cloud_files.egg-info/pbr.json +0 -1
- {cloud_files-5.1.0 → cloud_files-5.1.2}/.github/workflows/test-suite.yml +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/AUTHORS +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/LICENSE +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/MANIFEST.in +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/README.md +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/automated_test.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloud_files.egg-info/dependency_links.txt +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloud_files.egg-info/entry_points.txt +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloud_files.egg-info/not-zip-safe +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloud_files.egg-info/requires.txt +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloud_files.egg-info/top_level.txt +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/__init__.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/cloudfiles.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/connectionpools.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/exceptions.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/gcs.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/lib.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/paths.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/resumable_tools.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/scheduler.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/secrets.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/threaded_queue.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles/typing.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles_cli/LICENSE +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles_cli/__init__.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/cloudfiles_cli/cloudfiles_cli.py +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/requirements.txt +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/setup.cfg +0 -0
- {cloud_files-5.1.0 → cloud_files-5.1.2}/setup.py +0 -0
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
CHANGES
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
5.1.2
|
|
5
|
+
-----
|
|
6
|
+
|
|
7
|
+
* fix: deflate 0.8 started returning a bytearray
|
|
8
|
+
|
|
9
|
+
5.1.1
|
|
10
|
+
-----
|
|
11
|
+
|
|
12
|
+
* fix: ensure directory exists for download\_to\_file
|
|
13
|
+
* docs: add why there is this extra bit of code
|
|
14
|
+
* fix(gs/list): show flat directories even if there are no regular entries
|
|
15
|
+
|
|
4
16
|
5.1.0
|
|
5
17
|
-----
|
|
6
18
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "02bf227", "is_release": true}
|
|
@@ -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])
|
|
@@ -707,6 +707,7 @@ class GoogleCloudStorageInterface(StorageInterface):
|
|
|
707
707
|
key = self.get_path_to_file(src)
|
|
708
708
|
blob = self._bucket.blob(key)
|
|
709
709
|
try:
|
|
710
|
+
mkdir(os.path.dirname(dest))
|
|
710
711
|
blob.download_to_filename(
|
|
711
712
|
filename=dest,
|
|
712
713
|
raw_download=True,
|
|
@@ -834,6 +835,14 @@ class GoogleCloudStorageInterface(StorageInterface):
|
|
|
834
835
|
elif flat and '/' not in blob.name.removeprefix(path):
|
|
835
836
|
yield filename
|
|
836
837
|
|
|
838
|
+
# When there are no regular items at this level
|
|
839
|
+
# we need to still print the directories.
|
|
840
|
+
if first and blobs.prefixes:
|
|
841
|
+
yield from (
|
|
842
|
+
item.removeprefix(path)
|
|
843
|
+
for item in blobs.prefixes
|
|
844
|
+
)
|
|
845
|
+
|
|
837
846
|
def release_connection(self):
|
|
838
847
|
global GC_POOL
|
|
839
848
|
with GCS_BUCKET_POOL_LOCK:
|
|
@@ -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": "4678ea6", "is_release": true}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|