Skip to content

CMR collections to JSON#4

Merged
mankoff merged 8 commits intomainfrom
cmr-to-csv
Sep 28, 2022
Merged

CMR collections to JSON#4
mankoff merged 8 commits intomainfrom
cmr-to-csv

Conversation

@MattF-NSIDC
Copy link
Copy Markdown
Collaborator

@MattF-NSIDC MattF-NSIDC commented Sep 28, 2022

Simple script for querying CMR for collections, getting granules of each collection, and writing them out, one JSON file per collection.

@MattF-NSIDC MattF-NSIDC requested a review from mankoff September 28, 2022 22:19
from pathlib import Path


JSON_STORAGE_DIR = Path('/tmp/cryo-data-ingest')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let user specify where to store files as part of CLI interface?


collection_fp = JSON_STORAGE_DIR / f'{collection_readable_id}.json'

JSON_STORAGE_DIR.mkdir(exist_ok=True)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If user-defined location, maybe add parents=True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants