dds-cli 2.15.0__tar.gz → 2.15.1__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 (68) hide show
  1. {dds_cli-2.15.0/dds_cli.egg-info → dds_cli-2.15.1}/PKG-INFO +11 -11
  2. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/data_putter.py +1 -2
  3. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/exceptions.py +4 -2
  4. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/utils.py +15 -5
  5. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/version.py +1 -1
  6. {dds_cli-2.15.0 → dds_cli-2.15.1/dds_cli.egg-info}/PKG-INFO +11 -11
  7. dds_cli-2.15.1/dds_cli.egg-info/requires.txt +21 -0
  8. dds_cli-2.15.1/requirements.txt +19 -0
  9. dds_cli-2.15.0/dds_cli.egg-info/requires.txt +0 -21
  10. dds_cli-2.15.0/requirements.txt +0 -19
  11. {dds_cli-2.15.0 → dds_cli-2.15.1}/LICENSE +0 -0
  12. {dds_cli-2.15.0 → dds_cli-2.15.1}/MANIFEST.in +0 -0
  13. {dds_cli-2.15.0 → dds_cli-2.15.1}/README.md +0 -0
  14. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/__init__.py +0 -0
  15. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/__main__.py +0 -0
  16. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/account_manager.py +0 -0
  17. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/auth.py +0 -0
  18. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/base.py +0 -0
  19. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/constants.py +0 -0
  20. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/custom_decorators.py +0 -0
  21. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/data_getter.py +0 -0
  22. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/data_lister.py +0 -0
  23. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/data_remover.py +0 -0
  24. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/directory.py +0 -0
  25. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/file_compressor.py +0 -0
  26. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/file_encryptor.py +0 -0
  27. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/file_handler.py +0 -0
  28. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/file_handler_local.py +0 -0
  29. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/file_handler_remote.py +0 -0
  30. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/message_helper.py +0 -0
  31. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/motd_manager.py +0 -0
  32. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/options.py +0 -0
  33. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/project_creator.py +0 -0
  34. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/project_info.py +0 -0
  35. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/project_status.py +0 -0
  36. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/s3_connector.py +0 -0
  37. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/status.py +0 -0
  38. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/superadmin_helper.py +0 -0
  39. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/text_handler.py +0 -0
  40. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/timestamp.py +0 -0
  41. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/unit_manager.py +0 -0
  42. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/user.py +0 -0
  43. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli.egg-info/SOURCES.txt +0 -0
  44. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli.egg-info/dependency_links.txt +0 -0
  45. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli.egg-info/entry_points.txt +0 -0
  46. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli.egg-info/not-zip-safe +0 -0
  47. {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli.egg-info/top_level.txt +0 -0
  48. {dds_cli-2.15.0 → dds_cli-2.15.1}/pyproject.toml +0 -0
  49. {dds_cli-2.15.0 → dds_cli-2.15.1}/setup.cfg +0 -0
  50. {dds_cli-2.15.0 → dds_cli-2.15.1}/setup.py +0 -0
  51. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/__init__.py +0 -0
  52. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_account_manager.py +0 -0
  53. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_auth.py +0 -0
  54. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_base.py +0 -0
  55. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_commands.py +0 -0
  56. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_data_getter.py +0 -0
  57. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_data_putter.py +0 -0
  58. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_data_remover.py +0 -0
  59. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_decorators.py +0 -0
  60. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_file_compressor.py +0 -0
  61. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_file_encryptor.py +0 -0
  62. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_file_handler_local.py +0 -0
  63. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_motd_manager.py +0 -0
  64. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_project_status.py +0 -0
  65. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_s3_connector.py +0 -0
  66. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_superadmin_helper.py +0 -0
  67. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_user.py +0 -0
  68. {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dds_cli
3
- Version: 2.15.0
3
+ Version: 2.15.1
4
4
  Summary: A command line tool to manage data and projects in the SciLifeLab Data Delivery System.
5
5
  Home-page: https://github.com/ScilifelabDataCentre/dds_cli
6
6
  Author: SciLifeLab Data Centre
@@ -15,22 +15,22 @@ Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
16
  Requires-Dist: boto3==1.24.73
17
17
  Requires-Dist: botocore==1.27.73
18
- Requires-Dist: click==8.1.3
19
- Requires-Dist: cryptography==50.0.0
20
- Requires-Dist: immutabledict==2.2.1
21
- Requires-Dist: jwcrypto==1.5.8
22
- Requires-Dist: prettytable==3.7.0
23
- Requires-Dist: prompt-toolkit==3.0.40
18
+ Requires-Dist: click==8.5.0
19
+ Requires-Dist: cryptography==50.0.1
20
+ Requires-Dist: immutabledict==4.3.1
21
+ Requires-Dist: jwcrypto==1.6.0
22
+ Requires-Dist: prettytable==3.18.0
23
+ Requires-Dist: prompt-toolkit==3.0.53
24
24
  Requires-Dist: PyNaCl==1.6.2
25
25
  Requires-Dist: pytz==2026.3.post1
26
- Requires-Dist: PyYAML==6.0.2
26
+ Requires-Dist: PyYAML==6.0.3
27
27
  Requires-Dist: questionary==2.1.1
28
28
  Requires-Dist: requests==2.33.0
29
29
  Requires-Dist: rich==15.0.0
30
- Requires-Dist: rich-click==1.5.2
31
- Requires-Dist: simplejson==4.1.1
30
+ Requires-Dist: rich-click==1.9.9
31
+ Requires-Dist: simplejson==4.1.2
32
32
  Requires-Dist: tzlocal==4.3.1
33
- Requires-Dist: zstandard==0.23.0
33
+ Requires-Dist: zstandard==0.25.0
34
34
  Requires-Dist: legacy-cgi==2.6.1; python_version >= "3.13"
35
35
  Dynamic: author
36
36
  Dynamic: classifier
@@ -552,8 +552,7 @@ class DataPutter(base.DDSBaseClass):
552
552
  dds_cli.exceptions.ApiResponseError,
553
553
  dds_cli.exceptions.DDSCLIException,
554
554
  ) as err:
555
- err_text = str(err)
556
- if "Response code: 404" in err_text:
555
+ if getattr(err, "status_code", None) == 404:
557
556
  LOG.warning(
558
557
  "Upload succeeded, but the project 'Last updated' timestamp could not "
559
558
  "be refreshed because the backend does not expose the upload-complete "
@@ -30,11 +30,12 @@ class InvalidMethodError(Exception):
30
30
  class DDSCLIException(click.ClickException):
31
31
  """Base exception for click in DDS."""
32
32
 
33
- def __init__(self, message, sign=":warning-emoji:", show_emojis=False):
33
+ def __init__(self, message, sign=":warning-emoji:", show_emojis=False, status_code=None):
34
34
  """Init base exception."""
35
35
  self.message = message
36
36
  self.show_emojis = show_emojis
37
37
  self.sign = sign
38
+ self.status_code = status_code
38
39
  super().__init__(message)
39
40
 
40
41
  def __str__(self):
@@ -92,8 +93,9 @@ class ApiRequestError(requests.exceptions.RequestException):
92
93
  class ApiResponseError(Exception):
93
94
  """REST API Request does not return code 200 in response."""
94
95
 
95
- def __init__(self, message):
96
+ def __init__(self, message, status_code=None):
96
97
  """Log and raise."""
98
+ self.status_code = status_code
97
99
  super().__init__(message)
98
100
 
99
101
 
@@ -243,7 +243,8 @@ def perform_request(
243
243
  message=(
244
244
  f"Response code: {response.status_code}. "
245
245
  f"The request did not return a valid JSON response. Details: {err}"
246
- )
246
+ ),
247
+ status_code=response.status_code,
247
248
  )
248
249
  except requests.exceptions.RequestException as err:
249
250
  if isinstance(err, requests.exceptions.ConnectionError):
@@ -277,20 +278,29 @@ def perform_request(
277
278
  else:
278
279
  message += f": {response_json.get('message')}"
279
280
 
280
- raise dds_cli.exceptions.DDSCLIException(message=message, show_emojis=show_warning)
281
+ raise dds_cli.exceptions.DDSCLIException(
282
+ message=message,
283
+ show_emojis=show_warning,
284
+ status_code=response.status_code,
285
+ )
281
286
 
282
287
  # Handle 403
283
288
  if response.status_code == http.HTTPStatus.FORBIDDEN:
284
289
  message += f": {response_json.get('message')}"
285
- raise dds_cli.exceptions.DDSCLIException(message=message)
290
+ raise dds_cli.exceptions.DDSCLIException(
291
+ message=message, status_code=response.status_code
292
+ )
286
293
 
287
294
  # Handle 500
288
295
  if response.status_code == http.HTTPStatus.INTERNAL_SERVER_ERROR:
289
296
  message += f": {response_json.get('message', response.reason)}"
290
- raise dds_cli.exceptions.ApiResponseError(message=message)
297
+ raise dds_cli.exceptions.ApiResponseError(
298
+ message=message, status_code=response.status_code
299
+ )
291
300
 
292
301
  raise dds_cli.exceptions.DDSCLIException(
293
- message=f"{message}: {response_json.get('message', 'Unexpected error!')}"
302
+ message=f"{message}: {response_json.get('message', 'Unexpected error!')}",
303
+ status_code=response.status_code,
294
304
  )
295
305
 
296
306
  return response_json, additional_errors
@@ -2,4 +2,4 @@
2
2
 
3
3
  # Do not change bump the major version unless absolutely necessary - makes incompatible with API
4
4
  # If mid or minor version reaches 9, continue to 10, 11 etc.
5
- __version__ = "2.15.0"
5
+ __version__ = "2.15.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dds_cli
3
- Version: 2.15.0
3
+ Version: 2.15.1
4
4
  Summary: A command line tool to manage data and projects in the SciLifeLab Data Delivery System.
5
5
  Home-page: https://github.com/ScilifelabDataCentre/dds_cli
6
6
  Author: SciLifeLab Data Centre
@@ -15,22 +15,22 @@ Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
16
  Requires-Dist: boto3==1.24.73
17
17
  Requires-Dist: botocore==1.27.73
18
- Requires-Dist: click==8.1.3
19
- Requires-Dist: cryptography==50.0.0
20
- Requires-Dist: immutabledict==2.2.1
21
- Requires-Dist: jwcrypto==1.5.8
22
- Requires-Dist: prettytable==3.7.0
23
- Requires-Dist: prompt-toolkit==3.0.40
18
+ Requires-Dist: click==8.5.0
19
+ Requires-Dist: cryptography==50.0.1
20
+ Requires-Dist: immutabledict==4.3.1
21
+ Requires-Dist: jwcrypto==1.6.0
22
+ Requires-Dist: prettytable==3.18.0
23
+ Requires-Dist: prompt-toolkit==3.0.53
24
24
  Requires-Dist: PyNaCl==1.6.2
25
25
  Requires-Dist: pytz==2026.3.post1
26
- Requires-Dist: PyYAML==6.0.2
26
+ Requires-Dist: PyYAML==6.0.3
27
27
  Requires-Dist: questionary==2.1.1
28
28
  Requires-Dist: requests==2.33.0
29
29
  Requires-Dist: rich==15.0.0
30
- Requires-Dist: rich-click==1.5.2
31
- Requires-Dist: simplejson==4.1.1
30
+ Requires-Dist: rich-click==1.9.9
31
+ Requires-Dist: simplejson==4.1.2
32
32
  Requires-Dist: tzlocal==4.3.1
33
- Requires-Dist: zstandard==0.23.0
33
+ Requires-Dist: zstandard==0.25.0
34
34
  Requires-Dist: legacy-cgi==2.6.1; python_version >= "3.13"
35
35
  Dynamic: author
36
36
  Dynamic: classifier
@@ -0,0 +1,21 @@
1
+ boto3==1.24.73
2
+ botocore==1.27.73
3
+ click==8.5.0
4
+ cryptography==50.0.1
5
+ immutabledict==4.3.1
6
+ jwcrypto==1.6.0
7
+ prettytable==3.18.0
8
+ prompt-toolkit==3.0.53
9
+ PyNaCl==1.6.2
10
+ pytz==2026.3.post1
11
+ PyYAML==6.0.3
12
+ questionary==2.1.1
13
+ requests==2.33.0
14
+ rich==15.0.0
15
+ rich-click==1.9.9
16
+ simplejson==4.1.2
17
+ tzlocal==4.3.1
18
+ zstandard==0.25.0
19
+
20
+ [:python_version >= "3.13"]
21
+ legacy-cgi==2.6.1
@@ -0,0 +1,19 @@
1
+ boto3==1.24.73
2
+ botocore==1.27.73
3
+ click==8.5.0
4
+ cryptography==50.0.1
5
+ immutabledict==4.3.1
6
+ jwcrypto==1.6.0
7
+ prettytable==3.18.0
8
+ prompt-toolkit==3.0.53
9
+ PyNaCl==1.6.2
10
+ pytz==2026.3.post1
11
+ PyYAML==6.0.3
12
+ questionary==2.1.1
13
+ requests==2.33.0
14
+ rich==15.0.0
15
+ rich-click==1.9.9
16
+ simplejson==4.1.2
17
+ tzlocal==4.3.1
18
+ zstandard==0.25.0
19
+ legacy-cgi==2.6.1 ; python_version >= '3.13'
@@ -1,21 +0,0 @@
1
- boto3==1.24.73
2
- botocore==1.27.73
3
- click==8.1.3
4
- cryptography==50.0.0
5
- immutabledict==2.2.1
6
- jwcrypto==1.5.8
7
- prettytable==3.7.0
8
- prompt-toolkit==3.0.40
9
- PyNaCl==1.6.2
10
- pytz==2026.3.post1
11
- PyYAML==6.0.2
12
- questionary==2.1.1
13
- requests==2.33.0
14
- rich==15.0.0
15
- rich-click==1.5.2
16
- simplejson==4.1.1
17
- tzlocal==4.3.1
18
- zstandard==0.23.0
19
-
20
- [:python_version >= "3.13"]
21
- legacy-cgi==2.6.1
@@ -1,19 +0,0 @@
1
- boto3==1.24.73
2
- botocore==1.27.73
3
- click==8.1.3
4
- cryptography==50.0.0
5
- immutabledict==2.2.1
6
- jwcrypto==1.5.8
7
- prettytable==3.7.0
8
- prompt-toolkit==3.0.40
9
- PyNaCl==1.6.2
10
- pytz==2026.3.post1
11
- PyYAML==6.0.2
12
- questionary==2.1.1
13
- requests==2.33.0
14
- rich==15.0.0
15
- rich-click==1.5.2
16
- simplejson==4.1.1
17
- tzlocal==4.3.1
18
- zstandard==0.23.0
19
- legacy-cgi==2.6.1 ; python_version >= '3.13'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes