dcor-shared 1.0.3__tar.gz → 1.0.4__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 (35) hide show
  1. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/CHANGELOG +3 -0
  2. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/PKG-INFO +1 -1
  3. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/_version.py +2 -2
  4. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/s3cc.py +13 -6
  5. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared.egg-info/PKG-INFO +1 -1
  6. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/.github/workflows/check.yml +0 -0
  7. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/.github/workflows/deploy_pypi.yml +0 -0
  8. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/.gitignore +0 -0
  9. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/LICENSE +0 -0
  10. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/MANIFEST.in +0 -0
  11. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/README.rst +0 -0
  12. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/__init__.py +0 -0
  13. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/ckan.py +0 -0
  14. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/data.py +0 -0
  15. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/dcinst.py +0 -0
  16. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/mime.py +0 -0
  17. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/parse.py +0 -0
  18. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/paths.py +0 -0
  19. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/rqjob.py +0 -0
  20. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/s3.py +0 -0
  21. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/testing.py +0 -0
  22. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared/util.py +0 -0
  23. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared.egg-info/SOURCES.txt +0 -0
  24. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared.egg-info/dependency_links.txt +0 -0
  25. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared.egg-info/requires.txt +0 -0
  26. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/dcor_shared.egg-info/top_level.txt +0 -0
  27. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/pyproject.toml +0 -0
  28. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/setup.cfg +0 -0
  29. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/tests/data/calibration_beads_47.rtdc +0 -0
  30. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/tests/requirements.txt +0 -0
  31. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/tests/test_ckan.py +0 -0
  32. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/tests/test_data.py +0 -0
  33. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/tests/test_s3.py +0 -0
  34. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/tests/test_s3cc.py +0 -0
  35. {dcor_shared-1.0.3 → dcor_shared-1.0.4}/tests/test_testing.py +0 -0
@@ -1,3 +1,6 @@
1
+ 1.0.4
2
+ - enh: implement "artifact" kwarg for `s3cc.compute_checksum`
3
+ - enh: introduce `enable_basins` in `s3cc.get_s3_dc_handle`
1
4
  1.0.3
2
5
  - enh: allow to specify resource name when creating test resource
3
6
  1.0.2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dcor_shared
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: Functionalities shared by the DCOR CKAN extensions
5
5
  Author: Paul Müller
6
6
  Maintainer-email: Paul Müller <dev@craban.de>
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '1.0.3'
21
- __version_tuple__ = version_tuple = (1, 0, 3)
20
+ __version__ = version = '1.0.4'
21
+ __version_tuple__ = version_tuple = (1, 0, 4)
@@ -34,10 +34,12 @@ def artifact_exists(
34
34
  return s3.object_exists(bucket_name=bucket_name, object_name=object_name)
35
35
 
36
36
 
37
- def compute_checksum(resource_id):
37
+ def compute_checksum(
38
+ resource_id: str,
39
+ artifact: Literal["condensed", "preview", "resource"] = "resource"):
38
40
  """Compute the SHA256 checksum of the corresponding CKAN resource"""
39
41
  bucket_name, object_name = get_s3_bucket_object_for_artifact(
40
- resource_id=resource_id, artifact="resource")
42
+ resource_id=resource_id, artifact=artifact)
41
43
  s3h = s3.compute_checksum(bucket_name=bucket_name, object_name=object_name)
42
44
  return s3h
43
45
 
@@ -188,12 +190,19 @@ def get_s3_bucket_name_for_resource(resource_id):
188
190
 
189
191
  def get_s3_dc_handle(
190
192
  resource_id: str,
191
- artifact: Literal["condensed", "preview", "resource"] = "resource"):
193
+ artifact: Literal["condensed", "preview", "resource"] = "resource",
194
+ enable_basins: bool = False,
195
+ ):
192
196
  """Return an instance of :class:`RTDC_S3`
193
197
 
194
198
  The data are accessed directly via S3 using DCOR's access credentials.
195
199
  Use this if you need to access the original raw file.
196
200
 
201
+ If you set `enable_basins` to True, basins of the data on S3 will
202
+ be considered. This is turned off for performance reasons. Note that
203
+ since an instance of `RTDC_S3` is returned, no local basins are
204
+ allowed.
205
+
197
206
  The resource with the identifier `resource_id` must exist in the
198
207
  CKAN database.
199
208
  """
@@ -204,9 +213,7 @@ def get_s3_dc_handle(
204
213
  "dcor_object_store.access_key_id"),
205
214
  secret_access_key=get_ckan_config_option(
206
215
  "dcor_object_store.secret_access_key"),
207
- # Disable basins, because they could point to files on the
208
- # local file system (security).
209
- enable_basins=False,
216
+ enable_basins=enable_basins,
210
217
  )
211
218
  return ds
212
219
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dcor_shared
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: Functionalities shared by the DCOR CKAN extensions
5
5
  Author: Paul Müller
6
6
  Maintainer-email: Paul Müller <dev@craban.de>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes