From 13d0f33349d294c0ef09772996f90d16d752978d Mon Sep 17 00:00:00 2001 From: Hong-Kit Randy Yeung Date: Wed, 5 Mar 2025 17:49:27 -0600 Subject: [PATCH 1/9] add in small notificaiton on using `-gr` flag --- CHANGELOG.md | 2 ++ subscriber/podaac_data_downloader.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c77c016..bb39319 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added - Added error messages to inform user if .harmony file is formatted incorrectly or missing a key +- **PODAAC-6302 (issues/137)** + - Added small notification when `-gr` is being used but 0 granules are returned ## [1.15.2] ### Fixed diff --git a/subscriber/podaac_data_downloader.py b/subscriber/podaac_data_downloader.py index aff5956..ca3f005 100755 --- a/subscriber/podaac_data_downloader.py +++ b/subscriber/podaac_data_downloader.py @@ -315,6 +315,10 @@ def cmr_downloader(args, token, data_path): # Make this a non-verbose message # if args.verbose: logging.info("Found " + str(len(downloads)) + " total files to download") + + if granule is not None and len(downloads) == 0: + logging.info("** 0 granules found with -gr (granuleUR) flag; tried using wildcards (*/%)? **") + if download_limit: logging.info("Limiting downloads to " + str(args.limit) + " total files") From cac72b690380ce4d3111999768ba3b2e8a5de069 Mon Sep 17 00:00:00 2001 From: Hong-Kit Randy Yeung Date: Wed, 5 Mar 2025 18:03:23 -0600 Subject: [PATCH 2/9] adjust location of info --- subscriber/podaac_data_downloader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subscriber/podaac_data_downloader.py b/subscriber/podaac_data_downloader.py index ca3f005..65e96e8 100755 --- a/subscriber/podaac_data_downloader.py +++ b/subscriber/podaac_data_downloader.py @@ -280,6 +280,9 @@ def cmr_downloader(args, token, data_path): if args.verbose: logging.info(str(results['hits']) + " granules found for " + short_name) # noqa E501 + if granule is not None and results['hits'] == 0: + logging.info("** 0 granules found with -gr (granuleUR) flag; tried using wildcards (*/%)? **") + if any([args.dy, args.dydoy, args.dymd]): file_start_times = pa.parse_start_times(results) elif args.cycle: @@ -316,9 +319,6 @@ def cmr_downloader(args, token, data_path): # if args.verbose: logging.info("Found " + str(len(downloads)) + " total files to download") - if granule is not None and len(downloads) == 0: - logging.info("** 0 granules found with -gr (granuleUR) flag; tried using wildcards (*/%)? **") - if download_limit: logging.info("Limiting downloads to " + str(args.limit) + " total files") From 053c298f4e4e400387ec7db4a978516acb971ae2 Mon Sep 17 00:00:00 2001 From: Hong-Kit Randy Yeung Date: Wed, 5 Mar 2025 18:07:42 -0600 Subject: [PATCH 3/9] adjust spacing --- subscriber/podaac_data_downloader.py | 1 - 1 file changed, 1 deletion(-) diff --git a/subscriber/podaac_data_downloader.py b/subscriber/podaac_data_downloader.py index 65e96e8..25a32ab 100755 --- a/subscriber/podaac_data_downloader.py +++ b/subscriber/podaac_data_downloader.py @@ -318,7 +318,6 @@ def cmr_downloader(args, token, data_path): # Make this a non-verbose message # if args.verbose: logging.info("Found " + str(len(downloads)) + " total files to download") - if download_limit: logging.info("Limiting downloads to " + str(args.limit) + " total files") From cdb4f36024861aae6dd696011b602248148355d6 Mon Sep 17 00:00:00 2001 From: Hong-Kit Randy Yeung Date: Thu, 6 Mar 2025 10:37:21 -0600 Subject: [PATCH 4/9] update formatting and wording --- subscriber/podaac_data_downloader.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/subscriber/podaac_data_downloader.py b/subscriber/podaac_data_downloader.py index 25a32ab..974b1e5 100755 --- a/subscriber/podaac_data_downloader.py +++ b/subscriber/podaac_data_downloader.py @@ -280,8 +280,12 @@ def cmr_downloader(args, token, data_path): if args.verbose: logging.info(str(results['hits']) + " granules found for " + short_name) # noqa E501 - if granule is not None and results['hits'] == 0: - logging.info("** 0 granules found with -gr (granuleUR) flag; tried using wildcards (*/%)? **") + if granule is not None and results.get('hits', 0) == 0: + logging.info("** 0 granules found with -gr (granuleUR) flag. **") + logging.info("** If you expected granules to be found and downloaded, **") + logging.info("** please try using wildcards (*/%) in the -gr parameter. **") + logging.info("** -gr=\"*data*\" for multiple characters **") + logging.info("** -gr=\"_A%T_\" for a single character **") if any([args.dy, args.dydoy, args.dymd]): file_start_times = pa.parse_start_times(results) From c4e166402564c28549e0e3d5bc93c08353d852be Mon Sep 17 00:00:00 2001 From: Hong-Kit Randy Yeung Date: Thu, 6 Mar 2025 10:37:43 -0600 Subject: [PATCH 5/9] formatting --- subscriber/podaac_data_downloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subscriber/podaac_data_downloader.py b/subscriber/podaac_data_downloader.py index 974b1e5..c702fe2 100755 --- a/subscriber/podaac_data_downloader.py +++ b/subscriber/podaac_data_downloader.py @@ -284,8 +284,8 @@ def cmr_downloader(args, token, data_path): logging.info("** 0 granules found with -gr (granuleUR) flag. **") logging.info("** If you expected granules to be found and downloaded, **") logging.info("** please try using wildcards (*/%) in the -gr parameter. **") - logging.info("** -gr=\"*data*\" for multiple characters **") - logging.info("** -gr=\"_A%T_\" for a single character **") + logging.info("** -gr=\"*data*\" for multiple characters **") + logging.info("** -gr=\"_A%T_\" for a single character **") if any([args.dy, args.dydoy, args.dymd]): file_start_times = pa.parse_start_times(results) From ce06726aa4ee97d104fde9daf4e78e3ea3009bbd Mon Sep 17 00:00:00 2001 From: Hong-Kit Randy Yeung Date: Thu, 6 Mar 2025 10:38:59 -0600 Subject: [PATCH 6/9] formatting season 2 --- subscriber/podaac_data_downloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subscriber/podaac_data_downloader.py b/subscriber/podaac_data_downloader.py index c702fe2..7eb26e9 100755 --- a/subscriber/podaac_data_downloader.py +++ b/subscriber/podaac_data_downloader.py @@ -284,8 +284,8 @@ def cmr_downloader(args, token, data_path): logging.info("** 0 granules found with -gr (granuleUR) flag. **") logging.info("** If you expected granules to be found and downloaded, **") logging.info("** please try using wildcards (*/%) in the -gr parameter. **") - logging.info("** -gr=\"*data*\" for multiple characters **") - logging.info("** -gr=\"_A%T_\" for a single character **") + logging.info("** -gr=\"*data*\" for multiple characters **") + logging.info("** -gr=\"_A%T_\" for a single character **") if any([args.dy, args.dydoy, args.dymd]): file_start_times = pa.parse_start_times(results) From be1943ef5d2d72616910ab7119fc37350a66d6d4 Mon Sep 17 00:00:00 2001 From: mike-gangl Date: Wed, 12 Mar 2025 09:13:37 -0700 Subject: [PATCH 7/9] updated builds --- .github/workflows/python-app.yml | 2 +- CHANGELOG.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 52e8f59..fa9f07f 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false max-parallel: 2 matrix: - python-version: [ "3.7", "3.8", "3.9", "3.10" ] + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] poetry-version: [ "1.5.1" ] os: [ ubuntu-22.04, macos-latest, windows-latest ] runs-on: ${{ matrix.os }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dbb44f..c0a2998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added error messages to inform user if .harmony file is formatted incorrectly or missing a key - **PODAAC-6302 (issues/137)** - Added small notification when `-gr` is being used but 0 granules are returned +- Added python versions 3.11 and 3.12 to supported builds ### Fixed - **PODAAC-6303 (issues/167)** - Fixed issue where -gr and -sd/-ed (temporal) cannot be used together as a query +### Removed +- Removed python 3.7 from supported builds ## [1.15.2] From 43eb7efce0a0a1d8b100543a3c27ffac22a60941 Mon Sep 17 00:00:00 2001 From: mike-gangl Date: Wed, 12 Mar 2025 09:34:19 -0700 Subject: [PATCH 8/9] removed 3.12 because it requires a bit more refactoring --- .github/workflows/python-app.yml | 2 +- CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index fa9f07f..e675a56 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false max-parallel: 2 matrix: - python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.8", "3.9", "3.10", "3.11" ] poetry-version: [ "1.5.1" ] os: [ ubuntu-22.04, macos-latest, windows-latest ] runs-on: ${{ matrix.os }} diff --git a/CHANGELOG.md b/CHANGELOG.md index c0a2998..6b1200a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added error messages to inform user if .harmony file is formatted incorrectly or missing a key - **PODAAC-6302 (issues/137)** - Added small notification when `-gr` is being used but 0 granules are returned -- Added python versions 3.11 and 3.12 to supported builds +- Added python versions 3.11 to supported builds ### Fixed - **PODAAC-6303 (issues/167)** - Fixed issue where -gr and -sd/-ed (temporal) cannot be used together as a query From 714763371d04f6d75360ff221dad41f45454da07 Mon Sep 17 00:00:00 2001 From: mike-gangl Date: Thu, 13 Mar 2025 12:48:21 -0700 Subject: [PATCH 9/9] fixed auth versions --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index e675a56..a363e86 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -62,7 +62,7 @@ jobs: fail-fast: false max-parallel: 1 matrix: - python-version: [ "3.7", "3.8", "3.9", "3.10" ] + python-version: [ "3.8", "3.9", "3.10", "3.11" ] poetry-version: [ "1.5.1" ] os: [ ubuntu-22.04, macos-latest, windows-latest ] runs-on: ${{ matrix.os }}