Skip to content

ENH: Adding Release command to IMAP CLI#316

Merged
tech3371 merged 8 commits into
IMAP-Science-Operations-Center:mainfrom
tech3371:release_cli
May 26, 2026
Merged

ENH: Adding Release command to IMAP CLI#316
tech3371 merged 8 commits into
IMAP-Science-Operations-Center:mainfrom
tech3371:release_cli

Conversation

@tech3371
Copy link
Copy Markdown
Contributor

Change Summary

closes #315

Overview

Ability to make release through IMAP CLI.

File changes

Testing

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 ReleaseType enum in imap_data_access/utils.py (release, early-release, unrelease).
  • New release() function in imap_data_access/io.py that builds parameters and issues a request to the /release endpoint.
  • New release subcommand in imap_data_access/cli.py with --instrument, --start-date, --end-date, --release-type, optional --release-number, validated by a _release_parser handler.

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.

Comment thread imap_data_access/io.py
Comment thread imap_data_access/io.py Outdated
Comment thread imap_data_access/io.py
Comment thread imap_data_access/io.py
Comment thread imap_data_access/io.py
Comment thread imap_data_access/cli.py Outdated
Comment thread imap_data_access/cli.py Outdated
Comment thread imap_data_access/cli.py Outdated
Comment thread imap_data_access/cli.py
Copy link
Copy Markdown
Contributor

@tmplummer tmplummer left a comment

Choose a reason for hiding this comment

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

Just a couple of things to consider.

Comment thread imap_data_access/cli.py
Comment thread imap_data_access/cli.py Outdated
Comment thread imap_data_access/cli.py Outdated
@tech3371 tech3371 requested a review from tmplummer May 26, 2026 17:34
Copy link
Copy Markdown
Contributor

@tmplummer tmplummer left a comment

Choose a reason for hiding this comment

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

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.

Comment thread imap_data_access/cli.py Outdated
Comment on lines +755 to +760
"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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Contributor

@tmplummer tmplummer left a comment

Choose a reason for hiding this comment

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

Looks good!

@tech3371 tech3371 merged commit a471aad into IMAP-Science-Operations-Center:main May 26, 2026
16 checks passed
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.

ENH: add CLI command for data release API

3 participants