Skip to content

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

Merged
AndreasBackx merged 14 commits into
pallets:mainfrom
bhuffman-usgs:hide-progressbar
Nov 3, 2024
Merged

Add functionality to hide the progress bar Issue #2609#2727
AndreasBackx merged 14 commits into
pallets:mainfrom
bhuffman-usgs:hide-progressbar

Conversation

@bhuffman-usgs

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

Copy link
Copy Markdown
Contributor
  • 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

davidism commented May 22, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
34 tasks
@AndreasBackx AndreasBackx merged commit fcd8503 into pallets:main Nov 3, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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