Add features to command-line regions, and add pytest parameter IDs#562
Merged
Conversation
This change is primarily to add the ability to use X11-style geometry specifications (WIDTHxHEIGHT+XOFF+YOFF) to the command line's `--coordinates` flag. (This is to make it easier for me to copy/paste geometry from `xwininfo` and other tools while I do some other experiments.) We add the ability to use negative top and left to refer to offsets from the bottom and right. This is available with comma-style coordinates too. We also split `__main__.py:main` into multiple parts, to reduce complexity and function length, and improve testability. We add tests for the new functionality. Finally, we add ID strings to several pytest parameterizations. By default, pytest uses just the string value for the arguments. This can be hard to use: for instance, `True` or `False` doesn't give you as much useful information as `cuda` and `cpu` do (in one parameter of the PyTorch test). We add parameter ID strings to boolean and lambda parameters.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change is primarily to add the ability to use X11-style geometry specifications (WIDTHxHEIGHT+XOFF+YOFF) to the command line's
--coordinatesflag. (This is to make it easier for me to copy/paste geometry fromxwininfoand other tools while I do some other experiments.)We add the ability to use negative top and left to refer to offsets from the bottom and right. This is available with comma-style coordinates too.
We also split
__main__.py:maininto multiple parts, to reduce complexity and function length, and improve testability.We add tests for the new functionality.
Finally, we add ID strings to several pytest parameterizations. By default, pytest uses just the string value for the arguments. This can be hard to use: for instance,
TrueorFalsedoesn't give you as much useful information ascudaandcpudo (in one parameter of the PyTorch test). We add parameter ID strings to boolean and lambda parameters.Changes proposed in this PR
./check.shpassedAI assistance disclosure
(AI assistance was used.)