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.
Describe your changes
Deepsource identified 29 occurrences of "inconsistent return statements," where functions lacked an explicit "return None" when conditions weren't satisfied. This pull attempts to fix 27 of these, all within the file plantcv/plantcv/spectral_index/spectral_index.py wherein all functions previously terminated in a fatal_error(). I changed all the fatal_error() calls to warn() calls instead and added a "return None" line, which serves to allow workflows to continue calculating other metrics even if the requirements for one are not met.
This required also changing the associated bad input tests to an "assert ... is None," rather than a RuntimeError.
Type of update
Deepsource fix with some changes in what's allowed within a workflow.
Associated issues
N/A
Additional context
N/A
For the reviewer
See this page for instructions on how to review the pull request.
plantcv/mkdocs.yml
updating.md