-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PyFITS as astropy.io.fits #102
Conversation
I have three test failures on MacOS 10.6 with Python 2.7:
|
My mild preference would be to integrate the config stuff before merging, if you think it won't take too long. |
Those look like the same tests that were failing before...somehow the |
I kind of debated myself on that...but maybe you're right. The precedent we Still need to do something about utility unification though...but that I |
@iguananaut: I've had similar issues with stderr capture under pytest, but the warning capture technique seems to work fine. I agree about utility unification after the merge. |
Just strange that capturing warnings from stderr works on Linux but not on OSX. Suggests that on OSX Python doesn't send warnings to stderr by default, though a quick test on bond (one of our OSX build machines) suggests otherwise. So I'm not sure what's going on there... |
Just for the record, the tests still fail, but with different errors:
(this is with Python 2.7) |
Interestingly, the same tests pass with Python 3.2 |
To add another data point: On my Fedora 16 machine at home, all tests pass on both Python 2 and 3, so we're still maybe seeing something OS-X-specific here. |
Also -- you maybe already know this -- there seems to be a bad interaction between |
In this case it seems like more warnings are popping out than expected. I'll have to try it out on OSX and see what warnings are actually being output. @mdboom I'll have to look into the _fix_dtype thing. I just need to make it more flexible. |
@iguananaut - here are the failures with the warnings printed to stdout:
|
Thanks for the debugging! Looks like it actually makes 3 |
All tests pass on Python 2.6, and 2.7 on MacOS 10.6.8. I still get one FITS failure and quite a few VO failures with Python 3.2. I don't seem to get the VO failures with the upstream master though. I'll email you the traceback (too long for pastebin). |
The issue seems to be caused by the fact that |
@astrofrog Sweet! Yeah, @mdboom pointed out the _fix_dtype thing to me. I've already fixed that in PyFITS and just need to merge it to astropy. What's the other FITS failure you're getting though? |
Nevermind, I see you sent me an e-mail. I'll have to look at it when I get back to work. |
All tests now pass on MacOS 10.7 with all supported Python and Numpy versions. |
Huzzah \o/ Thanks again @astrofrog for setting up that Jenkins build for this branch--very useful. |
Cool! Does that mean, pending a rebase, this is in principal ready to merged? I personally haven't looked at it too closely, but I'm curious if that means now we should? (at least for integration-with-astropy items - I certainly don't intend to review the entire code base :) |
@eteq I still need to add a handful of config options via the Astropy config system. There are also some environment variables, but I might leave them out for now. I was working on an environment variable patch for the config system a while back, but I got distracted and never got back to that branch... So I don't think I'll hold up fits over that. |
…s of documentation updates in the header-refactoring branch, so I will wait until those changes are merged into trunk before doing any more here.
…ent will continue here now, but the branch on PyFITS will make merges of changes from PyFITS easier I think...
…rk. Updated all imports so that it's at least possible to 'import astropy.io.fits' (though nothing works yet). Cleaned up various misc references to pyfits in documentation and such. Removed some pieces of deprecated functionality.
…ng collected (most still do not pass, however).
I think this is pretty much ready to go at this point. In the process of giving one last look over the code I stumbled over all the design issues in PyFITS that I still want to fix. But they certainly won't all get fixed immediately so there's no reason to hold up Astropy for them. Though I'll still be continually merging changes from PyFITS, I don't think there's any reason to hold off much longer on merging this. |
I can't review all the code (not sure if anyone can!) but from I can see, you've done a great job. I looked at the docs a bit, and one thing I think we might want to think about is whether we want to recommend common abbreviations for astropy components. For example, the following is a bit long to type:
but of course we could have 'standard' abbreviations (like numpy has with np), e.g.
I'm sure we can deal with that in a future pull request, but just wanted to raise the point for now. |
@astrofrog That's a good point, and something that's crossed my mind too.. I was thinking of adding something in the docs to the tune of "Standard practice is to import the fits module with |
@iguananaut I guess this applies to all components of Astropy, so maybe we should first merge this in, then we can decide on a consistent convention across packages. I like the idea of:
etc. |
@astrofrog @iguananaut - I agree that I like the way @astrofrog suggests for doing imports - it seems easier to read, somehow. @iguananaut - just so I understand what you meant in your earlier comment: you're saying that now all the configuration is via the astropy configuration system, and you're hoping to (post-merge) get the environment variable stuff working, or did you mean that you've left some stuff in this branch that still uses environment variables, and will switch that to the configuration system after the environment variable option is put in? |
A few docs-related comments:
|
@eteq Okay, I'm seeing all these warnings with build_sphinx too. No idea why. I had only tested it by running make in the docs directory manually, which works fine for me. I don't want to do anything with the History right now, since it will probably continue to be updated. I'll still be making changes in PyFITS and merging them into Astropy up through the first Astropy release, and probably beyond. It makes sense the way it is, since those changes will continue to originate from PyFITS at least for a while. And yes, astropy.css contains some custom styles that are used in the PyFITS docs as well. There's also some LaTeX bits that I might port over at some point. I haven't tried doing a ps build of the Astropy docs yet... |
I think the problem with the build_sphinx command is that the docs are looking for classes in the |
On the In #117 (comment) we had discussed modifying |
We might want to confirm that There's some tweaks in |
@mdboom The stuff in astropy.css shouldn't have any effect. I defined a custom class for a figure I wanted formatted in a certain way, and that class is only used by the fits docs. As for build_sphinx, running it out of the build/ dir would fix most of the problems. But it would still be necessary to amend |
We could just run Agreed on not changing the API docs -- I'm not sure how that problem is related -- or maybe I just haven't had enough caffeine today ;) |
@mdboom The API docs are a related problem, because if build AND build_sphinx are run as part of the same process, then by the time build_sphinx is run, the But running it in a subprocess, as you suggested, would solve that problem. Another possibility would be to have build_sphinx force a reimport of any astropy packages. |
@mdboom @iguananaut - Regarding changing the docs to use Regardless, +1 on the subprocess idea; it should do the trick and consistency with |
So is the plan to implement the change to the doc-building after this pull request is merged in? If so, is there anything else that needs addressing before we merge? |
Yeah I dunno--if we don't fix the docs first, merging this will break the docs. I don't really care too much right now given that it's only temporary. But that's just me. |
There are lots of oddities in the way |
Okay then. By the end of today I will do one last rebase on trunk, and then merge \o/ |
Sounds good! |
This is a huge merge! Good work, @iguananaut |
@eteq It actually seemed to break GitHub for a while. For at least an hour after the merge it wasn't properly displaying the source tree. I finally gave up and went home, but it seems to be fixed now. |
I'm going home for the day. Not feeling too great so I need to take care of myself. To the remaining Astropy visitors, I'm sorry I didn't get to say bye properly but it was good seeing you, and I'm sure I'll see you around. Erik |
Add PyFITS as astropy.io.fits
Remove unused imports
Add PyFITS as astropy.io.fits
I still need to rebase this on master and clean up a few things.
Also need to add support for the new config system--haven't decided whether to do that before or after merge.