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.
- {dds_cli-2.15.0/dds_cli.egg-info → dds_cli-2.15.1}/PKG-INFO +11 -11
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/data_putter.py +1 -2
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/exceptions.py +4 -2
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/utils.py +15 -5
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/version.py +1 -1
- {dds_cli-2.15.0 → dds_cli-2.15.1/dds_cli.egg-info}/PKG-INFO +11 -11
- dds_cli-2.15.1/dds_cli.egg-info/requires.txt +21 -0
- dds_cli-2.15.1/requirements.txt +19 -0
- dds_cli-2.15.0/dds_cli.egg-info/requires.txt +0 -21
- dds_cli-2.15.0/requirements.txt +0 -19
- {dds_cli-2.15.0 → dds_cli-2.15.1}/LICENSE +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/MANIFEST.in +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/README.md +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/__init__.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/__main__.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/account_manager.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/auth.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/base.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/constants.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/custom_decorators.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/data_getter.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/data_lister.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/data_remover.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/directory.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/file_compressor.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/file_encryptor.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/file_handler.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/file_handler_local.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/file_handler_remote.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/message_helper.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/motd_manager.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/options.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/project_creator.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/project_info.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/project_status.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/s3_connector.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/status.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/superadmin_helper.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/text_handler.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/timestamp.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/unit_manager.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli/user.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli.egg-info/SOURCES.txt +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli.egg-info/dependency_links.txt +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli.egg-info/entry_points.txt +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli.egg-info/not-zip-safe +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/dds_cli.egg-info/top_level.txt +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/pyproject.toml +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/setup.cfg +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/setup.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/__init__.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_account_manager.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_auth.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_base.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_commands.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_data_getter.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_data_putter.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_data_remover.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_decorators.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_file_compressor.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_file_encryptor.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_file_handler_local.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_motd_manager.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_project_status.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_s3_connector.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_superadmin_helper.py +0 -0
- {dds_cli-2.15.0 → dds_cli-2.15.1}/tests/test_user.py +0 -0
- {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.
|
|
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.
|
|
19
|
-
Requires-Dist: cryptography==50.0.
|
|
20
|
-
Requires-Dist: immutabledict==
|
|
21
|
-
Requires-Dist: jwcrypto==1.
|
|
22
|
-
Requires-Dist: prettytable==3.
|
|
23
|
-
Requires-Dist: prompt-toolkit==3.0.
|
|
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.
|
|
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.
|
|
31
|
-
Requires-Dist: simplejson==4.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.
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dds_cli
|
|
3
|
-
Version: 2.15.
|
|
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.
|
|
19
|
-
Requires-Dist: cryptography==50.0.
|
|
20
|
-
Requires-Dist: immutabledict==
|
|
21
|
-
Requires-Dist: jwcrypto==1.
|
|
22
|
-
Requires-Dist: prettytable==3.
|
|
23
|
-
Requires-Dist: prompt-toolkit==3.0.
|
|
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.
|
|
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.
|
|
31
|
-
Requires-Dist: simplejson==4.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.
|
|
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
|
dds_cli-2.15.0/requirements.txt
DELETED
|
@@ -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
|
|
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
|
|
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
|