Release command cleanup - #340
Merged
tech3371 merged 4 commits intoJul 24, 2026
Merged
Conversation
tech3371
force-pushed
the
release-cleanup
branch
from
July 24, 2026 21:20
d568170 to
93eb2cc
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors the “release” flow to align with an updated archive API contract by switching from instrument/date/release-number based parameters to a manifest-file driven release request, and updates the CLI and tests accordingly.
Changes:
- Updated
io.release()to requirerelease_type+manifest_file, upload the manifest, then call the/releaseendpoint with the manifest basename. - Simplified the CLI
releasesubcommand by removing instrument/date/release-number/exclude-file flags and updating help text. - Updated unit tests to create a temp manifest file and assert the expected 3-request sequence (upload GET, S3 PUT, release GET).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
imap_data_access/io.py |
Refactors release() signature/validation and implements manifest upload + /release request based on manifest basename. |
imap_data_access/cli.py |
Simplifies release subcommand arguments/help to match the new manifest-based release flow. |
tests/test_io.py |
Updates release tests to exercise the new manifest upload + release request sequence and removes obsolete parameter-based tests. |
Comments suppressed due to low confidence (6)
imap_data_access/io.py:591
- The docstring lists 'early-release' and 'unrelease' as supported release types, but the function currently raises for both as "Not supported yet". The docstring should reflect that these types are not supported.
- 'early-release': Early release of selected files approved by both
instrument and project.
- 'unrelease': Unrelease previously released files due to various
causes and reasons.
imap_data_access/io.py:593
- The docstring type for
manifest_filesaysstr, but the function takes aPath(and the CLI passes a string path). Update the docstring to match the accepted path-like inputs.
manifest_file : str
Path to manifest file containing specification.
imap_data_access/io.py:609
- The current
manifest_file is Nonecheck doesn't actually validate that the path is valid, despite the error message implying it does. Consider normalizing toPathand checkingis_file()so users get a clear, early error instead of a laterFileNotFoundError/IsADirectoryErrorduring upload.
if manifest_file is None:
raise ValueError("Manifest file is required or check that the path is valid.")
imap_data_access/io.py:631
- Since
manifest_fileis normalized to aPath,manifest_file.nameis clearer thanos.path.basename(...)and avoids implicit path-to-str coercion.
"manifest_file": os.path.basename(manifest_file),
imap_data_access/io.py:618
- Behavior for unsupported
release_typevalues (currently early-release/unrelease) is new/changed here but there is no test asserting the expected error. Adding a small parametrized test would prevent regressions.
if release_type in [ReleaseType.EARLY_RELEASE.value, ReleaseType.UNRELEASE.value]:
raise ValueError("Not supported yet")
imap_data_access/cli.py:757
--manifest-fileis currently optional (defaulting to None), but_release_parseralways passes it through andio.release()then errors at runtime. Making it required in argparse will give users an immediate, standard CLI error message and help text.
type=str,
required=False,
metavar="PATH",
default=None,
help=(
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tech3371
merged commit Jul 24, 2026
4bc35de
into
IMAP-Science-Operations-Center:main
16 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Overview
cleaning up command for release to line up latest changes in
sds-..repo. Tested in dev that these changes works with that change.File changes
Testing