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

Add functionality to hide the progress bar Issue #2609 #2727

Merged
merged 14 commits into from
Nov 3, 2024

Conversation

bhuffman-usgs
Copy link
Contributor

@bhuffman-usgs bhuffman-usgs commented May 20, 2024

  • Added "hidden" argument to click.progressbar to allow users to hide the progressbar output
  • Added env to gitignore to match up with the CONTRIBUTING.rst directions
  • Added test to verify "hidden" argument is behaving

fixes #2609

@davidism davidism added this to the 8.2.0 milestone May 22, 2024
@davidism
Copy link
Member

davidism commented May 22, 2024

I know I was uncertain about this at the sprint, but after some thought I'm good with it.

Simon also mentioned in the issue that it might be possible to just set the self.is_hidden flag based on this parameter as well, rather than adding another attribute for it. Did you try out that option? If that works, let's use hidden as the parameter name.

@bhuffman-usgs
Copy link
Contributor Author

I've looked over the code related to the self.is_hidden property. Modifying that is likely the better way to go since it will still handle what to do with the self.file text stream. I'll make the needed changes. Also, should we change is_hidden to _is_hidden? It behaves like a property that's private to the object.

@davidism
Copy link
Member

Sounds good. If the attribute is not documented in the public documentation, then it can be renamed without a deprecation first.

@bhuffman-usgs
Copy link
Contributor Author

I ended up having issues for the test related to this feature and had to separate the logic for self.hidden and self._is_hidden. It's probably easier to follow anyway. Should be good to go.

@AndreasBackx AndreasBackx mentioned this pull request Oct 20, 2024
39 tasks
@AndreasBackx AndreasBackx merged commit fcd8503 into pallets:main Nov 3, 2024
12 checks passed
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.

progressbar(hide=True) option for hiding the progress bar
3 participants