click icon indicating copy to clipboard operation
click copied to clipboard

Add functionality to hide the progress bar Issue #2609

Open bhuffman-usgs opened this issue 1 year ago • 4 comments

  • 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

bhuffman-usgs avatar May 20 '24 22:05 bhuffman-usgs

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.

davidism avatar May 22 '24 22:05 davidism

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.

bhuffman-usgs avatar May 23 '24 19:05 bhuffman-usgs

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

davidism avatar May 23 '24 19:05 davidism

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.

bhuffman-usgs avatar May 24 '24 05:05 bhuffman-usgs