Repository navigation
Add a 'test' command to setup.py - #30
Conversation
There was a problem hiding this comment.
I thought instances of AstroPy were recently changed to Astropy? @eteq will know better than me.
There was a problem hiding this comment.
All I'm aware of is that the name was changed from AstroPy to astropy in the package metadata. Other than that I thought it was still AstroPy...?
There was a problem hiding this comment.
I changed all the documentation references to "Astropy", on the theory that the proper name should be the package name (so the first letter is capitalized just because its a name). No one else voiced an opinion on the mailing list, so the path-of-least-resistance is probably to stick with "Astropy" unless someone has a strong opinion on the capitalization.
There was a problem hiding this comment.
I remember your e-mail but I don't remember that part of it--I thought it was just about changing the distribution name. In any case, I'm fine with that, and I'll put it back.
|
Works for me! Just made a couple of small comments in the source code, but once those are fixed it seems ready to me. |
There was a problem hiding this comment.
I was trying to write this myself, and noticed that in the distribute test command, they have a separate block of code to deal with use_2to3 option. Is this of concern to us?
There was a problem hiding this comment.
I'll have to take a look at that--does distribute's test command try to run the tests on 2to3'd code? If so, we'll want to support that functionality as well, at least eventually.
|
Using Python 3.2, I get the following error: |
|
@phn: I think I introduced this bug. I'll fix it in master (since it really exists there) and maybe @iguananaut can rebase this branch of it? |
|
This leads me to another question, and I forget whether or not this has been decided and documented anywhere: Are we officially supporting Python 3 currently? My thinking was that we were coding with Python 3 in mind (requiring Python 2.6 and using as many Py3-isms as possible) but not necessarily officially supporting Python 3 yet. If we are dedicating ourselves to Python 3 support now that's fine too. But I'll want to get astropy up and running with tox (with documentation on how to set that up) in order to facilitate cross-version testing. The only thing that makes this tricky is that tox uses pip to install dependencies when setting up its virtual environments. And numpy currently does not play well with pip (I've submitted patches to both numpy and pip to fix this issue since both are partially to blame, but those patches aren't available in any current release of those projects). |
|
I think we are going with Python 3.x compatibility now as much as possible (see http://astropy.org/development/codeguide.html#interface-and-dependencies). |
|
In that case I'll make sure this works on Python 3 before suggesting that it be pulled. |
|
After giving it a try, this is working fine currently on 3.2 (haven't tried 3.1). That is in part, of course, since none of the current code needs to be 2to3'd. I don't think that will be the case forever (vo.table, pyfits) so there still needs to be a solution for when we get to that point. But at least it works for now. |
|
This pull request now conflicts quite a bit from some of the recently merged changes... perhaps you should merge with the new master and then rebase? It's not obvious to me what the best solution for the merge conflicts is... |
|
Hrm, I haven't pulled from master in a while. I'll give it a look tomorrow. |
…ommand but it doesn't work with py.test, so this replaces it outright). This also supports all the existing options to astropy.test() such as module and verbose.
…extension modules had to be built/rebuilt.
|
Okay, I rebased this on master--seems good now. Sorry for all the whitespace changes--my editor is configured to strip extra whitespace from blank lines. |
|
Looks good to me! By the way, you can add ?w=0 to a github URL to hide whitespace diffs: https://github.com/astropy/astropy/pull/30/files?w=0 Useful! |
Add a 'test' command to setup.py
Fix smart resolver for descriptor classes
More fitsio tests
Adds a 'test' command to the setup.py (distribute comes with a test command but it doesn't work with py.test, so this replaces it outright). This also supports all the existing options to
astropy.test()such asmoduleandverbose.With this it's possible to run all the tests with just
setup.py testeven if astropy hasn't been installed or built yet. If necessary it will first build extension modules and make them importable.