Modify "not ok" behavior
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
The purpose of raster-tester is to ask yes/no questions about raster data. If the answer is no, that's not an exception, it's just one of the possible expected outcomes. We should specify this behavior in more detail to standardize it.
The following is just a proposal, would love to get feedback/discussion before we start implementing.
If the answer to the question is **no**:
- the _function_ should return a tuple with boolean and a message like `(False, "These rasters are bad and they should feel bad")`
- the _click command_ should print the message (to stderr or stdout?), along with the rasters that were being evaluated, `not ok: a.tif vs b.tif (These rasters are bad and they should feel bad)`
- the _click command_ should exit with code 1
If the answer to the question is **yes**:
- the _function_ should return a tuple with boolean and a message like `(True, "These rasters are perfect in every way")`
- the _click command_ should print the message to stdout, along with the rasters that were being evaluated, `ok: a.tif vs b.tif (These rasters are perfect in every way)`
- the _click command_ should exit with code 0
cc @sgillies @dnomadb
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the existing raster-tester function and Click command, then trace how yes and no results are currently returned, printed, and converted to exit codes. The work is done when both outcomes return the specified boolean and message, the command prints the raster pair and status consistently, and exits with code 0 or 1 as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100