Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Stage in root url relative #63

Merged
merged 13 commits into from
Dec 2, 2024
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
4 changes: 1 addition & 3 deletions mdps_ds_lib/stage_in_out/download_granules_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ def download(self, **kwargs) -> str:
catalog = Catalog(
id='NA',
description='NA')
catalog.set_self_href(os.path.join(self._download_dir, 'catalog.json'))
# catalog.add_link(Link('item', failed_features_file, 'application/json'))

catalog.add_link(Link('root', f'catalog.json', 'application/json'))
if len(self._granules_json.items) < 1:
LOGGER.warning(f'cannot find any granules')
granules_json_dict = self._granules_json.to_dict(False)
Expand Down
1 change: 1 addition & 0 deletions tests/integration_tests/test_docker_stage_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -1920,6 +1920,7 @@ def test_02_download__from_http_with_role(self):
catalog_result = FileUtils.read_json(f'{downloading_dir}/catalog.json')
print(catalog_result)
catalog_result = Catalog.from_dict(catalog_result)
self.assertEqual(catalog_result.links[0].href, 'catalog.json', f'wrong root: {catalog_result.links[0]}')
for each in catalog_result.links[1:]:
print(FileUtils.read_json(f'{downloading_dir}/{each.href}'))
for each_granule in zip(granule_json['features'], download_result):
Expand Down
Loading