-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Feature: Add progress bars #5692
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
base: master
Are you sure you want to change the base?
Conversation
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
Import operation partially implemented; still needs some work. Example screenshot above. |
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.
Copilot reviewed 24 out of 25 changed files in this pull request and generated 2 comments.
Files not reviewed (1)
- docs/changelog.rst: Language not supported
bc02408
to
c64e577
Compare
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.
Copilot reviewed 24 out of 25 changed files in this pull request and generated no comments.
Files not reviewed (1)
- docs/changelog.rst: Language not supported
Comments suppressed due to low confidence (1)
beetsplug/replaygain.py:1560
- Removal of the SystemExit and KeyboardInterrupt exception handling in the replaygain command may affect how user interruptions are managed. Please confirm that propagating these exceptions, rather than silencing them, is the intended behavior.
finally:
@snejus I'm not sure why the latest push is failing the automatic lint and formatting; it passes 'poetry run poe lint && poetry run poe format' on my machine just fine. Any suggestions? I've already sync'd my fork to beets master and rebased. |
This seems to be related to some combination of (although I'm not seeing the full picture yet)
Someone should probably open a new PR to fix all TC006 warnings, include I do get the same TC006 error if I locally run the system-installed ruff 0.11.0. |
7ab870e
to
f42279b
Compare
Is there a way to disable the progress bar? We’re running in a containerized environment without a cli UI, where all Just wanted to mention this here to spare us some trouble down the line. Do you see any other problems regarding this use case? |
It looks like this needs to replicate the check You might be best actually just using |
Great points, thank you. I'll add that condition as well. |
c698875
to
83155c0
Compare
This is now ready for review. I'm not certain how to request a review, though. Anybody have pointers? |
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.
Pull Request Overview
Copilot reviewed 20 out of 21 changed files in this pull request and generated 5 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
37ab9c0
to
3f46e56
Compare
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.
New security issues found
) | ||
try: | ||
output = check_output(cmd, stderr=STDOUT) | ||
output: bytes = check_output(cmd, stderr=STDOUT) |
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.
security (python.lang.security.audit.dangerous-subprocess-use-audit): Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.
Source: opengrep
Many long-running commands produce little or no feedback in the terminal to indicate that they're progressing, and none of them provide estimates of how long the operation will run. This change introduces the `enlighten` python package, which displays progress bars akin to TQDM below the existing terminal output. To support consistent use and presentation of the progress bars, and to allow for future modification, we introduce a method to beets.ui - beets.ui.iprogress_bar - which can be used by Beets' core commands and all Beets plugins. Example usage is provided in the methods' documentation and in a new 'further reading' doc for developers. The Enlighten library does not work as well in Windows PowerShell as it does in a linux terminal (manually tested in Zsh), so the progress bars are disabled in Windows environments. Resolving these issues and enabling them in Windows is left as future work. Progress Bars are disabled also when not in a TTY, to prevent interference with logging when running as a web server, for example.
Description
Many long-running commands produce little or no feedback in the terminal to indicate that they're progressing, and none of them provide estimates of how long the operation will run. This change introduces the
enlighten
python package, which displays progress bars akin to TQDM below the existing terminal output. This PR does not modify the import workflow, rather only modifies several built-in plugins. Modifying the import workflow to display a progress bar will be done in a follow-up PR.See tracking issue
To Do
docs/
to describe it.)docs/changelog.rst
to the bottom of one of the lists near the top of the document.)Example screenshot