-
Notifications
You must be signed in to change notification settings - Fork 16
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 progress bar support for fetching and drawing HiPS tiles #105
Conversation
@cdeil The test fails with this error:
Do we have to manually specify the required packages on Travis CI? |
Yes, you have to add a new dependency like
One question I have is whether we should make this a required or optional dependency!? I think I would prefer if it's an optional dependency, but that would mean that the implementation has to be changed to remove the
and then use it like this:
I'm also worried a bit about adding complex stuff like progress bars without any tests that show that it works. But I think the complexity of testing the progress bar functionality is probably unreasonably high that we don't attempt this, but instead just test it ourselves and rely on users to report issues if there are any now or in the future as the code changes. |
@cdeil I have made |
@cdeil I made the changes. The tests are passing locally with the progress bar turned on. Let's see if Travis CI build passes. |
@adl1995 - See the fails on travis-ci. Can you fix or should I explain how? |
Okay, the test fails because it can't find the |
I only had a very quick look, but yes, I think you need updates to |
I added |
@@ -79,5 +79,6 @@ The ``hips`` package has the following requirements: | |||
In addition, the following packages are needed for optional functionality: | |||
|
|||
* `Matplotlib`_ 2.0 or later. Used for plotting in examples. | |||
* `tqdm`_ 4.15 or later. Used for showing progress bar either on terminal or in Jupyter notebook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the "4.15 or later" here. Probably any tqdm
version for years back will work with the basic functionality we use.
setup.py
Outdated
@@ -105,6 +105,7 @@ | |||
extras_require = dict( | |||
recommended=[ | |||
'matplotlib>=2.0', | |||
'tqdm>=4.15', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again: I would suggest to remove the version requirement on tqdm
here, because what we use is just simple functionality that probably has been there for a long time.
Thanks! |
Small follow-up commit in master: 3d06423 |
As mentioned in #80, I have added a progress bar support for fetching and drawing HiPS tiles. The progress bar is off by default, the result can be seen in this notebook: https://github.com/adl1995/HIPS-to-Py/blob/master/examples/Precise%20drawing-ICRS.ipynb
To achieve this, I had to make use of the
tqdm
module.