astroplan
astroplan copied to clipboard
plot_sky function relies on deprecated matplotlib keyword
Using plot_sky
with MPL>=3 results in an error due to some deprecated behavior. Even for MPL versions prior to that, it gives a warning. Just a heads up.
This is for MPL 2.2.2:
from astroplan.plots import plot_sky, plot_airmass
plot_sky(target, iaohanle, midnight_iao)
/Users/chummels/src/yt-conda/lib/python3.6/site-packages/matplotlib/cbook/deprecation.py:107: MatplotlibDeprecationWarning: The frac parameter was deprecated in version 2.1. Use tick padding via Axes.tick_params instead.
warnings.warn(message, mplDeprecation, stacklevel=1)
This creates an error with the stable version of matplotlib (3.0.2). Could someone fix this pretty please? Thanks in advance...
@rlaugier - pull requests are welcome!
It appears that the change was already made by @lpsinger in commit 3ef76fcb on Dec 3, 2018. However, that version is not in the PyPI release, so anyone who pip installs this won't get the current, fixed version. It seems like the options for this are to either directly clone the github repository, make the commit described above in your own local version, or wait for a new PyPI version to be released.
@bsipocz any word on when a new version of this repo will be uploaded to PyPI?
Despite this bug being fixed in the dev version of the code, I think we should leave this issue open until the bugfix gets pushed to PyPI, otherwise more people may encounter it and come here looking for answers.
@chummels - I don't have the power here to make releases, that's a question for @bmorris3.
In the meantime the dev version can be installed with pip install --upgrade https://github.com/astropy/astroplan/archive/master.zip
, I feel that's the most sensible workaround.
Yeah, that's pretty sensible. The reason I'm asking about a new PyPI version is that I'm assembling a bunch of notebooks for an international school on time-domain astro for the GROWTH project, and trying to get a bunch of dependencies installed as simple pip
installed packages for it. Just wanted to have a long-term solution rather than always requiring the students to install the dev version. But no big deal. Just curious on timescales of PyPI deployment is all. Any word, @bmorris3 ?
@chummels - Looking at the cron test failures, I would assume any release here would take a few hours to days of maintenance work beforehand, as there are some other incompatibilities coming up to the surface recently.
and trying to get a bunch of dependencies installed as simple
pip
installed packages for it.
@chummels You can specify the github development version as a source in your requirements file and the students shouldn't know the difference. pip docs here.
and trying to get a bunch of dependencies installed as simple
pip
installed packages for it.
@chummels You can specify the github development version as a source in your requirements file and the students shouldn't know the difference. pip docs here.
I agree that he could do that, but pedagogically it may not be the perfect solution :(
When is this school happening?
Yeah, I realize I could put the github dev version in the requirements file, but it isn't so much a package that we're having the students install, but just a series of notebooks. The school occurred in December, and now we're tasked with just making modular versions of the lessons/notebooks online so everyone can install and go through them. I'll make it work by having them pull directly from the dev version--was just trying to make things as simple as possible. :) Thanks for all the info!
If it happened in the past I would suggest to pin the versions for all the packages, e.g. here you could use a mpl version that worked during the school. Otherwise that workflow and the static notebooks will inevitably break at some point.
Good call.
It looks like this is sorted out. Please reopen if I'm wrong!