From c17944ece85cd825aa97e01efacc2d9c32154718 Mon Sep 17 00:00:00 2001 From: Stepheny Perez Date: Wed, 20 Mar 2024 09:44:02 -0700 Subject: [PATCH 1/3] Release/1.15.1 (#166) * initial implementaiton of subset code * added tests, more updates * removed skip_errors (not implemented yet) * Upgrade to harmony-py 0.4.9 * subsetting capability initial commit * update spacing * Update docs * update poetry lock * upgrade to poetry 1.5.1 (latest) * fix failing checksum test * fixed regression test issues * bump poetry version in second gh action file * Update poetry version to fix build issue * bump poetry version * bump poetry version * bump version to 1.15.0 * bump version to 1.15.0 * add unreleased section to changelog * issue/161: Fix bug where --subset flag fails with data subscriber (#162) * fix bug where the subset flag fails for subscriber * move arg validation to correct spot * bump version * bump version * Issue/164: Upgrade harmony-py to avoid 413 request entity too large issue (#165) * bump harmony-py version to 0.4.12 * /version 1.15.1-alpha.2 --------- Co-authored-by: mike-gangl --- CHANGELOG.md | 5 +++++ poetry.lock | 27 +++++++++++++-------------- pyproject.toml | 4 ++-- subscriber/podaac_access.py | 9 +-------- subscriber/podaac_data_downloader.py | 7 +++++++ 5 files changed, 28 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87a1a25..ccf9276 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## [1.15.1] +### Fixed +- Fixed bug where --subset in combination with the subscriber caused errors +### Added + ## [1.15.0] ### Added - Added support for Harmony subsetting diff --git a/poetry.lock b/poetry.lock index fd9315f..21bff98 100644 --- a/poetry.lock +++ b/poetry.lock @@ -152,25 +152,25 @@ pyflakes = ">=2.4.0,<2.5.0" [[package]] name = "harmony-py" -version = "0.4.9" +version = "0.4.12" description = "The NASA Harmony Python library" optional = false python-versions = ">=3.6, <4" files = [ - {file = "harmony-py-0.4.9.tar.gz", hash = "sha256:9e72d80029e2e1708ecd40c30a2498bbdcbf406d659da8073da29c5c64fd34cd"}, - {file = "harmony_py-0.4.9-py3-none-any.whl", hash = "sha256:a37d2226732c937c5599d5ba7e669aebc024a824bccef0cf8625346c340716b1"}, + {file = "harmony-py-0.4.12.tar.gz", hash = "sha256:735b1410306110e6a0e76c305db98730d0060389fdc9e8403d2e4b0049143355"}, + {file = "harmony_py-0.4.12-py3-none-any.whl", hash = "sha256:526405f0cec67a5545609e7ded56fc279b036ebd2cf08606b8e05fc5fc7f61ec"}, ] [package.dependencies] curlify = ">=2.2.1,<2.3.0" -progressbar2 = ">=3.55.0,<3.56.0" +progressbar2 = ">=4.2.0,<4.3.0" python-dateutil = ">=2.8.2,<2.9.0" python-dotenv = ">=0.20.0,<0.21.0" requests = ">=2.28,<3.0" sphinxcontrib-napoleon = ">=0.7,<1.0" [package.extras] -dev = ["PyYAML (>=5.4,<6.0)", "autopep8 (>=1.4,<2.0)", "camel-case-switcher (>=2.0,<3.0)", "coverage (>=5.4,<6.0)", "flake8 (>=3.8,<4.0)", "hypothesis (>=6.2,<7.0)", "importlib-metadata (<5.0)", "mypy (>=0.812,<1.0)", "nose (>=1.3,<2.0)", "pytest (>=6.2,<7.0)", "pytest-cov (>=2.11,<3.0)", "pytest-mock (>=3.5,<4.0)", "pytest-watch (>=4.2,<5.0)", "responses (>=0.12,<1.0)", "setuptools (>=54.2)", "sphinx (>=5.3.0,<5.4.0)", "wheel (>=0.36)"] +dev = ["PyYAML (>=6.0.1,<6.1.0)", "autopep8 (>=1.4,<2.0)", "camel-case-switcher (>=2.0,<3.0)", "coverage (>=5.4,<6.0)", "flake8 (>=3.8,<4.0)", "hypothesis (>=6.2,<7.0)", "importlib-metadata (<5.0)", "mypy (>=0.812,<1.0)", "nose (>=1.3,<2.0)", "pytest (>=6.2,<7.0)", "pytest-cov (>=2.11,<3.0)", "pytest-mock (>=3.5,<4.0)", "pytest-watch (>=4.2,<5.0)", "responses (>=0.12,<1.0)", "setuptools (>=54.2)", "sphinx (>=7.1.2,<7.2.0)", "wheel (>=0.36)"] [[package]] name = "idna" @@ -269,22 +269,21 @@ six = ">=1.5.2" [[package]] name = "progressbar2" -version = "3.55.0" +version = "4.2.0" description = "A Python Progressbar library to provide visual (yet text based) progress to long running operations." optional = false -python-versions = "*" +python-versions = ">=3.7.0" files = [ - {file = "progressbar2-3.55.0-py2.py3-none-any.whl", hash = "sha256:e98fee031da31ab9138fd8dd838ac80eafba82764eb75a43d25e3ca622f47d14"}, - {file = "progressbar2-3.55.0.tar.gz", hash = "sha256:86835d1f1a9317ab41aeb1da5e4184975e2306586839d66daf63067c102f8f04"}, + {file = "progressbar2-4.2.0-py2.py3-none-any.whl", hash = "sha256:1a8e201211f99a85df55f720b3b6da7fb5c8cdef56792c4547205be2de5ea606"}, + {file = "progressbar2-4.2.0.tar.gz", hash = "sha256:1393922fcb64598944ad457569fbeb4b3ac189ef50b5adb9cef3284e87e394ce"}, ] [package.dependencies] -python-utils = ">=2.3.0" -six = "*" +python-utils = ">=3.0.0" [package.extras] -docs = ["sphinx (>=1.7.4)"] -tests = ["flake8 (>=3.7.7)", "freezegun (>=0.3.11)", "pytest (>=4.6.9)", "pytest-cov (>=2.6.1)", "sphinx (>=1.8.5)"] +docs = ["sphinx (>=1.8.5)"] +tests = ["flake8 (>=3.7.7)", "freezegun (>=0.3.11)", "pytest (>=4.6.9)", "pytest-cov (>=2.6.1)", "pytest-mypy", "sphinx (>=1.8.5)"] [[package]] name = "pycodestyle" @@ -513,4 +512,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "3e86d63c7fceba752c5a9abd6a6d4e868d7f1875dd37cb45db7c4c7050630298" +content-hash = "134b9ae9f97c067afc9c98706b622285801c0690ea00ec371712797b756e5c24" diff --git a/pyproject.toml b/pyproject.toml index 47f56a4..0313175 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "podaac-data-subscriber" -version = "1.15.0" +version = "1.15.1-alpha.2" description = "PO.DAAC Data Subscriber Command Line Tool" authors = ["PO.DAAC "] readme = "README.md" @@ -16,7 +16,7 @@ python = "^3.7" requests = "^2.27.1" tenacity = "^8.0.1" packaging = "^23.0" -harmony-py = "^0.4.9" +harmony-py = "^0.4.12" [tool.poetry.dev-dependencies] pytest = "^7.1.2" diff --git a/subscriber/podaac_access.py b/subscriber/podaac_access.py index e69da75..bd83207 100644 --- a/subscriber/podaac_access.py +++ b/subscriber/podaac_access.py @@ -26,7 +26,7 @@ import tenacity from datetime import datetime -__version__ = "1.15.0" +__version__ = "1.15.1" extensions = ["\\.nc", "\\.h5", "\\.zip", "\\.tar.gz", "\\.tiff"] edl = "urs.earthdata.nasa.gov" cmr = "cmr.earthdata.nasa.gov" @@ -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]: diff --git a/subscriber/podaac_data_downloader.py b/subscriber/podaac_data_downloader.py index 08408ae..aff5956 100755 --- a/subscriber/podaac_data_downloader.py +++ b/subscriber/podaac_data_downloader.py @@ -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(): From 434630ab7f971d662ad4a7e48af65912f435d3fd Mon Sep 17 00:00:00 2001 From: skperez Date: Wed, 20 Mar 2024 09:45:07 -0700 Subject: [PATCH 2/3] bump version 1.15.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0313175..7fc0c7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "podaac-data-subscriber" -version = "1.15.1-alpha.2" +version = "1.15.1" description = "PO.DAAC Data Subscriber Command Line Tool" authors = ["PO.DAAC "] readme = "README.md" From 7c3895d973c0d9840476220aab7dc50ad526b130 Mon Sep 17 00:00:00 2001 From: skperez Date: Wed, 20 Mar 2024 10:55:33 -0700 Subject: [PATCH 3/3] bump version --- CHANGELOG.md | 2 +- pyproject.toml | 2 +- subscriber/podaac_access.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccf9276..9dd5b05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [1.15.1] +## [1.15.2] ### Fixed - Fixed bug where --subset in combination with the subscriber caused errors ### Added diff --git a/pyproject.toml b/pyproject.toml index 7fc0c7b..c9f38d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "podaac-data-subscriber" -version = "1.15.1" +version = "1.15.2" description = "PO.DAAC Data Subscriber Command Line Tool" authors = ["PO.DAAC "] readme = "README.md" diff --git a/subscriber/podaac_access.py b/subscriber/podaac_access.py index bd83207..a898569 100644 --- a/subscriber/podaac_access.py +++ b/subscriber/podaac_access.py @@ -26,7 +26,7 @@ import tenacity from datetime import datetime -__version__ = "1.15.1" +__version__ = "1.15.2" extensions = ["\\.nc", "\\.h5", "\\.zip", "\\.tar.gz", "\\.tiff"] edl = "urs.earthdata.nasa.gov" cmr = "cmr.earthdata.nasa.gov"