Skip to content

Pywcs - #13

Merged
eteq merged 17 commits into
astropy:masterfrom
mdboom:pywcs
Oct 18, 2011
Merged

eteq merged 17 commits into
astropy:masterfrom
mdboom:pywcs

Conversation

@mdboom

@mdboom mdboom commented Oct 13, 2011

Copy link
Copy Markdown
Contributor

Initial import of pywcs as astropy.wcs.

This is ready for review, but probably not yet ready to commit.

What works:

  • everything in the new namespace
  • nose tests
  • documentation build

What is yet to be done:

  • convert the tests to py.test and include in whatever framework is yet to be developed
  • add the pywcs backward compatibility layer

@mdboom

mdboom commented Oct 14, 2011

Copy link
Copy Markdown
Contributor Author

Also -- the docstrings need to be converted to Numpydoc format.

@mdboom

mdboom commented Oct 17, 2011

Copy link
Copy Markdown
Contributor Author

This is now ready for merging. AFAIK, it meets all of the guidelines.

It does not work with Python 3.x (setup.py in master doesn't currently work, and I think that's better left fixing elsewhere).

I don't expect a full review -- I'm sure we'll find other problems over time.

However, of particular interest to @iguananaut and @eteq are the changes to the setup.py script. It walks the astropy tree looking for setup_package.py scripts and imports them. Then it looks for special functions within each that allow customizing C extensions, package_data and data_files. If you can think of a better way, let me know. It also checks for the existence of Numpy itself (rather than letting setuptools do it), since Numpy is needed during the astropy.wcs build -- if you don't check for it you get an ImportError on Numpy which isn't as helpful for the end user.

@embray

embray commented Oct 17, 2011

Copy link
Copy Markdown
Member

On the setup.py stuff: Looks fine to me, though it's already getting to the point where it would be worth moving parts of it into the setuputils module we discussed. I'd say go ahead and commit the changes now as is, and we can move stuff later (I'm thinking now maybe we should call it setup_helper.py for symmetry with version_helper.py).

@embray

embray commented Oct 17, 2011

Copy link
Copy Markdown
Member

Oh, I see you already created setuputils.py. That's fine then--just more things can go into it I think. And I'm still for renaming it to setup_helper (or helpers?).

Comment thread astropy/wcs/__init__.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could get rid of this if/else and just use the relative import statement.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes -- we can drop Python 2.5 support now.

@astrofrog

Copy link
Copy Markdown
Member

I have not reviewed all the code, but I installed it and ran astropy.test() and all the tests run fine.

The api.rst file still mentions the old testing framework (including nose). To run specifically the wcs tests, the preferred way is now:

import astropy
astropy.test('wcs')

Otherwise it looks good to me.

@astrofrog

Copy link
Copy Markdown
Member

Ok, I'm fine with this now! I'll let @eteq and/or @perrygreenfield review as well before we merge.

@eteq

eteq commented Oct 18, 2011

Copy link
Copy Markdown
Member

We may want to re-order how the documentation works, but that can be changed later when more of the documentation is in place. Also, when I run the docs, I see

/Users/erik/src/astropy/docs/wcs/references.rst

Should that worry me?

@astrofrog

Copy link
Copy Markdown
Member

I also get:

 checking consistency... [snip]/astropy/docs/wcs/references.rst:: WARNING: document isn't included in any toctree

It looks like references.rst is included in many files, but just not in the toctree. I think we can ignore this since it makes sense it's not included?

@mdboom

mdboom commented Oct 18, 2011

Copy link
Copy Markdown
Contributor Author

The "references.rst" not included in the doctree is annoying, but I can't find a better solution. "references.rst" contains a number of external hyperlinks that are referenced throughout the wcs documentation that are too cumbersome to repeat everywhere (they would be particularly annoying in docstrings). But there's not real "content" in references.rst. We could put these in the "conf.py" rst_epilog variable, I suppose, but I'm not a hugh fan of the modularity of that.

@eteq

eteq commented Oct 18, 2011

Copy link
Copy Markdown
Member

Hmm... I don't think it's a good idea to let warnings that we still know are "ok" slip into the doc build, because then people will start ignoring legitimate warnings that are because they mis-typed something (and its easy for sphinx to go crazy with warnings if you don't keep on top of it!). I don't know if there's a way to supress that warning? Alternatively, there's the rst_epilog feature in conf.py - we could put everything in a global reference file and load it from conf.py ... but I can do that separately if we judge that a good idea.

@eteq

eteq commented Oct 18, 2011

Copy link
Copy Markdown
Member

Oh, and I also prefer avoiding setuputils.py as a name to prevent confusion with the package by that name. setup_helpers.py seems fine.

@astrofrog

Copy link
Copy Markdown
Member

I figured out a solution for the warning. Just rename references.rst to references.txt and update the include statements appropriately.

I also agree with using the name setup_helpers.py instead of setuputils.py

@mdboom

mdboom commented Oct 18, 2011

Copy link
Copy Markdown
Contributor Author

Thanks for the solution (to rename references.rst to references.txt). I think that's a good one.

Also -- I will rename setuputils.py to setup_helpers.py.

@astrofrog

Copy link
Copy Markdown
Member

Looks good to me now.

@eteq

eteq commented Oct 18, 2011

Copy link
Copy Markdown
Member

Same here.

eteq added a commit that referenced this pull request Oct 18, 2011
@eteq
eteq merged commit 1a758b1 into astropy:master Oct 18, 2011
eteq referenced this pull request in eteq/astropy Oct 22, 2012
keflavich referenced this pull request in keflavich/astropy Oct 9, 2013
taldcroft referenced this pull request in taldcroft/astropy Apr 26, 2014
Implementation of representations' __repr__ and __str__
mwcraig pushed a commit to mwcraig/astropy that referenced this pull request Dec 17, 2014
Temporarily skip more failing ascii table io tests on Windows
embray referenced this pull request in embray/astropy Jan 23, 2015
Adding "hide prompt and output" feature for docs codeblocks
taldcroft added a commit that referenced this pull request Jan 6, 2016
Lazyproperty for cache / easier scale setting in __add__, __sub__
jeffjennings pushed a commit to jeffjennings/astropy that referenced this pull request Jul 2, 2025
added additional comments to css for tweaking mobile experience
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.

4 participants