Will McGugan
22bdafdd3e
optimizations
2020-09-18 11:37:37 +01:00
dependabot[bot]
96e23bdb7c
Bump pygments from 2.6.1 to 2.7.1
...
Bumps [pygments](https://github.com/pygments/pygments ) from 2.6.1 to 2.7.1.
- [Release notes](https://github.com/pygments/pygments/releases )
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES )
- [Commits](https://github.com/pygments/pygments/compare/2.6.1...2.7.1 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-09-18 05:33:34 +00:00
Will McGugan
a81c724dc2
optimizations fix text to tabs
2020-09-17 22:31:45 +01:00
oleksis
9df0f3aabd
Add README.es.md in Spanish/Español
2020-09-17 15:55:22 -04:00
Will McGugan
c6a220795e
syntax improvements
2020-09-17 20:43:09 +01:00
Dustin Rodrigues
a1a827540d
use poetry-core to build
2020-09-17 07:46:51 -04:00
Will McGugan
f01fa9cb6b
docs
2020-09-16 18:36:12 +01:00
Will McGugan
90763266c6
Syntax theme to use standard colors
2020-09-16 18:26:53 +01:00
Will McGugan
45ea1414a5
Merge pull request #286 from tomchristie/patch-1
...
Bump up the total number of `ProgressSample` items.
2020-09-16 16:27:13 +01:00
Will McGugan
51b74300cd
Merge pull request #285 from hedythedev/master
...
fix more spelling typos
2020-09-16 16:23:35 +01:00
Tom Christie
ecd7e51249
Bump up the total number of `ProgressSample` items.
...
When working with `rich` download progress bars with `httpx` we were finding the transfer speed jumping around all over the place.
For example, this snippet...
```python
import tempfile
import httpx
import rich.progress
with tempfile.NamedTemporaryFile() as download_file:
url = "https://speed.hetzner.de/100MB.bin "
with httpx.stream("GET", url) as response:
total = int(response.headers["Content-Length"])
with rich.progress.Progress(
"[progress.percentage]{task.percentage:>3.0f}%",
rich.progress.BarColumn(bar_width=None),
rich.progress.DownloadColumn(),
rich.progress.TransferSpeedColumn(),
) as progress:
download_task = progress.add_task("Download", total=total)
for chunk in response.iter_bytes():
download_file.write(chunk)
progress.update(download_task, completed=response.num_bytes_downloaded)
```
Was resulting in this...
...
Have now narrowed down the cause:
When calculating transfer speeds, `rich` stores a ProgressSample every time the progress is updated.
It then averages out the transfer speed based on the progress samples.
The maximum window size of samples that are used is currently set to 30 seconds, or 20 samples, whichever is smaller.
That "maximum of 20 samples" is actually pretty small. (For example reading chunks of 16KB at a download speed of 16MB/s will result in 1000 samples/second)
This PR changes that window size to be 30 seconds, or 1000 samples, whichever is smaller.
2020-09-16 15:47:34 +01:00
Hedy Li
53f910db64
format with black
2020-09-16 07:26:00 +00:00
Hedy Li
caad0d2fb3
fix more spelling
2020-09-16 07:20:22 +00:00
Hedy Li
a8a2e1d4b3
Merge remote
2020-09-16 07:10:39 +00:00
Will McGugan
a27a3ee20b
bump
2020-09-14 17:44:18 +01:00
Will McGugan
4c5040dfe2
Merge pull request #277 from willmcgugan/markdown-inline-code
...
inline code in Markdown
2020-09-14 17:42:40 +01:00
Will McGugan
d8665942d0
simplify highlight method
2020-09-14 11:30:10 +01:00
Hedy Li
d56ddd58c3
fix conflicts
2020-09-14 08:41:41 +00:00
Hedy Li
496d1ba463
fix typo
2020-09-14 08:40:15 +00:00
Will McGugan
f0868ccebe
optimize
2020-09-13 22:46:18 +01:00
Will McGugan
142c64ea62
simplify and optimize
2020-09-13 22:42:58 +01:00
Will McGugan
7b2d9bee75
simplify
2020-09-13 22:30:19 +01:00
Will McGugan
025fe68e56
docstring
2020-09-13 15:14:50 +01:00
Will McGugan
85e28f1641
rearragement
2020-09-13 15:12:37 +01:00
Will McGugan
6b6c7e2dd4
Merge pull request #278 from hedythedev/patch-2
...
fix spelling of 'anything' in console.py docstring
2020-09-13 14:56:01 +01:00
Hedy Li
ff98c229af
fix spelling of 'anything' in console.py docstring
2020-09-13 21:15:07 +08:00
Will McGugan
5ca3db6aa9
markdown renderer
2020-09-13 13:38:56 +01:00
Will McGugan
2dda2e80b2
docs
2020-09-13 13:16:55 +01:00
Will McGugan
d21823440f
formatting
2020-09-13 13:12:34 +01:00
Will McGugan
7593e4b271
test
2020-09-13 13:11:37 +01:00
Will McGugan
28c016a142
docstring
2020-09-13 13:08:27 +01:00
Will McGugan
c50751c774
inline code in Markdown
2020-09-13 12:57:45 +01:00
Will McGugan
857d8e0b6c
doc
2020-09-12 14:57:34 +01:00
Will McGugan
426e2098ca
docs
2020-09-12 14:56:08 +01:00
Will McGugan
8c0f42a4f8
docs
2020-09-12 14:49:28 +01:00
Will McGugan
dff14daea8
docs
2020-09-12 14:36:17 +01:00
Will McGugan
5db11e439e
docs and group example
2020-09-12 14:31:04 +01:00
Will McGugan
4351e7c251
Merge pull request #276 from timgates42/bugfix_typo_guaranteed
...
docs: Fix simple typo, garanteed -> guaranteed
2020-09-11 22:13:02 +01:00
Tim Gates
00b00e64f7
docs: Fix simple typo, garanteed -> guaranteed
...
There is a small typo in rich/_ratio.py.
Should read `guaranteed` rather than `garanteed`.
2020-09-12 06:58:19 +10:00
Will McGugan
70ee52b1d6
doc fix
2020-09-11 16:57:37 +01:00
Will McGugan
b391635ee4
docs and examples
2020-09-11 16:47:10 +01:00
Will McGugan
a424fafc56
style docs
2020-09-09 16:41:06 +01:00
Will McGugan
2341b22458
highlighters
2020-09-09 16:20:42 +01:00
Will McGugan
fcbc62429c
Merge branch 'master' of github.com:willmcgugan/rich
2020-09-09 13:47:31 +01:00
Will McGugan
455db4fe9a
added regex highlighter
2020-09-09 13:47:26 +01:00
Will McGugan
f17c711553
Merge pull request #273 from aklajnert/fix_url_detecting
...
Accept `#` sign in the URL.
2020-09-09 13:47:07 +01:00
Andrzej Klajnert
ec0c69c5c9
Accept `#` sign in the URL.
2020-09-09 14:02:01 +02:00
Will McGugan
1cdcd1ae69
restore def
2020-09-07 18:04:56 +01:00
Will McGugan
f1826276af
docs
2020-09-07 17:29:05 +01:00
Will McGugan
c3ee3b05d6
Merge pull request #270 from willmcgugan/inspect
...
Add rich.inspect
2020-09-07 17:07:17 +01:00