rms-filecache 2.3.1__tar.gz → 3.0.0__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.
- {rms_filecache-2.3.1/rms_filecache.egg-info → rms_filecache-3.0.0}/PKG-INFO +5 -10
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/README.md +4 -9
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/_version.py +16 -3
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/file_cache.py +918 -121
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/file_cache_path.py +345 -59
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/file_cache_source.py +623 -39
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/file_cache_types.py +8 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/requirements.txt +1 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0/rms_filecache.egg-info}/PKG-INFO +5 -10
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/rms_filecache.egg-info/SOURCES.txt +1 -1
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/test_file_cache.py +594 -61
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/test_file_cache_path.py +266 -71
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/test_file_cache_source.py +71 -12
- rms_filecache-2.3.1/tests/test_url_to_path.py → rms_filecache-3.0.0/tests/test_url_mapping.py +265 -24
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.coveragerc +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.flake8 +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.github/pull_request_template.md +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.github/workflows/publish_to_pypi.yml +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.github/workflows/publish_to_test_pypi.yml +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.github/workflows/run-tests.yml +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.gitignore +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.readthedocs.yaml +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/LICENSE +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/docs/Makefile +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/docs/conf.py +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/docs/index.rst +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/docs/make.bat +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/docs/module.rst +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/__init__.py +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/py.typed +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/mypy.ini +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/pyproject.toml +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/rms_filecache.egg-info/dependency_links.txt +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/rms_filecache.egg-info/requires.txt +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/rms_filecache.egg-info/top_level.txt +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/setup.cfg +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_files/expected/lorem1.txt +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_files/expected/subdir1/lorem1.txt +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_files/expected/subdir1/subdir2a/binary1.bin +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_files/expected/subdir1/subdir2b/binary1.bin +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_programs/locking.py +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_programs/multi_download.py +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/__init__.py +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/gs_lifecycle_config.json +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/gs_lifecycle_config_info.txt +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/s3_bucket_policy_read.txt +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/s3_bucket_policy_write.txt +0 -0
- {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/s3_lifecycle_policy.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rms-filecache
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: File cache for files retrieved from the cloud
|
|
5
5
|
Maintainer-email: "Robert S. French" <rfrench@seti.org>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -156,21 +156,16 @@ from filecache import FileCache, FCPath
|
|
|
156
156
|
with FileCache(None) as fc: # Use as context manager
|
|
157
157
|
# Use GS by specifying the bucket name and one directory level
|
|
158
158
|
p1 = fc.new_path('gs://rms-filecache-tests/subdir1', anonymous=True)
|
|
159
|
-
# Use S3 by specifying the bucket name and two directory levels
|
|
160
|
-
# Alternative creation method
|
|
161
|
-
p2 = FCPath('s3://rms-filecache-tests/subdir1/subdir2a', filecache=fc,
|
|
162
|
-
anonymous=True)
|
|
163
159
|
# Access GS using a directory + filename (since only one directory level
|
|
164
160
|
# was specified by the FCPath)
|
|
165
|
-
# The additional
|
|
161
|
+
# The additional filename is specified by using the / operator to create a new
|
|
162
|
+
# FCPath instance; anonymous=True is inherited
|
|
166
163
|
# Also use open() as a context manager
|
|
167
|
-
with p1
|
|
164
|
+
with (p1 / 'subdir2a/binary1.bin').open('rb') as fp:
|
|
168
165
|
bin1 = fp.read()
|
|
169
166
|
# Access S3 using a filename only (since two directory levels were already
|
|
170
167
|
# specified by the FCPath)
|
|
171
|
-
|
|
172
|
-
# FCPath instance; anonymous=True is inherited
|
|
173
|
-
with (p2 / 'binary1.bin').open(mode='rb') as fp:
|
|
168
|
+
with (p2 / 'binary1.bin').open('rb') as fp:
|
|
174
169
|
bin2 = fp.read()
|
|
175
170
|
assert bin1 == bin2
|
|
176
171
|
# Cache automatically deleted here
|
|
@@ -121,21 +121,16 @@ from filecache import FileCache, FCPath
|
|
|
121
121
|
with FileCache(None) as fc: # Use as context manager
|
|
122
122
|
# Use GS by specifying the bucket name and one directory level
|
|
123
123
|
p1 = fc.new_path('gs://rms-filecache-tests/subdir1', anonymous=True)
|
|
124
|
-
# Use S3 by specifying the bucket name and two directory levels
|
|
125
|
-
# Alternative creation method
|
|
126
|
-
p2 = FCPath('s3://rms-filecache-tests/subdir1/subdir2a', filecache=fc,
|
|
127
|
-
anonymous=True)
|
|
128
124
|
# Access GS using a directory + filename (since only one directory level
|
|
129
125
|
# was specified by the FCPath)
|
|
130
|
-
# The additional
|
|
126
|
+
# The additional filename is specified by using the / operator to create a new
|
|
127
|
+
# FCPath instance; anonymous=True is inherited
|
|
131
128
|
# Also use open() as a context manager
|
|
132
|
-
with p1
|
|
129
|
+
with (p1 / 'subdir2a/binary1.bin').open('rb') as fp:
|
|
133
130
|
bin1 = fp.read()
|
|
134
131
|
# Access S3 using a filename only (since two directory levels were already
|
|
135
132
|
# specified by the FCPath)
|
|
136
|
-
|
|
137
|
-
# FCPath instance; anonymous=True is inherited
|
|
138
|
-
with (p2 / 'binary1.bin').open(mode='rb') as fp:
|
|
133
|
+
with (p2 / 'binary1.bin').open('rb') as fp:
|
|
139
134
|
bin2 = fp.read()
|
|
140
135
|
assert bin1 == bin2
|
|
141
136
|
# Cache automatically deleted here
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
3
|
|
|
4
|
-
__all__ = [
|
|
4
|
+
__all__ = [
|
|
5
|
+
"__version__",
|
|
6
|
+
"__version_tuple__",
|
|
7
|
+
"version",
|
|
8
|
+
"version_tuple",
|
|
9
|
+
"__commit_id__",
|
|
10
|
+
"commit_id",
|
|
11
|
+
]
|
|
5
12
|
|
|
6
13
|
TYPE_CHECKING = False
|
|
7
14
|
if TYPE_CHECKING:
|
|
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
|
|
|
9
16
|
from typing import Union
|
|
10
17
|
|
|
11
18
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
+
COMMIT_ID = Union[str, None]
|
|
12
20
|
else:
|
|
13
21
|
VERSION_TUPLE = object
|
|
22
|
+
COMMIT_ID = object
|
|
14
23
|
|
|
15
24
|
version: str
|
|
16
25
|
__version__: str
|
|
17
26
|
__version_tuple__: VERSION_TUPLE
|
|
18
27
|
version_tuple: VERSION_TUPLE
|
|
28
|
+
commit_id: COMMIT_ID
|
|
29
|
+
__commit_id__: COMMIT_ID
|
|
19
30
|
|
|
20
|
-
__version__ = version = '
|
|
21
|
-
__version_tuple__ = version_tuple = (
|
|
31
|
+
__version__ = version = '3.0.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (3, 0, 0)
|
|
33
|
+
|
|
34
|
+
__commit_id__ = commit_id = 'g8dae7f090'
|