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
Improve the formatting of the preamble #1352
Conversation
ANSI 'gray' ( |
Github actions on web appears to forget the current ANSI color on newline. I'll need to refresh the color on each newline. |
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.
Looks nice, a few minor nit picks / comments that you can ignore or address at your discretion. :)
Github Actions forgets the current ANSI style on every new line. This | ||
function repeats the current ANSI style on every new line. |
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.
This is weird - though I see how it could happen, GH does a lot of optimization for logs. Is there a GH ticket or commend anywhere? I've not generally noticed GH breaking elsewhere with color, but maybe most things like compilers and pytest do per-line coloring too.
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.
There is not. I should raise an issue somewhere. Not sure where though. Maybe I'll just raise it at actions/runner and see what they say.
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.
Raised an issue here: https://github.com/orgs/community/discussions/40864
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
The preamble has been getting a bit scruffy lately, this tidies it up.
repr
str
rather thanrepr
for other objects, makes e.g. Paths easier to readSimple example
Here I'm setting
CIBW_ENVIRONMENT="a=1 b=2" CIBW_PLATFORM=linux
Before
After
more complicated example
This example has a pyproject.toml:
Before
After
At a code level, worth noting is that the Options object is passed in an
environ
object, rather than reading it fromos.environ
. This allows us to construct a 'default' Options object to compare with. Also, it requires less monkey-patching to test, which is nice.