Skip to content

Add features to command-line regions, and add pytest parameter IDs#562

Merged
BoboTiG merged 1 commit into
BoboTiG:mainfrom
jholveck:xgeom
Jul 21, 2026
Merged

Add features to command-line regions, and add pytest parameter IDs#562
BoboTiG merged 1 commit into
BoboTiG:mainfrom
jholveck:xgeom

Conversation

@jholveck

Copy link
Copy Markdown
Contributor

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.

Changes proposed in this PR

  • Tests added/updated
  • Documentation updated
  • Changelog entry added
  • ./check.sh passed

AI assistance disclosure

  • No AI assistance was used to generate this contribution.
    (AI assistance was used.)

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.
@BoboTiG
BoboTiG merged commit 4a4f1d2 into BoboTiG:main Jul 21, 2026
35 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants