dcor-shared 0.12.1__tar.gz → 0.12.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.
Files changed (35) hide show
  1. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/.github/workflows/check.yml +2 -2
  2. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/CHANGELOG +2 -0
  3. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/PKG-INFO +1 -1
  4. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/_version.py +2 -2
  5. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/testing.py +24 -10
  6. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared.egg-info/PKG-INFO +1 -1
  7. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/.github/workflows/deploy_pypi.yml +0 -0
  8. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/.gitignore +0 -0
  9. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/LICENSE +0 -0
  10. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/MANIFEST.in +0 -0
  11. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/README.rst +0 -0
  12. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/__init__.py +0 -0
  13. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/ckan.py +0 -0
  14. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/data.py +0 -0
  15. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/dcinst.py +0 -0
  16. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/mime.py +0 -0
  17. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/parse.py +0 -0
  18. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/paths.py +0 -0
  19. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/rqjob.py +0 -0
  20. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/s3.py +0 -0
  21. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared/s3cc.py +0 -0
  22. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared.egg-info/SOURCES.txt +0 -0
  23. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared.egg-info/dependency_links.txt +0 -0
  24. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared.egg-info/requires.txt +0 -0
  25. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/dcor_shared.egg-info/top_level.txt +0 -0
  26. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/pyproject.toml +0 -0
  27. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/setup.cfg +0 -0
  28. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/tests/data/calibration_beads_47.rtdc +0 -0
  29. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/tests/requirements.txt +0 -0
  30. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/tests/test_basic.py +0 -0
  31. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/tests/test_ckan.py +0 -0
  32. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/tests/test_data.py +0 -0
  33. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/tests/test_s3.py +0 -0
  34. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/tests/test_s3cc.py +0 -0
  35. {dcor_shared-0.12.1 → dcor_shared-0.12.2}/tests/test_testing.py +0 -0
@@ -72,8 +72,8 @@ jobs:
72
72
 
73
73
  - name: Install and setup DCOR
74
74
  run: |
75
- # pip3 install dcor_control
76
- pip3 install git+https://github.com/DCOR-dev/dcor_control
75
+ pip3 install dcor_control
76
+
77
77
  # use test-core.ini as default
78
78
  cp /srv/app/src/ckan/test-core.ini /srv/app/ckan.ini
79
79
  # initialize CKAN database
@@ -1,3 +1,5 @@
1
+ 0.12.2
2
+ - fix: testing did not append S3 resources
1
3
  0.12.1
2
4
  - ci: migrate to docker
3
5
  - ref: deprecate `get_resource_path`, `make_dataset`, `make_resource`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dcor_shared
3
- Version: 0.12.1
3
+ Version: 0.12.2
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 = '0.12.1'
21
- __version_tuple__ = version_tuple = (0, 12, 1)
20
+ __version__ = version = '0.12.2'
21
+ __version_tuple__ = version_tuple = (0, 12, 2)
@@ -168,7 +168,6 @@ def make_dataset_via_s3(
168
168
  rid = make_resource_via_s3(resource_path=resource_path,
169
169
  organization_id=owner_org["id"],
170
170
  dataset_id=ds_dict["id"],
171
- create_context=create_context,
172
171
  private=ds_dict.get("private", False)
173
172
  )
174
173
  else:
@@ -212,9 +211,21 @@ def make_resource_via_s3(
212
211
  resource_path: pathlib.Path | str,
213
212
  organization_id: str,
214
213
  dataset_id: str,
215
- create_context: Dict,
216
- private: bool = False):
214
+ create_context: Dict = None,
215
+ private: bool = False,
216
+ ret_dict: bool = False,
217
+ ):
217
218
  """Upload a resource to S3 and register it with CKAN"""
219
+ if create_context is not None:
220
+ warnings.warn("Create context has no effect for creating resources "
221
+ f"via S3 for testing (got {create_context})",
222
+ DeprecationWarning)
223
+
224
+ user = factories.Sysadmin()
225
+ create_context = {'ignore_auth': False,
226
+ 'user': user['name'],
227
+ 'api_version': 3}
228
+
218
229
  bucket_name = get_ckan_config_option(
219
230
  "dcor_object_store.bucket_name").format(
220
231
  organization_id=organization_id)
@@ -228,15 +239,18 @@ def make_resource_via_s3(
228
239
 
229
240
  revise_dict = {
230
241
  "match": {"id": dataset_id},
231
- "update": {"resources": [{"id": rid,
232
- "name": resource_path.name,
233
- "s3_available": True,
234
- }
235
- ]
236
- }
242
+ "update__resources__extend": [{
243
+ "id": rid,
244
+ "name": resource_path.name,
245
+ "s3_available": True,
246
+ }]
237
247
  }
238
248
  helpers.call_action("package_revise", create_context, **revise_dict)
239
- return rid
249
+ if ret_dict:
250
+ res_dict = helpers.call_action("resource_show", id=rid)
251
+ return res_dict
252
+ else:
253
+ return rid
240
254
 
241
255
 
242
256
  def synchronous_enqueue_job(job_func, args=None, kwargs=None, title=None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dcor_shared
3
- Version: 0.12.1
3
+ Version: 0.12.2
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