These are chat archives for astropy/astropy

26th
May 2016
Michael Seifert
@MSeifert04
May 26 2016 00:15
@bsipocz My bad - that had another reason. I copied the future-imports and the license note from astropy files and they contained the innocent # TEST_UNICODE_LITERALS line. Which made the tests run twice.
Michael Seifert
@MSeifert04
May 26 2016 00:51
what is this line for? I tried google but I only found examples for docstring tests.
Adam Ginsburg
@keflavich
May 26 2016 06:25
@astrofrog (or others) - what is the most public method for getting the "plate scale" (1D size of a pixel) from a celestial WCS with square pixels?
alternatively, what is the best idiom for converting proj_plane_pixel_scales to a 1D value?
Thomas Robitaille
@astrofrog
May 26 2016 08:27
Maybe np.sqrt(proj_plane_pixel_area)?
Michael Seifert
@MSeifert04
May 26 2016 13:24
I noticed while scanning through #4556 that several targets for sphinx have moved for python3. Is there a recommended way of making the docstring contain the appropriate link if build_sphinx with python2 and with python3? I was thinking about using the astropy.utils.format_doc decorator and keeping a python2/3 dictionary with the appropriate links but that decorator is only avaiable for astropy 1.2 and using format in many places slows down the package import noticably, at least if it's used in several places.
Brigitta Sipocz
@bsipocz
May 26 2016 14:13
@MSeifert04 - TEST_UNICODE_LITERALS is a workaround to make sure the py2 runs works for both type of string objects
@MSeifert04 re #4556 - it will work together with the changes made in the helpers. The idea is that we move forward to have the default as py3, but provide an interpshinx for the problematic cases for py2 (and that is stored in the helpers). So building doc will work for both py3 and py2! (now it only does for py2)
I have no experience with utils.format_doc, sorry.
Michael Seifert
@MSeifert04
May 26 2016 14:24
@bsipocz should I open an issue in astropy-helpers if I find something that isn't included in these problematic cases?
for example collections.Mapping (py2) -> collections.abc.Mapping (py3)