InseeFrLab / pynsee

pynsee package contains tools to easily search and download french data from INSEE and IGN APIs
https://pynsee.readthedocs.io/en/latest/
MIT License
67 stars 9 forks source link

Improve handling of progress bars #152

Open tfardet opened 1 year ago

tfardet commented 1 year ago

At the moment, pynsee uses tqdm for progress bars. It's a very solid library that does the job perfectly but it does not interact well with... basically anything. So right now, any code or library using pynsee internally will have to accept having progress bars popping everywhere.

I think it would be nice to provide better options for handling them. I see to main options:

  1. the simpler option is to provide one global parameter to hide progress (setting disable=True to the tqdm object)
  2. switch to rich.progress, which, as far as I know, is the only library that supports nested progress bars; one would then have a global progress object that people could use to add other progress bars or simply disable them
hadrilec commented 1 year ago

fine for me, I would go for the simplest option so the first one, if anyone is willing to make a PR on this, he/she is welcome