Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ Command line tool that allows the user to execute data operations on the platfor
| 3.19.5 | 2.15.2 | 2.15.2 |
| 3.19.6 | 2.15.2 | 2.15.2 |
| 3.19.7 | 2.15.2 | 2.15.2 |
| 3.20.0 | 2.15.2 | 2.15.2 |
| 3.20.0 | 2.16.0 | 2.15.2 |
| 3.20.1 | 2.16 | 2.16 |
<!-- COMPATIBLE_VERSIONS_END -->

## Build Instructions
Expand Down
2 changes: 1 addition & 1 deletion app/configs/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Connections:
url_fileops_core = ConfigClass.url_fileops_core
url_status = ConfigClass.url_status
url_v2_download_pre = ConfigClass.url_v2_download_pre
url_dataset_v2download = ConfigClass.url_dataset_v2download
url_dataset_download_v2 = ConfigClass.url_dataset_download_v2
url_dataset = ConfigClass.url_dataset
url_validation = ConfigClass.url_validation
url_keycloak = ConfigClass.url_keycloak
Expand Down
4 changes: 2 additions & 2 deletions app/configs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ def url_v2_download_pre(self) -> str:
return f'{self.url_bff}/v1/project/%s/files/download'

@computed_field
def url_dataset_v2download(self) -> str:
return f'{self.api_url}/portal/download/core/v2/dataset'
def url_dataset_download_v2(self) -> str:
return f'{self.api_url}/portal/v2/dataset'

@computed_field
def url_dataset(self) -> str:
Expand Down
6 changes: 3 additions & 3 deletions app/services/dataset_manager/dataset_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class SrvDatasetDownloadManager(BaseAuthClient, metaclass=MetaService):
def __init__(self, output_path, dataset_code, dataset_geid):
super().__init__(AppConfig.Connections.url_dataset)
super().__init__(AppConfig.Connections.url_dataset_download_v2)

self.user = UserConfig()
self.output = output_path
Expand Down Expand Up @@ -58,7 +58,7 @@ def pre_dataset_download(self) -> Dict[str, Any]:

payload = {'dataset_code': self.dataset_code, 'session_id': self.session_id, 'operator': self.user.username}
try:
self.endpoint = AppConfig.Connections.url_dataset_v2download
self.endpoint = AppConfig.Connections.url_dataset_download_v2
response = self._post('download/pre', json=payload)
except HTTPStatusError as e:
response = e.response
Expand Down Expand Up @@ -134,7 +134,7 @@ def avoid_duplicate_file_name(self, filename) -> str:
def download_dataset(self) -> None:
pre_result = self.pre_dataset_download()
self.hash_code = pre_result.get('result').get('payload').get('hash_code')
self.download_url = AppConfig.Connections.url_fileops_core + f'v1/download/{self.hash_code}'
self.download_url = AppConfig.Connections.url_fileops_core + f'/v1/download/{self.hash_code}'
# format the naming for the default filename
self.default_filename = pre_result.get('result').get('target_names')[0]
self.default_filename = self.default_filename.split('/')[-1]
Expand Down
1 change: 1 addition & 0 deletions docs/compatible_version.ndjson
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
{"Cli Version": "3.19.6", "Pilot Release Version": "2.15.2", "Compatible Version": "2.15.2"}
{"Cli Version": "3.19.7", "Pilot Release Version": "2.15.2", "Compatible Version": "2.15.2"}
{"Cli Version": "3.20.0", "Pilot Release Version": "2.16.0", "Compatible Version": "2.15.2"}
{"Cli Version": "3.20.1", "Pilot Release Version": "2.16.0", "Compatible Version": "2.16.0"}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "app"
version = "3.20.0"
version = "3.20.1"
description = "This service is designed to support pilot platform"
authors = ["Indoc Systems"]

Expand Down
4 changes: 2 additions & 2 deletions tests/app/services/dataset_manager/test_dataset_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_dateset_pre_download_success(httpx_mock, mocker):

httpx_mock.add_response(
method='POST',
url=AppConfig.Connections.url_dataset_v2download + '/download/pre',
url=AppConfig.Connections.url_dataset_download_v2 + '/download/pre',
json={'result': {'payload': {'hash_code': 'hash_code'}, 'target_names': ['test.txt']}},
status_code=200,
)
Expand Down Expand Up @@ -104,7 +104,7 @@ def test_download_dataset(httpx_mock, mocker):

httpx_mock.add_response(
method='POST',
url=AppConfig.Connections.url_dataset_v2download + '/download/pre',
url=AppConfig.Connections.url_dataset_download_v2 + '/download/pre',
json={'result': {'payload': {'hash_code': 'hash_code'}, 'target_names': ['test.txt']}},
status_code=200,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def mock_settings(monkeypatch, mocker):
monkeypatch.setattr(AppConfig.Connections, 'url_authn', 'http://service_auth')
monkeypatch.setattr(AppConfig.Connections, 'url_bff', 'http://bff_cli')
monkeypatch.setattr(AppConfig.Connections, 'url_dataset', 'http://url_dataset')
monkeypatch.setattr(AppConfig.Connections, 'url_dataset_v2download', 'http://url_dataset_download_v2')
monkeypatch.setattr(AppConfig.Connections, 'url_dataset_download_v2', 'http://url_dataset_download_v2')
monkeypatch.setattr(AppConfig.Connections, 'url_fileops_core', 'http://url_dataset_download_core')
monkeypatch.setattr(AppConfig.Connections, 'url_fileops_greenroom', 'http://upload_gr')
monkeypatch.setattr(AppConfig.Connections, 'url_keycloak_realm', 'http://url_keycloak_realm')
Expand Down
Loading