Skip to content

Commit

Permalink
add centre-id root directory to zipfile
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Sep 23, 2024
1 parent 200ede1 commit 03106c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wis2-gdc-management/wis2_gdc/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _get_next_link(links) -> Union[str, None]:

for feature in response['features']:
LOGGER.debug(f"Saving {feature['id']} to archive")
filename = f"{feature['id']}.json"
filename = f"{CENTRE_ID}/{feature['id']}.json"
zf.writestr(filename, json.dumps(feature))

if _get_next_link(response['links']) is None:
Expand All @@ -100,5 +100,5 @@ def _get_next_link(links) -> Union[str, None]:
def archive(ctx, archive_zipfile, verbosity='NOTSET'):
"""Archive discovery metadata records"""

click.echo(f'Archiving metadata from GDC {API_URL}')
click.echo(f'Archiving metadata from GDC {API_URL} to {archive_zipfile}')
archive_metadata(archive_zipfile)

0 comments on commit 03106c4

Please sign in to comment.