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 showcase #458

Merged
merged 15 commits into from
Nov 20, 2023
Merged

Rich showcase #458

merged 15 commits into from
Nov 20, 2023

Conversation

profcalculus
Copy link
Contributor

Where to put new files:

  • New files should go into a top-level subfolder, named after the article slug. For example: my-awesome-article

How to merge your changes:

  1. Make sure the CI code style tests all pass (+ run the automatic code formatter if necessary).
  2. Find an RP Team member on Slack and ask them to review & approve your PR.
  3. Once the PR has one positive ("approved") review, GitHub lets you merge the PR.
  4. 🎉

profcalculus and others added 3 commits November 8, 2023 12:50
Source files and Jupyter notebook for the Rich showcase article.
Copy link
Contributor

@acsany acsany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @profcalculus,

thanks for providing the materials. I left you a few comments below.

Also, I was wondering if we really need the Jupyter notebook as a "replica" of the tutorial. But I leave this up to you 🙂

rich_showcase/README.md Outdated Show resolved Hide resolved
rich_showcase/README.md Outdated Show resolved Hide resolved
```console
(venv) $ python -m pip install requests
```
The code to perform the download is in get_rich_showcase_data.py. This demo code demonstrates a single request, which it then dumps to the screen; for a real-time application you would need to execute this request and process the data in a loop. The [CoinLore website](https://www.coinlore.com/cryptocurrency-data-api) doesn't impose rate limits, but they suggest making one request per second.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The code to perform the download is in get_rich_showcase_data.py. This demo code demonstrates a single request, which it then dumps to the screen; for a real-time application you would need to execute this request and process the data in a loop. The [CoinLore website](https://www.coinlore.com/cryptocurrency-data-api) doesn't impose rate limits, but they suggest making one request per second.
The code to perform the download is in `get_rich_showcase_data.py`. This demo code demonstrates a single request, which it then dumps to the screen; for a real-time application you would need to execute this request and process the data in a loop. The [CoinLore website](https://www.coinlore.com/cryptocurrency-data-api) doesn't impose rate limits, but they suggest making one request per second.

Comment on lines 11 to 13
time.sleep(10)
for _ in range(10):
print()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Suggested change
time.sleep(10)
for _ in range(10):
print()

from rich.table import Table
from rich.live import Live
from rich.console import Console
from rich_showcase_data import DEMO_DATA
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make it more clear, you could consider changing rich_showcase_data.py into a JSON file and import this one into a DEMO_DATA dictionary.

@profcalculus
Copy link
Contributor Author

Hi @acsany , I removed the .ipynb file and revised the table to read a JSON file as you suggested. Should be ready to go now?!

@gahjelle gahjelle merged commit 63235ed into master Nov 20, 2023
1 check passed
@gahjelle gahjelle deleted the rich_showcase branch November 20, 2023 14:10
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.

4 participants