ENH: Adding Release command to IMAP CLI#316
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new release CLI subcommand (and corresponding release() I/O function) to the IMAP data access tool, enabling users to submit release / early-release / unrelease requests for a given instrument and date range against the SDC API. A small utils module is introduced to host the ReleaseType enum used for validation.
Changes:
- New
ReleaseTypeenum inimap_data_access/utils.py(release, early-release, unrelease). - New
release()function inimap_data_access/io.pythat builds parameters and issues a request to the/releaseendpoint. - New
releasesubcommand inimap_data_access/cli.pywith--instrument,--start-date,--end-date,--release-type, optional--release-number, validated by a_release_parserhandler.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| imap_data_access/utils.py | Introduces ReleaseType enum used to validate release type values. |
| imap_data_access/io.py | Adds the release() function that builds params and hits the /release endpoint via GET. |
| imap_data_access/cli.py | Adds release subparser, argument validation, and dispatch through _release_parser. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tmplummer
left a comment
There was a problem hiding this comment.
Just a couple of things to consider.
tmplummer
left a comment
There was a problem hiding this comment.
I know that we are in a crunch, so I won't hold this up, but I think the parameters for the release CLI are still a bit confusing and inconsistent.
| "Path to exception list file containing list of files to exclude\n" | ||
| "or include based on release type:\n" | ||
| "- For 'release': files to withhold from public release\n" | ||
| "- For 'early-release': files to release early\n" | ||
| "- For 'unrelease': files to unrelease from previously released\n" | ||
| " data" |
There was a problem hiding this comment.
Oh, interesting. I am glad I commented. This is not what I expected. Due to the different handling of this list of files from one release type to the next, would it be worth breaking it into different arguments. For release, the list of files to release is: "all files in the specified date range minus the files listed. But, for early-release and unrelease, the list of files here is the list to act on. Maybe this is too nit-picky, but I think it is good to have consistency in the UI to avoid confusion.
To add to this, it seems like for early-release and unrelease the date arguments are not required?
There was a problem hiding this comment.
I am planning to not support early-release and unrelease options yet on the lambda due to time crunch. Should I remove them for now?
a471aad
into
IMAP-Science-Operations-Center:main
Change Summary
closes #315
Overview
Ability to make release through IMAP CLI.
File changes
Testing