-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add support for cancelled jobs. #23
Open
contrains
wants to merge
190
commits into
prryplatypus:main
Choose a base branch
from
contrains:add-cancelled-job-status
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
190 commits
Select commit
Hold shift + click to select a range
e22b4c2
`exceptions.py`: Add `GoToStep` exception.
contrains c9912e5
`workflow.py`: `Workflow`: Modify to accept optional `label` argument…
contrains df53ac8
`workflow.py`: `Workflow._labels`: Store indices from `_steps` list r…
contrains 4de9c10
`job.py`: `get_input_value`: Refactor conditional logic in `get_input…
contrains a008530
Revert "`job.py`: `get_input_value`: Refactor conditional logic in `g…
contrains 6041591
`workflow.py`: `Workflow`: Require step labels to be string values.
contrains 05dab16
`workflow.py`: `Workflow`: Add `get_label_index` method to get list i…
contrains 087d33a
`workflow.py`: `Workflow`: Ensure label is unique before setting.
contrains acde2c8
`exceptions.py`: `GoToStep`: Allow passing step index or label.
contrains a226f1a
`exceptions.py`: `GoToStep`: Add `has_step` property. (Returns true …
contrains 425eb3f
`exceptions.py`: Add `GoToEnd` exception.
contrains 3aebb1a
`job.py`: `Job`: Add `mark_step_n_completed` method.
contrains f5e51d2
`job_runner.py`: Add handler for `GoToStep` exception.
contrains 7843d3e
`job_runner.py`: Add handler for `GoToEnd` exception.
contrains 0acc9ff
Add documentation for workflow step labels and `GoToStep` / `GoToEnd`…
contrains f587dd0
Add Ergeats logo.
contrains 8c2d799
Update README with Ergeats logo.
contrains 5a62309
Update README acknowledgements.
contrains c1ad0b3
Fixes for tox.
contrains ac5f3f9
`job_runner.py`: Add missing log output for `GoToEnd`.
contrains 88dbd27
`job_runner.py`: Use logging string substitution.
contrains 889ca37
Fixes for tox.
contrains fb1efe4
Update Ergeats logo.
contrains e615b73
`workflow.py`: `get_label_index`: raise KeyError on missing label.
contrains 387d77f
`workflow.py`: Add `@label` decorator method, split from `@step`.
contrains a46aa97
`workflow-step-labels.md`: Update with @workflow.label` decorator.
contrains 93aaf93
Fixes for tox.
contrains c384731
Add debug output code.
contrains c57184e
`workflow.py`: Modify `@label` decorator to (hopefully) work when pai…
contrains fb6e7ba
Add debug output code.
contrains 1c4b4ae
`workflow.py`: Modify `@label` decorator to (hopefully) work when pai…
contrains bf6323f
`job_runner.py`: Fix bug with calling `mark_step_n_completed` pertain…
contrains bda62a8
Add debug output code.
contrains ffa64b8
`workflow.py`: Refactor `label._decorate` function to only accept Wor…
contrains 9e58ae5
`workflow.py`: Remove debug code.
contrains 1e8eb6e
`job.py`: Add debug code.
contrains 09c2dd0
`job_runner.py`: Update log output for `GoToEnd` to show `retval`.
contrains 346aee1
`job_runner.py`: Update log output for `GoToStep` to show `retval`.
contrains e073151
`job.py`: Remove debug code.
contrains 90ba635
Fixes for tox.
contrains acf7d7e
`workflow-step-labels.md`: Update @workflow.label` decorator details …
contrains 420b9d2
`workflow.py`: `Workflow.label`: change `len(self._steps)` to `len(se…
contrains 207af0e
`exceptions.py`: `GoToStep`: add `next_step` property which returns i…
contrains b5f7c69
`workflow_step.py`: Add `WorkflowStep.paths` attribute containing a l…
contrains 0e4e3e8
`workflow.py`: Add `Workflow.paths` decorator which defines what exce…
contrains 408ba47
`workflow.py`: `Workflow`: Add `calculate_paths` method and supportin…
contrains 392603a
`job_runner.py`: Implement `Workflow.calculate_paths` into `JobRunner`.
contrains f394a28
`job.py`: Add and implement `Job.current_step` attribute, as distingu…
contrains 71012d2
`workflow.py`: Add debug code.
contrains bae01e7
`job_runner.py`: Add debug code.
contrains eb2c713
Fixes for tox.
contrains d7f7760
`job_runner.py`: Add missing second argument for `filter`.
contrains f8a6f25
Update debug output.
contrains a2fe13d
Update debug output.
contrains 862b311
Update debug output.
contrains e5a8f0f
`workflow.py`: `_calculate_paths`: Change operator for loop detection…
contrains c932edf
`job_runner.py`: Fix incorrect workflow plan step index.
contrains 96900e3
`workflow.py`: Fix incorrect reference to step plan index and exception.
contrains 0aa78d4
`workflow.py`: Minor reformatting.
contrains 503e01c
`workflow.py`: `_calculate_paths`: Update path list creation.
contrains 1ed7c07
`workflow.py`: `_calculate_paths`: Add current step to path if no chi…
contrains ef2f836
`workflow.py`: `_calculate_paths`: Update path list creation.
contrains 2a6aa08
`workflow.py`: `_calculate_paths`: Do not add current step to path wh…
contrains faf8ef3
`job_runner.py`: (Hopefully) fix logic with calculating workflow comp…
contrains ca2b65c
`job_runner.py`: Fix logic with calculating workflow completion perce…
contrains 36f89f5
Remove debug code.
contrains 74dc11d
`workflow.py`: Consolidate `@step`, `@label` and `@paths` decorators …
contrains 2b39e7f
Fixes for tox.
contrains bbb55cf
`workflow.py`: `@step`: If decorated function has type hints with a r…
contrains 7ea5a44
`workflow-step-labels.md`: Update documentation for `label` in `@step…
contrains f35e97c
`exceptions.py`: Modify `GoToStep` exception to take label or index i…
contrains 9b509b6
Add `workflow-step-paths.md` documentation. Update documentation for…
contrains 4cc2365
`workflow.py`: `step`: Use `types.NoneType` for comparison of return …
contrains 31b1266
`workflow-step-paths.md`: Update wording.
contrains e05bff2
`workflow.py`: Add debug output.
contrains 1015971
`workflow.py`: Add debug output.
contrains 3a819de
Add debug output.
contrains 6c781e0
`exceptions.py`: Fix bug in `GoToStep.label` method.
contrains 858e41c
`README`: Update acknowledgements.
contrains 68b66a2
Remove debug code.
contrains afa3d61
Update `README`
contrains 4f21914
`exceptions.py`: Split index and label again, with extra checks for m…
contrains d71b734
Fix type hints for mypy.
contrains 2be9254
Fix for tox.
contrains 8f66ec9
Refactor `idx` to `index`.
contrains b50b320
`workflow.py`: Add `@overload` definitions for `Workflow.step` decora…
contrains cf94ae7
`workflow.py`: Import `overloading.overload`.
contrains 627391d
`workflow.py`: Replace `overloading.overload` with `functools.singled…
contrains 68d44e6
`workflow.py`: Add `TypeAlias` type hinting.
contrains 65527c6
`workflow.py`: Rename `WorkflowPath` to `WorkflowPathTypeHint`.
contrains bff1ffc
`workflow.py`: Replace `functools.singledispatchmethod` with `typing.…
contrains d45418b
`workflow.py`: Add debug code.
contrains 2dd3c33
`workflow.py`: Update debug code.
contrains 36895e6
`workflow.py`: Remove debug code.
contrains 25156ed
Fixes for tox.
contrains 1ef2518
Remove Ergeats branding.
contrains 8537f36
`tox.ini`: show diff for formatting errors.
contrains 5124f60
`workflow.py`: Reformat for tox.
contrains 7afb6c9
Store `label` in `WorkflowStep`.
contrains 01b9ab6
Add debug code.
contrains 0ff7d53
Replace `label` with use of the functions defined name.
contrains 17b371a
Update documentation.
contrains 30313ae
`workflow.py`: `Workflow._find_next_step`: Invert ternary as fix for …
contrains 21a9181
Add debug output.
contrains a850441
`job_runner.py`: Fix bug with `GoToEnd` counting one too few total st…
contrains 0f85789
Update debug output.
contrains 49811c9
`job_runner.py`: Fix bug with `GoToEnd` counting one too few total st…
contrains 92e293c
Remove debug output.
contrains 17b079f
Merge pull request #1 from contrains/replace-labels-with-function-names
contrains 6e1e25a
Some changes cherry-picked from `add-path-hinting` branch.
contrains a576ebd
More changes cherry-picked from `add-path-hinting` branch.
contrains 18444cc
Some changes cherry-picked from `manual-step-ordering` branch.
contrains e368fc8
`__init__.py`: Sort `__all__`.
contrains b7e7e98
Fix whitespace.
contrains caa0b44
`job_runner.py`: Fix bug (hopefully) with calculating total steps whe…
contrains 7c31978
`job_runner.py`: Update debug code.
contrains c2dc930
`job_runner.py`: Fix off-by-1 bug in remaining/total steps counts for…
contrains 30e409c
`job_runner.py`: Update debug output.
contrains 74cb01f
`__init__.py`: Add missing exports.
contrains 06a4d0f
`job_runner.py`: Fix off-by-1 bug in remaining/total steps counts for…
contrains e01d79c
`job.py`: `Job.mark_n_steps_completed`: Fix bug with calculating curr…
contrains 447c2b4
`job.py`: `Job.mark_n_steps_completed`: Attempt 2: Fix bug with calcu…
contrains e0981d9
Remove debug output code.
contrains d2343c5
Reformat for tox.
contrains 305a183
Rewrite docs for manual step ordering and workflow path hints.
contrains c13e6ae
Revert "`tox.ini`: show diff for formatting errors."
contrains 2e363e7
Fixes in documentation.
contrains 572df7d
Fixes in docs.
contrains eaf944c
Remove leftover TODO.
contrains 374d11c
Rename `UnknownStepNameError` to `UnknownStepError`.
contrains ea16318
`workflow.py`: Add `get_step_index(WorkflowStep)` method.
contrains 3829159
Modify `GoToStep` to accept `WorkflowStep` rather than `int | str`. …
contrains 24499a1
Rename `Workflow.get_index_by_step_name` to `get_step_index_by_name`.
contrains 745226a
Eliminate `Workflow._step_names` dict. Although there is a performan…
contrains 1e40385
`job_runner.py`: Rearrange `GoToEnd` code.
contrains 243415d
`WorkflowStep`: Move definition of index to within object. Eliminate…
contrains 65b5568
`WorkflowStep`: Prepare list of path hints within class rather than e…
contrains 46ab4b1
`job_runner.py`: Fix bug for calculating remaining steps from `GoToSt…
contrains b87482b
`workflow.py`: Add debug output.
contrains ffad748
`job_runner.py`: Add debug output.
contrains 6fc0577
`workflow.py`: Do not call `._steps` directly when avoidable.
contrains 6a948bd
`workflow.py`: Update debug output.
contrains ed38baa
`workflow.py`: Calculate all paths once at startup rather than when r…
contrains 8ef4cf5
`workflow.py`: Calculate all paths at workflow registration using `re…
contrains 8d96b30
`workflow.py`: Update debug output.
contrains e1fce94
`job_runner.py`: Update debug output.
contrains f711d4d
Update documentation.
contrains 939f14c
Remove debug code.
contrains c32edd0
Remove debug code.
contrains 818c544
`workflow_step.py`: Reformat for tox.
contrains e9f30bd
`workflow_step.py`: Reformat for tox.
contrains f0f2c96
`workflow_step.py`: Reformat for tox.
contrains 581a2da
Merge pull request #3 from contrains/gotostep_accepts_steps_rather_th…
contrains 846f7d7
`workflow.py`: Revert variable name change.
contrains 26c9fa3
`workflow.py`: change `IndexError` to `UnknownStepError` in `Workflow…
contrains 646207f
`job_runner.py`: `_run_job`: Minor code rearrangement.
contrains 8c63d88
`workflow.py`: `_calculate_paths`: Minor code rearrangement.
contrains f50bc80
`exceptions.py`: `GoToStep`: Minor code rearrangement.
contrains ede4947
`job_runner.py`: Add whitespace.
contrains 0655a8f
`workflow.py`: Change `register()` method to not return the `Workflow…
contrains f7030eb
Add missing type hints.
contrains 15bc536
Update docs/docs/basics/defining-workflow-path-hints.md
contrains 72442dd
Update docs/docs/basics/defining-workflow-path-hints.md
contrains d4c320c
Update docs/docs/basics/defining-workflow-path-hints.md
contrains 34a6579
Update docs/docs/basics/manual-step-ordering.md
contrains f5266b9
Update docs/docs/basics/manual-step-ordering.md
contrains 535deb6
Update docs/docs/basics/manual-step-ordering.md
contrains b74c789
`defining-workflow-path-hints.md`: Remove unused import from example.
contrains 3b833f5
`workflow.py`: Rename `.register()` method to `.finalize()`.
contrains a1beeae
`tox.ini`: show diff for formatting errors.
contrains d97f2d0
`workflow.py`: Reformat for tox.
contrains c66165c
Revert "`tox.ini`: show diff for formatting errors."
contrains 7301d0e
Merge remote-tracking branch 'upstream/main' into main
contrains d46b194
Merge remote-tracking branch 'upstream/main' into main
contrains 3b78fa4
`job_status.py`: `JobStatus`: Add `CANCELLED` status.
contrains e134475
`jobs-overview.md`: Add `JobStatus.CANCELLED`.
contrains b83edb7
job.py`: `Job.should_be_requeued()`: Add `CANCELLED` status.
contrains 737268b
job.py`: `Job.should_be_requeued()`: Make method a class `@property`.
contrains bcfe5c7
`job_runner.py`: `JobRunner.run()`: Add guard clause ensuring jobs wh…
contrains 3d19ada
`job.py`: `Job`: sort class methods alphabetically.
contrains 38d18c5
`tox.ini`: show diff for formatting errors.
contrains 88c5dcb
`job.py`: `Job.should_be_requeued()`: Remove `@property` decorator.
contrains e07ada3
`job.py`: `Job.should_be_requeued()`: Alphabetise statuses.
contrains 6e985c3
`job_runner.py`: `run()`: Fix inverted logic.
contrains db829fa
`exceptions.py`: Add `CancelJob` exception.
contrains c4538fa
`job.py`: Add `Job.mark_cancelled()` method.
contrains 33ed863
`job_runner.py`: Catch and handle `CancelJob` exception.
contrains 03fd32d
`job_runner.py`: `JobRunner.run()`: Remove extra `job.should_be_reque…
contrains b2e21b1
Merge remote-tracking branch 'upstream/main' into add-cancelled-job-s…
contrains c3b4a07
`README`: Update caution regarding breaking changes.
contrains File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ class JobStatus(IntEnum): | |
COMPLETED = auto() | ||
FAILED = auto() | ||
ABORTED = auto() | ||
CANCELLED = auto() |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to undo this? :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet, anyway. ;) I was leaving it in until this issue was resolved: #23 (comment)
Do you have any thoughts about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to merge your PR with that since it does indeed appear unrelated. However I won't release until I get it fixed (possibly in a separate PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If my code subsequently is shown to have any issues once that is resolved, I'll plan to make a new PR to address them.