This PR updates some of the help strings, and adds some of them as descriptions so that using the -h flag will (hopefully) provide all of the info a user might need. Here is what the output looks like:
mabo8927: imap-data-access -h
usage: imap-data-access [-h] [--version] [--data-dir DATA_DIR] [--url URL] [--debug] [-v] {download,query,upload} ...
This command line program accesses the IMAP SDC APIs to query, download, and upload data files.
positional arguments:
{download,query,upload}
download Download a file from the IMAP SDC to the locally configured data directory.
query Query the IMAP SDC for files matching the query parameters. The query parameters are
optional, but at least one must be provided.
upload Upload a file to the IMAP SDC. This must be the full path to the file. E.g.
imap/mag/l0/2025/01/imap_mag_l0_raw_20250101_20250101_v00-00.pkts
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--data-dir DATA_DIR Directory to use for reading and writing IMAP data. The default is a 'data/' folder in the
current working directory. This can also be set using the IMAP_DATA_DIR environment variable.
--url URL URL of the IMAP SDC API. The default is https://api.dev.imap-mission.com. This can also be
set using the IMAP_DATA_ACCESS_URL environment variable.
--debug Print lots of debugging statements
-v, --verbose Add verbose output
mabo8927: imap-data-access upload -h
usage: imap-data-access upload [-h] file_path
Upload a file to the IMAP SDC. This must be the full path to the file. E.g.
imap/mag/l0/2025/01/imap_mag_l0_raw_20250101_20250101_v00-00.pkts
positional arguments:
file_path This must be the full path to the file. E.g.
imap/mag/l0/2025/01/imap_mag_l0_raw_20250101_20250101_v00-00.pkts
optional arguments:
-h, --help show this help message and exit
mabo8927: imap-data-access download -h
usage: imap-data-access download [-h] file_path
Download a file from the IMAP SDC to the locally configured data directory.
positional arguments:
file_path This must be the full path to the file. E.g.
imap/mag/l0/2025/01/imap_mag_l0_raw_20250101_20250101_v00-00.pkts
optional arguments:
-h, --help show this help message and exit
mabo8927: imap-data-access query -h
usage: imap-data-access query [-h] [--instrument {codice,glows,hi,hit,idex,lo,mag,swapi,swe,ultra}]
[--data-level DATA_LEVEL] [--descriptor DESCRIPTOR] [--start-date START_DATE]
[--end-date END_DATE] [--version VERSION] [--extension EXTENSION]
[--output-format {table,json}]
Query the IMAP SDC for files matching the query parameters. The query parameters are optional, but at least one must
be provided.
optional arguments:
-h, --help show this help message and exit
--instrument {codice,glows,hi,hit,idex,lo,mag,swapi,swe,ultra}
Name of the instrument
--data-level DATA_LEVEL
Data level of the product (l0, l1a, l2, etc.)
--descriptor DESCRIPTOR
Descriptor of the product (raw, burst, etc.)
--start-date START_DATE
Start date in YYYYMMDD format
--end-date END_DATE End date in YYYYMMDD format
--version VERSION Version of the product in the format 'v00-00'
--extension EXTENSION
File extension (cdf, pkts, etc.)
--output-format {table,json}
How to format the output, default is 'table'
Change Summary
Overview
This PR updates some of the help strings, and adds some of them as
descriptions
so that using the-h
flag will (hopefully) provide all of the info a user might need. Here is what the output looks like:New Dependencies
Updated Files
imap_data_access/cli.py