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

Added some neat verbosity #5

Closed

Conversation

hydrophis-spiralis
Copy link

Neat tqdm progress bar instead of just print function. :)

@shreyasgm
Copy link
Member

Thanks so much for the PR!

This would definitely have been a neat addition, but tqdm still has some issues it needs to address before it's mature enough to be used in packages IMO. Examples - 1 and others described here.

Further, if you're using the package in Jupyter notebook, you'd have to explicitly import tqdm_notebook instead of tqdm for it to work. You could solve that using tqdm.autonotebook but then it doesn't work on JupyterLab in my experience. Do you know how other packages address these issues?

@hydrophis-spiralis
Copy link
Author

I use tqdm.tqdm for a quite a lot of time, aside of some issues In jupyter notebooks(similar to issue you linked) it works fine. Moreover, it seems to be best python package available, however, there is another progress bar package https://github.com/Erotemic/progiter which I have no experience with.
On tqdm.tqdm with Jupiter-notebook - it works and it outputs progress bar to standard output stream in text form. Maybe not so pretty as javascript generated by tqdm.tqdm_notebook, but it works.

@shreyasgm
Copy link
Member

I can imagine KeyboardInterrupts being common while using py-ecomplexity. tqdm prints on multiple lines on Jupyter notebooks after KeyboardInterrupts if you don't using tqdm_notebook explicitly (as explained here and here). I'll merge this if we can solve this issue using tqdm.autonotebook, while maintaining functionality for JupyterLab.

Also, verbose needs to be boolean, and the case for verbose=False needs to be handled.

@hydrophis-spiralis
Copy link
Author

I totally agree on tqdm issue.

As for verbose, lot of frameworks have verbosity as integer - it usually controls level of verbosity.

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.

None yet

2 participants