dcor-shared 0.11.3__tar.gz → 0.11.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 (36) hide show
  1. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/CHANGELOG +5 -0
  2. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/PKG-INFO +1 -1
  3. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/_version.py +2 -2
  4. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/data.py +5 -12
  5. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared.egg-info/PKG-INFO +1 -1
  6. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/.github/workflows/check.yml +0 -0
  7. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/.github/workflows/deploy_pypi.yml +0 -0
  8. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/.gitignore +0 -0
  9. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/LICENSE +0 -0
  10. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/MANIFEST.in +0 -0
  11. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/README.rst +0 -0
  12. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/Vagrantfile +0 -0
  13. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/__init__.py +0 -0
  14. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/ckan.py +0 -0
  15. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/dcinst.py +0 -0
  16. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/mime.py +0 -0
  17. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/parse.py +0 -0
  18. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/paths.py +0 -0
  19. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/s3.py +0 -0
  20. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/s3cc.py +0 -0
  21. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared/testing.py +0 -0
  22. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared.egg-info/SOURCES.txt +0 -0
  23. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared.egg-info/dependency_links.txt +0 -0
  24. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared.egg-info/requires.txt +0 -0
  25. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/dcor_shared.egg-info/top_level.txt +0 -0
  26. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/pyproject.toml +0 -0
  27. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/setup.cfg +0 -0
  28. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/data/calibration_beads_47.rtdc +0 -0
  29. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/requirements.txt +0 -0
  30. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_basic.py +0 -0
  31. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_ckan.py +0 -0
  32. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_data.py +0 -0
  33. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_s3.py +0 -0
  34. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_s3cc.py +0 -0
  35. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/tests/test_testing.py +0 -0
  36. {dcor_shared-0.11.3 → dcor_shared-0.11.4}/vagrant-run-tests.sh +0 -0
@@ -1,3 +1,8 @@
1
+ 0.11.4
2
+ - ref: wait longer in wait_for_resource
3
+ 0.11.3
4
+ - ref: wait longer in `wait_for_resource` loop
5
+ - ref: turn deprecation in `wait_for_resource` into ValueError
1
6
  0.11.3
2
7
  - fix: did not extract `dcor_object_store.ssl_verify` from config
3
8
  0.11.2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcor_shared
3
- Version: 0.11.3
3
+ Version: 0.11.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>
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.11.3'
16
- __version_tuple__ = version_tuple = (0, 11, 3)
15
+ __version__ = version = '0.11.4'
16
+ __version_tuple__ = version_tuple = (0, 11, 4)
@@ -2,7 +2,6 @@ import functools
2
2
  import hashlib
3
3
  import pathlib
4
4
  import time
5
- import warnings
6
5
 
7
6
  from .ckan import get_resource_path
8
7
 
@@ -47,13 +46,7 @@ def wait_for_resource(resource_id: str,
47
46
  from ckan import logic
48
47
 
49
48
  if len(resource_id) != 36:
50
- warnings.warn("Please pass the CKAN resource id as `resource_id` "
51
- "instead of a string or a path. This will raise an "
52
- "exception in the future.",
53
- DeprecationWarning)
54
- # The user passed a local path on the block storage. These look like
55
- # this: /data/dcor-instance/resources/RE/SO/URCE-ID
56
- resource_id = "".join(resource_id.split("/")[-3])
49
+ raise ValueError(f"Invalid resource id: {resource_id}")
57
50
 
58
51
  resource_show = logic.get_action("resource_show")
59
52
  path = pathlib.Path(get_resource_path(resource_id))
@@ -71,7 +64,7 @@ def wait_for_resource(resource_id: str,
71
64
  except logic.NotFound:
72
65
  # Other processes are still working on getting the resource
73
66
  # online. We have to wait.
74
- time.sleep(0.1)
67
+ time.sleep(5)
75
68
  continue
76
69
 
77
70
  s3_ok = res_dict.get("s3_available", None)
@@ -82,17 +75,17 @@ def wait_for_resource(resource_id: str,
82
75
  # If the dataset is on S3, it is considered to be available.
83
76
  break
84
77
  elif not path.exists():
85
- time.sleep(0.05)
78
+ time.sleep(5)
86
79
  continue
87
80
  elif dcor_depot_available and not path.is_symlink():
88
81
  # Resource is only available when it is symlinked by
89
82
  # the ckanext.dcor_depot `symlink_user_dataset` job
90
83
  # (or by the ckanext.dcor_depot importers).
91
- time.sleep(0.05)
84
+ time.sleep(5)
92
85
  continue
93
86
  elif path.stat().st_size == ld and path.read_bytes() == DUMMY_BYTES:
94
87
  # wait a bit
95
- time.sleep(0.01)
88
+ time.sleep(5)
96
89
  continue
97
90
  else:
98
91
  # not a dummy file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcor_shared
3
- Version: 0.11.3
3
+ Version: 0.11.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