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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add progress spinner animation during generation #2869

Merged
merged 1 commit into from
Apr 27, 2021
Merged

Add progress spinner animation during generation #2869

merged 1 commit into from
Apr 27, 2021

Conversation

justinmayer
Copy link
Member

I thought it would be nice to enhance Pelican's console output aesthetics via the Rich project, and adding an animated spinner during site generation is the most naive initial implementation I could conceive.

There are many other ways in which we could use Rich to enhance console output, including prettier text colors, nicer logging formatting, and more readable tracebacks.

I'd love to replace the Generating... spinner in this PR with per-task progress bars (generating, writing, etc.). If someone wants to submit a follow-up PR to implement that, I'd be most grateful! 馃殌

This is a first step at enriching console output via the `rich` project.
@justinmayer justinmayer requested a review from a team April 21, 2021 08:35
@Lucas-C
Copy link
Contributor

Lucas-C commented Apr 21, 2021

Interesting small aesthetics improvement! 馃槉

My humble feedback: is it worth pulling all those extra dependencies?
https://github.com/willmcgugan/rich/blob/master/pyproject.toml#L29

@MinchinWeb
Copy link
Contributor

My humble feedback: is it worth pulling all those extra dependencies?

colorama would likely be required for any simple effort to provide cross platform color CLI output. I'll let others comment on the rest.

Copy link
Member

@iKevinY iKevinY left a comment

Choose a reason for hiding this comment

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

LGTM; I might've had the same comment as @Lucas-C re: whether it's worth pulling in dependencies, but I do like a good terminal spinner. 馃槃

@avaris
Copy link
Member

avaris commented Apr 26, 2021

It has a considerably smaller footprint than I anticipated.

@justinmayer
Copy link
Member Author

My humble feedback: is it worth pulling all those extra dependencies?

Is it worth it, just to get an animated spinner, as provided by this very naive implementation? Probably not. But as I mentioned above, I think we could expand our Rich usage to a degree that would, in aggregate, be worth the extra dependencies. Besides, I don't think the extra dependencies really cost us very much, and if we later decide they aren't worth it, we can easily remove them.

I look forward to someone building on top of this effort to make the most of what Rich can offer us. 鉁

@justinmayer justinmayer merged commit fb9df68 into master Apr 27, 2021
@justinmayer justinmayer deleted the rich branch April 27, 2021 12:42
@MinchinWeb MinchinWeb mentioned this pull request Jul 1, 2021
2 tasks
@jvoisin
Copy link
Contributor

jvoisin commented Dec 26, 2021

In the wake of the log4j debacle, this is an interesting move :P

@justinmayer
Copy link
Member Author

justinmayer commented Dec 26, 2021 via email

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.

None yet

6 participants