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

Use {cli} progress bar #2641

Merged
merged 12 commits into from
Dec 3, 2024
Merged

Use {cli} progress bar #2641

merged 12 commits into from
Dec 3, 2024

Conversation

IndrajeetPatil
Copy link
Collaborator

@IndrajeetPatil IndrajeetPatil commented Aug 3, 2024

TODO:

R/lint.R Outdated Show resolved Hide resolved
@AshesITR
Copy link
Collaborator

AshesITR commented Aug 4, 2024

Re testing: Is there a way to hook into progress bar updates, or supply a "testing" progress bar to cli?

Otherwise this seems hard to properly and robustly test - especially the animation.

@MichaelChirico
Copy link
Collaborator

I don't see a need to test thing (formally/in testthat suite), besides ensuring it doesn't cause any error. We can rely on user reports of things "looking bad" IMO.

@IndrajeetPatil IndrajeetPatil marked this pull request as ready for review December 2, 2024 06:39
@IndrajeetPatil
Copy link
Collaborator Author

Technically, this is ready for a review.

The only thing I am unsure of is whether we should be using an experimental feature from {cli}. Yes, it's experimental for the last 3 years. Still, the changes are so minimal that, in a worst-case—albeit improbable—scenario of {cli} deprecating the feature, it'd be trivial to revert this commit and return to using {utils}.

@MichaelChirico
Copy link
Collaborator

MichaelChirico commented Dec 2, 2024

@gaborcsardi mind weighing in on the current lifecycle status of cli_progress_along()? "it's still experimental" is also fine, just want to be sure we're deciding on fully up-to-date info here. NVM, see below, sorry for the notification noise!

@IndrajeetPatil
Copy link
Collaborator Author

I had already confirmed this with Gabor:

r-lib/cli#709

@MichaelChirico
Copy link
Collaborator

Thanks, I missed the linked issue!

NEWS.md Outdated Show resolved Hide resolved
R/lint.R Outdated Show resolved Hide resolved
R/lint.R Outdated Show resolved Hide resolved
MichaelChirico
MichaelChirico previously approved these changes Dec 2, 2024
R/lint.R Outdated
} else {
lints <- lapply(
files,
function(file) {
Copy link
Collaborator Author

@IndrajeetPatil IndrajeetPatil Dec 2, 2024

Choose a reason for hiding this comment

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

Should I just nolint this?

It's catch-22 situation:

  • if I use anonymous function, it triggers unnecessary_lambda_linter() lint
  • if I don't, it leads to Error: The use of linters of class 'function' was deprecated in lintr version 3.0.0 error

Copy link
Collaborator

Choose a reason for hiding this comment

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

that's interesting! I don't understand why the error. Yes, mark for # nolint, but please tag it with a TODO+follow-up bug to dive deeper on that to see if there's some bug.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I decided to nolint it.

R/lint.R Outdated
} else {
lints <- lapply(
files,
function(file) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

that's interesting! I don't understand why the error. Yes, mark for # nolint, but please tag it with a TODO+follow-up bug to dive deeper on that to see if there's some bug.

@MichaelChirico
Copy link
Collaborator

Oops, just noticed my comment wound up in pending state and only got sent now! Sorry...

@IndrajeetPatil IndrajeetPatil merged commit 13c7682 into main Dec 3, 2024
19 checks passed
@IndrajeetPatil IndrajeetPatil deleted the f2599-cli-progress-bar branch December 3, 2024 08:23
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.

3 participants