Closed hstravis closed 2 months ago
I tried dumping the output to a text file in the hopes that the width would be unconstrained. No luck. Still constrained to 80 chars. I'm guessing the rich console falls back to 80 when it can't detect the width of the console.
Good ideas! My initial guess about the commands was that poly check
would be the one used in a CI, and the other ones for developers using locally. But I understand the usefulness of running the other commands (and poly libs
in particular) too.
I'll think about this, maybe it would be useful for something like --ci
or the possibility to set the with as in your suggestions. Are there alterntives, such as setting the CI console width maybe? I found this thread about GitHub Actions: https://github.com/Textualize/rich/issues/2769#issuecomment-1399478088
Huge thanks for the sponsoring @hstravis ! 🙏 🤩
Huge thanks for the sponsoring @hstravis ! 🙏 🤩
Thanks for the hard work! The polylith plugin is excellent. Wish I could do more.
WARNING: Soapbox IMO, it is arguably a mistake to use python for large enterprise systems which are maintained by many people of various skill levels. The tooling isn't as good as other options...which is where the polylith plugin comes in. It helps teams do things "right" without adding significant overhead while helping teams avoid common pitfalls. I hope more teams adopt it and the community grows.
Good ideas! My initial guess about the commands was that
poly check
would be the one used in a CI, and the other ones for developers using locally. But I understand the usefulness of running the other commands (andpoly libs
in particular) too.I'll think about this, maybe it would be useful for something like
--ci
or the possibility to set the with as in your suggestions. Are there alterntives, such as setting the CI console width maybe? I found this thread about GitHub Actions: Textualize/rich#2769 (comment)
Setting the COLUMNS
environment variable in GitHub CI/CD jobs works! It changes the max width of tables so they are easier to read. Thanks!
For others, add something like this to your GitHub workflow YAML:
env:
COLUMNS: 160
(moving this one to the Discussions section)
Is your feature request related to a problem? Please describe. This is a nice-to-have. It is great for the output from the polylith plugin to be responsive when running in an interactive shell but the detected width is too constrained in GitHub CI/CD workflows. When
poetry poly libs
runs in GitHub CI/CD workflows, the width of the report is constrained to 80 characters. That makes the report difficult to read - particularly the table. Given that developers probably prefer to look at output from the CI/CD job instead of learning to run the command locally, it would be great if the report is easier to read.Also, there will eventually be around 14 projects in the repo so the table is just going to get wider and harder to read.
Describe the solution you'd like Add support for an environment variable such as
RICH_CONSOLE_MAX_WIDTH=120
that sets the console width explicitly instead of detecting it on the fly.Describe alternatives you've considered Dump the output to CSV so it can be viewed in something like Excel or rendered in other ways. That idea is really a separate feature request but it would be extremely useful.
Or add an arg to the
poetry poly libs
command that allows the max console width to be set explicitly. For examplepoetry poly libs --max-console-width 120
I see that the polylith plugin uses rich console. (Nice!) I sifted through the source for that to see if there's a way to set an environment variable or provide a config file to set the max width on it. I didn't find anything but maybe I missed it.
Additional context Here's an example of the output from a GitHub CI/CD job: