astropy/astropy — pull request #3173 by eteq (2014-12-02 19:51:06+00:00)
Title: ERFA wrapper tweaks

This contains a variety of changes I was planning to suggest as part of reviewing #3141 (but it got merged before I had a chance to suggest them).

The code approach itself is mostly unaltered, but a number of clean-up items:
* A lot of stuff in the docstrings was no longer correct following the split - I think I've got them all cleaned up. I think this is crucial, because clear docstrings are particularly important here given the rather convoluted nature of the code. In the process, this also makes the python docstrings more like the astropy format.
* Renamed ``cython_generator.py`` to ``erfa_generator.py``, because it's no longer just generating cython code
* Renamed ``erfa.py``/``erfa.pyx`` to ``core.py`` and ``core.pyx`` (which now compiles to ``_core``). The rational for that is that the name ``erfa.pyx`` only made sense when it was *everything* in the ``erfa`` package. Now that it's two different modules, the pure-python file is nominal ``astropy.erfa.erfa``, and double-naming like that leads to confusion. So I took a page from ``time`` (which has ``astropy.time.core`` as the main implementation file).
* I removed ``from __future__ import unicode_literals`` in ``erfa_generator.py``. This is deceptively important: with it in, the generated code has a bunch of ``u'foo'``-style string literals. These are currently not in master, because it apepars @jwoillez use python 3 to generate the code, which has a *different* output from using python 2 when ``unicode_literals`` is in force. This will be less important if we solve #3159, so if I end up rebasing, this could be removed.

Note that all the renaming means this will conflict with other ERFA PRs currently pending. Of special signficance is #3170/#3166 or similar work on auto-generating these files during build. It probably makes sense to wait for those, if they're coming soon, and rebase *this* on *those*, because that means I can expunge all of the changes to ``core.py`` and ``core.pyx``.

cc @jwoillez @astrofrog @mhvk @mdboom