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.
Files changed (48) hide show
  1. {rms_filecache-2.3.1/rms_filecache.egg-info → rms_filecache-3.0.0}/PKG-INFO +5 -10
  2. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/README.md +4 -9
  3. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/_version.py +16 -3
  4. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/file_cache.py +918 -121
  5. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/file_cache_path.py +345 -59
  6. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/file_cache_source.py +623 -39
  7. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/file_cache_types.py +8 -0
  8. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/requirements.txt +1 -0
  9. {rms_filecache-2.3.1 → rms_filecache-3.0.0/rms_filecache.egg-info}/PKG-INFO +5 -10
  10. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/rms_filecache.egg-info/SOURCES.txt +1 -1
  11. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/test_file_cache.py +594 -61
  12. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/test_file_cache_path.py +266 -71
  13. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/test_file_cache_source.py +71 -12
  14. rms_filecache-2.3.1/tests/test_url_to_path.py → rms_filecache-3.0.0/tests/test_url_mapping.py +265 -24
  15. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.coveragerc +0 -0
  16. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.flake8 +0 -0
  17. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.github/pull_request_template.md +0 -0
  18. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.github/workflows/publish_to_pypi.yml +0 -0
  19. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.github/workflows/publish_to_test_pypi.yml +0 -0
  20. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.github/workflows/run-tests.yml +0 -0
  21. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.gitignore +0 -0
  22. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/.readthedocs.yaml +0 -0
  23. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/LICENSE +0 -0
  24. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/docs/Makefile +0 -0
  25. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/docs/conf.py +0 -0
  26. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/docs/index.rst +0 -0
  27. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/docs/make.bat +0 -0
  28. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/docs/module.rst +0 -0
  29. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/__init__.py +0 -0
  30. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/filecache/py.typed +0 -0
  31. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/mypy.ini +0 -0
  32. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/pyproject.toml +0 -0
  33. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/rms_filecache.egg-info/dependency_links.txt +0 -0
  34. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/rms_filecache.egg-info/requires.txt +0 -0
  35. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/rms_filecache.egg-info/top_level.txt +0 -0
  36. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/setup.cfg +0 -0
  37. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_files/expected/lorem1.txt +0 -0
  38. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_files/expected/subdir1/lorem1.txt +0 -0
  39. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_files/expected/subdir1/subdir2a/binary1.bin +0 -0
  40. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_files/expected/subdir1/subdir2b/binary1.bin +0 -0
  41. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_programs/locking.py +0 -0
  42. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/test_programs/multi_download.py +0 -0
  43. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/__init__.py +0 -0
  44. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/gs_lifecycle_config.json +0 -0
  45. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/gs_lifecycle_config_info.txt +0 -0
  46. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/s3_bucket_policy_read.txt +0 -0
  47. {rms_filecache-2.3.1 → rms_filecache-3.0.0}/tests/s3_bucket_policy_write.txt +0 -0
  48. {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: 2.3.1
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 directory and filename are specified as an argument to open()
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.open('subdir2a/binary1.bin', 'rb') as fp:
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
- # The additional filename is specified by using the / operator to create a new
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 directory and filename are specified as an argument to open()
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.open('subdir2a/binary1.bin', 'rb') as fp:
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
- # The additional filename is specified by using the / operator to create a new
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__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
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 = '2.3.1'
21
- __version_tuple__ = version_tuple = (2, 3, 1)
31
+ __version__ = version = '3.0.0'
32
+ __version_tuple__ = version_tuple = (3, 0, 0)
33
+
34
+ __commit_id__ = commit_id = 'g8dae7f090'