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

[Feature Request] Machine-readable progress outputs #11508

Closed
1 task done
joeyballentine opened this issue Oct 10, 2022 · 1 comment · Fixed by #12586
Closed
1 task done

[Feature Request] Machine-readable progress outputs #11508

joeyballentine opened this issue Oct 10, 2022 · 1 comment · Fixed by #12586
Labels
S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature

Comments

@joeyballentine
Copy link

What's the problem this feature will solve?

Reading pip's install progress when invoked via subprocess.

Currently, rich's progress bar support does not work in a subprocess. This means that any programmatic subprocess invocation of a pip install/uninstall cannot detect the current progress. Any kind of flag that could enable some sort of text-only output of download progress would be fantastic.

I had previously opened a similar issue, #11171, where I suggested allowing users to force rich's progress bar formatting. However, I currently believe just having an option for machine-readable output would be better.

Describe the solution you'd like

A flag that would output download and install progress in a way that is readable by parent processes. This can be done many ways, the easiest of which would probably just be by having a percentage or a fraction labeled with what action the percentage is for.

Alternative Solutions

Literally just anything that allows me to read the progress of a pip install. Right now in order to show progress for pip installs in my app, I have to parse the found wheel name, find the download URL from pypi's API, download the wheel file manually, then install it via pip. I would much rather just rely on pip's implementation, however it is not possible at the moment.

Additional context

Without being able to show download progress, large wheel files like PyTorch distributions (~3GB) can seem like they are stuck or unable to download. Showing the current progress (and that it is moving upwards) allows the user to see that something actually is happening.

This of course is built into pip thanks to rich's progress bar support. However, this is completely lost when running pip in a subprocess. Hence why I would really like this feature.

For more context, see #11171.

Code of Conduct

@joeyballentine joeyballentine added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Oct 10, 2022
@joeyballentine joeyballentine changed the title Machine-readable progress outputs [Feature Request] Machine-readable progress outputs Oct 14, 2022
@joeyballentine
Copy link
Author

Yay :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature
Projects
None yet
1 participant