From 8bb239c6d3cd1c5729ca4afc6d0ee2b2e50cac5f Mon Sep 17 00:00:00 2001 From: Forrest Williams Date: Tue, 21 Nov 2023 13:33:57 -0600 Subject: [PATCH 1/2] update changelog and arg order --- CHANGELOG.md | 9 +++++++-- src/hyp3_sdk/jobs.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b75af2e..918b30d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,17 +6,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/) and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [3.2.0] +## [4.0.0] ### Added * The HyP3 SDK now explicitly supports Python 3.9-3.12 * Added `HyP3.submit_insar_isce_burst_job` and `HyP3.prepare_insar_isce_burst_job` methods for submitting InSAR ISCE burst jobs to HyP3. +* A `pending` method to the `Job` class. +* A `pending` argument to the `Batch.filter_jobs()` method. + +### Changed +* The order of the arguments for `Batch.filter_jobs()`. The new order is `succeeded, pending, running, failed, include_expired`. ### Removed * Support for Python 3.8 has been dropped. ### Fixed -* `running` status now only includes running jobs, and pending jobs have their status. +* The `running` method of the `Job` class now only returns `True` if job has status `RUNNING`. Jobs in the `PENDING` state now return `True` when calling the `pending` method of `Job`. ## [3.1.0] ### Added diff --git a/src/hyp3_sdk/jobs.py b/src/hyp3_sdk/jobs.py index 1c3135e..e2f6071 100644 --- a/src/hyp3_sdk/jobs.py +++ b/src/hyp3_sdk/jobs.py @@ -252,8 +252,8 @@ def any_expired(self) -> bool: def filter_jobs( self, succeeded: bool = True, - running: bool = True, pending: bool = True, + running: bool = True, failed: bool = False, include_expired: bool = True, ) -> 'Batch': From 551346e3935846818dc68a7629b5a611826bd36c Mon Sep 17 00:00:00 2001 From: Forrest Williams Date: Tue, 21 Nov 2023 15:58:26 -0600 Subject: [PATCH 2/2] switch order in docstring --- src/hyp3_sdk/jobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hyp3_sdk/jobs.py b/src/hyp3_sdk/jobs.py index e2f6071..c29541f 100644 --- a/src/hyp3_sdk/jobs.py +++ b/src/hyp3_sdk/jobs.py @@ -262,8 +262,8 @@ def filter_jobs( Args: succeeded: Include all succeeded jobs - running: Include all running jobs pending: Include all pending jobs + running: Include all running jobs failed: Include all failed jobs include_expired: Include expired jobs in the result