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

Rich progress bars. #1324

Merged

Conversation

isidentical
Copy link
Contributor

@isidentical isidentical commented Mar 14, 2022

This PR moves our own progress bar system to rich. More specifically, we now have 3 different progress bars internally (all powered by rich):

  1. The regular progress bar. It is used for the most of scenerios.
    asciicast

  2. A 'status' object, to be used when the total size (e.g Content-Length) is missing from the pre-request. This is a distinct object, since rich does not support progress bars whom total size is unknown.
    asciicast

  3. A dummy progress bar, to be used at tests.

Since we have 3 of them, I created a unified interface so that in the code (under DownloadStatus) we don't need to manually handle each object. The unified interface has start()/update()/stop() which seem to be sufficient for all tasks.

@isidentical isidentical merged commit 3f1d9dd into httpie:feature/ui-enhancements Mar 14, 2022
isidentical added a commit that referenced this pull request Apr 4, 2022
jkbrzt pushed a commit that referenced this pull request Apr 14, 2022
* Refactor tests to use a text-based standard output. (#1318)

* Implement new style `--help` (#1316)

* Implement man page generation (#1317)

* Implement rich progress bars. (#1324)

* Man page deployment & isolation. (#1325)

* Remove all unsorted usages in the CLI docs

* Implement isolated mode for man page generation

* Add a CI job for autogenerated files

* Distribute man pages through PyPI

* Pin the date for man pages. (#1326)

* Hide suppressed arguments from --help/man pages (#1329)

* Change download spinner to line (#1328)

* Regenerate autogenerated files when pushed against to master. (#1339)

* Highlight options (#1340)

* Additional man page enhancements (#1341)

* Group options by the parent category & highlight -o/--o

* Display (and underline) the METAVAR on man pages.

* Make help message processing more robust (#1342)

* Inherit `help` from `short_help`

* Don't mirror short_help directly.

* Fixup the serialization

* Use `pager` and `man` on `--manual` when applicable (#1343)

* Run `man $program` on --manual

* Page the output of `--manual` for systems that lack man pages

* Improvements over progress bars (separate bar, status line, etc.) (#1346)

* Redesign the --help layout.

* Make our usage of rich compatible with 9.10.0

* Add `HTTPIE_NO_MAN_PAGES`

* Make tests also patch os.get_terminal_size

* Generate CLI spec from HTTPie & Man Page Hook (#1354)

* Generate CLI spec from HTTPie & add man page hook

* Use the full command space for the option headers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant