Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue/161: Fix bug where --subset flag fails with data subscriber #162

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]
### Fixed
- Fixed bug where --subset in combination with the subscriber caused errors
### Added

## [1.15.0]
Expand Down
7 changes: 0 additions & 7 deletions subscriber/podaac_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,6 @@ def validate(args):
'Please specify exactly one flag '
'from -dc, -dy, -dydoy, or -dymd')

if args.subset and args.search_cycles:
# Cycle+Subset are not supported, because Harmony does not
# currently accept Cycle.
raise ValueError(
'Error: Incompatible Parameters. You\'ve provided both cycles and subset, which is '
'not allowed. Please provide either cycles or subset separately, but not both.')

if args.subset and args.bbox:
bounds = list(map(float, args.bbox.split(',')))
if bounds[0] > bounds[2]:
Expand Down
7 changes: 7 additions & 0 deletions subscriber/podaac_data_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ def validate(args):
if None in [args.endDate, args.startDate] and args.search_cycles is None and args.granulename is None:
raise ValueError(
"Error parsing command line arguments: Both --start-date and --end-date must be specified") # noqa E50
if args.subset and args.search_cycles:
# Cycle+Subset are not supported, because Harmony does not
# currently accept Cycle.
raise ValueError(
'Error: Incompatible Parameters. You\'ve provided both cycles and subset, which is '
'not allowed. Please provide either cycles or subset separately, but not both.'
)


def create_parser():
Expand Down
Loading