Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 25, 2024
1 parent c586e23 commit c494adc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/tqdm_publisher/_demos/_multiple_bars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
This demo shows how to use `tqdm_publisher` to forward progress updates from multiple `TQDMPublisher` instances to the browser.

## The Approach
This demo is nearly identical to the [single bar demo](../_single_bar/README.md), except that progress bars are managed through a scoped class definition.
This demo is nearly identical to the [single bar demo](../_single_bar/README.md), except that progress bars are managed through a scoped class definition.

This allows us to easily track a `request_id` passed when the client requests a new progress bar, associating each progress bar with a pre-populated element on the browser.
This allows us to easily track a `request_id` passed when the client requests a new progress bar, associating each progress bar with a pre-populated element on the browser.
2 changes: 1 addition & 1 deletion src/tqdm_publisher/_demos/_parallel_bars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This demo shows how to use a global `TQDMPublisher` instance to forward progress
## The Approach
In this demo, we track multipl, interdependent levels of progress updates by using a global `TQDMPublisher` instance to reflect the execution state of parallel `TQDMPublisher` instances.

Check failure on line 5 in src/tqdm_publisher/_demos/_parallel_bars/README.md

View workflow job for this annotation

GitHub Actions / Check for spelling errors

multipl ==> multiple, multiply

Similar to the [multiple bar demo](../_multiple_bars/README.md), a `request_id` is used to associate both the global and parallel progress bars with a specific group of elements on the browser. In particular, the ID of the global progress bar matches the `request_id`, allowing it to be distinguished from the lower-level progress bars.
Similar to the [multiple bar demo](../_multiple_bars/README.md), a `request_id` is used to associate both the global and parallel progress bars with a specific group of elements on the browser. In particular, the ID of the global progress bar matches the `request_id`, allowing it to be distinguished from the lower-level progress bars.

However, this approach also differs in many ways from the other demos:
1. Instead of a `websockets` server, we use a `flask` server to receive requests from the client and send updates back using the Server-Sent Events (SSE) protocol.
Expand Down
5 changes: 2 additions & 3 deletions src/tqdm_publisher/_demos/_single_bar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
This demo shows how to use `tqdm_publisher` to forward progress updates from a single `TQDMPublisher` instance to the browser.

## The Approach
We use `websockets` to establish a connection between the server and the client.
We use `websockets` to establish a connection between the server and the client.

A progress bar is pre-rendered on page load. When the client presses the Create Progress Bar button, the server forwards progress updates to the client using a `TQDMPublisher` instance spawned in a separate thread.
A progress bar is pre-rendered on page load. When the client presses the Create Progress Bar button, the server forwards progress updates to the client using a `TQDMPublisher` instance spawned in a separate thread.

The Create button is disabled until the progress bar is finished to avoid associating updates from multiple progress bars with their respective elements.

0 comments on commit c494adc

Please sign in to comment.