Skip to content

Commit 71bfcb2

Browse files
committed
bump version
1 parent 36cbaad commit 71bfcb2

File tree

2 files changed

+50
-23
lines changed

2 files changed

+50
-23
lines changed

README.md

Lines changed: 49 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@ This README is always evolving, so do take a more comprehensive look from time t
3838
<!-- TOC -->
3939
* [alive-progress](#alive-progress)
4040
* [Table of contents](#table-of-contents)
41-
* [📌 What's new in 3.2 series](#-whats-new-in-32-series)
41+
* [📌 What's new in 3.3 series](#-whats-new-in-33-series)
4242
* [Previous releases](#previous-releases)
4343
* [Using `alive-progress`](#using-alive-progress)
4444
* [Get it](#get-it)
4545
* [Try it](#try-it)
4646
* [Awake it](#awake-it)
4747
* [Master it](#master-it)
48-
* [Displaying messages](#displaying-messages)
48+
* [The `bar` handler](#the-bar-handler)
4949
* [Auto-iterating](#auto-iterating)
5050
* [Modes of operation](#modes-of-operation)
5151
* [Auto and Unknown: Counter](#auto-and-unknown-counter)
5252
* [Manual: Percentage](#manual-percentage)
5353
* [Widgets available](#widgets-available)
54-
* [The different `bar()` handlers](#the-different-bar-handlers)
54+
* [The different `bar()` handler semantics](#the-different-bar-handler-semantics)
5555
* [Styles](#styles)
5656
* [Configuration](#configuration)
5757
* [Create your own animations](#create-your-own-animations)
@@ -73,7 +73,27 @@ This README is always evolving, so do take a more comprehensive look from time t
7373
* [License](#license)
7474
<!-- TOC -->
7575

76-
## 📌 What's new in 3.2 series
76+
## 📌 What's new in 3.3 series
77+
78+
The latest `alive-progress` release is finally here, and it brings some exciting improvements! 🎉
79+
80+
Here's a summary of the most notable changes:
81+
82+
- Now the final receipt is available in the alive_bar handle, even after the bar has finished!
83+
- This allows you to access the final receipt data and use it in your code, such as logging or displaying it in a custom way.
84+
- You can change the bar title and text even after it has finished, so you can update the final receipt with new information or context.
85+
- Included the elapsed time in the alive_bar handle, with full precision, so you can access the exact time it took to complete your processing.
86+
87+
Technical changes:
88+
89+
- Changed the `grapheme` dependency which was no longer maintained to `graphemeu`, which is a maintained fork of the original one.
90+
- Added `py.typed` in the distribution to satisfy mypy and other type checking tools.
91+
- Included Python 3.14 support (in CI for now).
92+
93+
### Previous releases
94+
95+
<details>
96+
<summary>New in 3.2 series</summary>
7797

7898
After about a year of reassuring stability, the new `alive-progress` has finally landed!
7999

@@ -90,7 +110,7 @@ And more!
90110
- Improved compatibility with Celery => it will just work within Celery tasks!
91111
- drop python 3.7 and 3.8, hello 3.12 and 3.13!
92112

93-
### Previous releases
113+
</details>
94114

95115
<details>
96116
<summary>New in 3.1 series</summary>
@@ -372,27 +392,33 @@ So, in a nutshell: retrieve the items as always, enter the `alive_bar` context m
372392

373393
### Master it
374394

375-
- `items` can be any iterable, like for example, a queryset;
376-
- the first argument of the `alive_bar` is the expected total, like `qs.count()` for querysets, `len(items)` for iterables with length, or even a static number;
377-
- the call `bar()` is what makes the bar go forward — you usually call it in every iteration, just after finishing an item;
378-
- if you call `bar()` too much (or too few at the end), the bar will graphically render that deviation from the expected `total`, making it very easy to notice overflows and underflows;
379-
- to retrieve the current bar count or percentage, call `bar.current`.
395+
- The `items` argument can be any iterable, like for example, a queryset.
396+
- The first argument of the `alive_bar` is the expected total, like `qs.count()` for querysets, `len(items)` for bounded iterables, or even some static number.
397+
- Calling `bar()` is what makes the bar go forward — you usually call it once in every iteration, just after finishing an item.
398+
- If you call `bar()` too much or too few, the bar will graphically render that deviation from the expected `total`, making it very easy to notice under and overflows.
399+
- The usual Python `print()` is automatically hooked, so you can effortlessly display messages tightly integrated with the current progress bar on display! It won't break the fast bar refreshes in any way and will even enrich your message! The bar nicely cleans up the line, prints the current bar position alongside your message, and continues refreshing right below it!
400+
- The standard Python `logging` framework is also automatically hooked and enriched, exactly like the `print()` above!
401+
- If you're using the `click` CLI lib, you can even use `click.echo()` to print styled text.
380402

381-
> You can get creative! Since the bar only goes forward when you call `bar()`, it is **independent of the loop**! So you can use it to monitor anything you want, like pending transactions, broken items, etc., or even call it more than once in the same iteration! So, in the end, you'll get to know how many of those "special" events there were, including their percentage relative to the total!
403+
![alive-progress printing messages](https://raw.githubusercontent.com/rsalmei/alive-progress/main/img/print-hook.gif)
382404

383-
## Displaying messages
405+
> You can get creative! Since the bar goes forward only when you call `bar()`, it is **independent of the loop** it is in! So you can use it to monitor unrelated things like pending transactions, broken items, etc., or even call it more than once in the same iteration! That way, you'll get to know how many of these "special" events there were, including their percentage relative to the total!
384406
385-
While inside an `alive_bar` context, you can effortlessly display messages tightly integrated with the current progress bar being displayed! It won't break in any way and will even enrich your message!
407+
Awesome right? And everything work the same both in real terminals and in Jupyter notebooks!
386408

387-
- the cool `bar.text('message')` and `bar.text = 'message'` set a situational message right within the bar, where you can display something about the current item or the phase the processing is in;
388-
- the (📌 new) dynamic title, which can be set right at the start, but also be changed anytime with `bar.title('Title')` and `bar.title = 'Title'` — mix with `title_length` to keep the bar from changing its length;
389-
- the usual Python `print()` statement, where `alive_bar` nicely cleans up the line, prints your message alongside the current bar position at the time, and continues the bar right below it;
390-
- the standard Python `logging` framework, including file outputs, is also enriched exactly like the previous one;
391-
- if you're using click CLI lib, you can even use `click.echo()` to print styled text.
409+
## The `bar` handler
392410

393-
Awesome right? And all of these work just the same in a terminal or in a Jupyter notebook!
411+
After a bar has finished (or even while running), you have a plethora of methods available to grab information about the bar, and to control it. Here are they:
394412

395-
![alive-progress printing messages](https://raw.githubusercontent.com/rsalmei/alive-progress/main/img/print-hook.gif)
413+
- `bar.text('message')` or `bar.text = 'message'`: set a situational message at the end of the bar, where you can display information about the current item or the phase the processing is in.
414+
- `bar.title('Title')` or `bar.title = 'Title'`: set a title at the beginning of the bar; can be set right when starting it or while it's running or even after finished to affect the receipt on demand — mix it with `title_length` config to keep the bar from changing its length while running.
415+
- `bar.current`: retrieve the current bar count or percentage — more details below on Modes of Operation.
416+
- `bar.monitor` returns the current monitor widget text, which is the current bar position formatted according to the current configuration.
417+
- `bar.eta`: returns the current ETA widget text, formatted according to the current configuration.
418+
- `bar.rate`: returns the current throughput widget text, formatted according to the current configuration.
419+
- `bar.elapsed`: returns the current elapsed time in seconds, with full precision.
420+
- `bar.receipt`: returns an on-demand receipt, which can be used however you want in your code, such as logging or displaying it in a custom way.
421+
- `bar.pause()`: pauses the bar without losing its state — more details below on the Pause Mechanism.
396422

397423
## Auto-iterating
398424

@@ -479,7 +505,7 @@ But it's actually simple to understand: you do not need to think about which mod
479505

480506
That's it! It will just work the best it can! 👏 \o/
481507

482-
### The different `bar()` handlers
508+
### The different `bar()` handler semantics
483509

484510
The `bar()` handlers support either relative or absolute semantics, depending on the mode:
485511

@@ -498,7 +524,7 @@ In any case, to retrieve the current counter/percentage, just call: `bar.current
498524
- in _auto_ and _unknown_ modes, this provides an **integer** — the actual internal counter;
499525
- in _manual_ mode, this provides a **float** in the interval [0, 1] — the last percentage set.
500526

501-
Finally, the `bar()` handler leverages the **auto** mode unique ability: just call `bar(skipped=True)` or `bar(N, skipped=True)` to use it. When `skipped` is set to=`True`, the associated item(s) are excluded from throughput calculations, preventing skipped items from inaccurately affecting the ETA.
527+
Finally, the `bar()` handler in **auto** mode leverages a unique ability: skip items! Just call `bar(skipped=True)` or `bar(10, skipped=True)` to exclude those items from the throughput calculations, and thus preventing them from inaccurately affecting the ETA.
502528

503529
---
504530
Maintaining an open source project is hard and time-consuming, and I've put much ❤️ and effort into this.
@@ -934,6 +960,7 @@ You can also set it system-wide using `config_handler`, so you don't need to pas
934960

935961
<br>Complete [here](https://github.com/rsalmei/alive-progress/blob/main/CHANGELOG.md).
936962

963+
- 3.3.0: new bar.receipt and bar.elapsed; allow changing bar title and text even after finished; use `graphemeu` dependency; add `py.typed`; include Python 3.14 support in CI
937964
- 3.2.0: print/logging hooks now support multithreading, rounded ETAs for long tasks, support for zero and negative bar increments, custom offset for enriched print/logging messages, improved compatibility with PyInstaller and Celery, drop 3.7 and 3.8, hello 3.12 and 3.13
938965
- 3.1.4: support spaces at the start and end of titles and units
939966
- 3.1.3: better error handling of invalid `alive_it` calls, detect nested uses of alive_progress and throw a clearer error message

alive_progress/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from .core.configuration import config_handler
22
from .core.progress import alive_bar, alive_it
33

4-
VERSION = (3, 2, 0)
4+
VERSION = (3, 3, 0)
55

66
__author__ = 'Rogério Sampaio de Almeida'
77
__email__ = '[email protected]'

0 commit comments

Comments
 (0)