Skip to content
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

📝 Reduce output of checks #364

Open
ckunki opened this issue Feb 28, 2025 · 2 comments
Open

📝 Reduce output of checks #364

ckunki opened this issue Feb 28, 2025 · 2 comments
Labels
feature Product feature

Comments

@ckunki
Copy link
Contributor

ckunki commented Feb 28, 2025

Currently, the PTB employs some tools for validating python projects, their code, linting, quality, coverage, formatting, type hints, imports etc.

Long List of Explicit Paths on the Command Line

When calling the tools, PTB usually puts the paths to all related files in a command line, which can be quite longish. It also raises the risk of potentially breaking a limitation regarding the maximum length of the command line.

I remember discussions in the past about the variants supported by the various tools and if I remember correctly, then the reason for using the explicit paths could have been that this was the biggest common denominator for all tools used by the PTB.

Verbose and Voluminous Output

Additionally, some of the tools create rather verbose outputs.

While this behavior might be OK within an automated CI build, it's quite inconvenient to read, study, manage and work on interactively, on the command line.

A particular case is isort that also prints success cases and by that clutters the output even more, see example in the AAF.

Proposal

The current ticket therefore proposes

  • Minimize length of command lines
  • Minimize output
  • Suppress Success Messages if possible
  • Offer to write longer output to log files for later inspection in interactive use cases, this could be the default?
  • Only print a summary to the (interactive) user
  • Summary should be clear and unambiguous
    • if possible, colorful and set the exit code correctly
    • name the log file if there is one, e.g. see full log in ....

If the task is too vague and the number of potentially affected tools too big or too heterogenous, then we can create dedicated tickets, each for one tool only.

@ckunki ckunki added the feature Product feature label Feb 28, 2025
@tkilias
Copy link
Collaborator

tkilias commented Feb 28, 2025

For isort there is a quit option.

https://pycqa.github.io/isort/docs/configuration/options.html#quiet

@ckunki
Copy link
Contributor Author

ckunki commented Mar 6, 2025

For isort there is a quiet option: https://pycqa.github.io/isort/docs/configuration/options.html#quiet

Removing CLI option -v is already helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Product feature
Projects
None yet
Development

No branches or pull requests

2 participants