Connect astropy.io.ascii to astropy.table#359
Conversation
|
Actually, at the moment I have to add: at the top of my script to force the registrations to happen. I need to think about how to avoid that. If you have suggestions, let me know. Maybe |
|
I added an import to astropy.io.ascii.connect from astropy.table, which seems to do the trick. |
|
@astrofrog - looks great, please do continue with tests and docs! |
|
For that matter, though I haven't played with asciitables/astropy.io.ascii, could it be hooked up to read/process FITS ASCII tables? Once io.fits starts moving over to using the table class, using io.ascii for ASCII tables could also enable killing some duplicate logic, maybe. Just a thought, though one I haven't explored the details of yet. |
|
@taldcroft - I've added tests and docs. A couple of points/questions:
Anything else that you think is missing from this PR? |
There was a problem hiding this comment.
Is this a requirement for IPAC table files? From http://irsa.ipac.caltech.edu/applications/DDGEN/Doc/ipac_tbl.html it seems that any extension is considered valid. The .tbl extension could easily be used for other formats. Will these be issues if the is_ipac identifier is registered?
There was a problem hiding this comment.
IPAC table files often use .tbl, but I agree it's a bit generic. I can remove it.
I can't think of anything better at the moment.
Ultimately both methods are going to be useful, and users might have their own preferences in any case. It depends to some extent on whether users have simple cases where all the defaults work (use
I'm not sure I follow.
Looks good to me. |
|
@iguananaut - I'm not sure |
|
@taldcroft - regarding the 'duplication' in Regarding the guessing, what I meant was that astropy.io.ascii could tecnically register its complicated guessers with |
|
I think I've addressed all your comments above - thanks for reviewing this! |
|
I haven't looked too closely at this, but will the |
|
@eteq - I don't think it will, as |
|
Ok, that's what I figured - just wanted to check. |
|
@taldcroft - do you think this can merged as is, or should we clarify the docs further? |
There was a problem hiding this comment.
The Ipac class does not support writing, so this example won't work. Better to use Rdb perhaps.
(BTW I made this comment earlier but maybe forgot to actually hit the "Comment on this line" button. Sorry.)
|
After the one final comment above I think the docs are fine. On the general philosophy of For instance in |
|
@taldcroft - I agree, and I just want to add that I think one of the things about Anyway, do you think this is something we should clarify now, or should we just open an issue to remind us to improve the docs? |
|
By the way, I fixed the example in the docs. |
|
Just to add to what I said above - I guess that the high-level API that is useful is: because it saves a lot of typing and the user doesn't need to know about reader classes. On the other hand: is less useful unless it guesses the format, because then it would be just as easy to use |
|
@astrofrog - I think it's good to go. If you are ready then go ahead and merge. |
|
In the example |
|
Ok - but maybe in the docs (not necessarily in this PR) we could give a little more details about what to do when things go wrong when selecting |
Connect astropy.io.ascii to astropy.table
Connect astropy.io.ascii to astropy.table
Add subsection to Contribute page about justifying effort
Since astropy.io.ascii works natively with Table objects, it is straightforward to connect it to the I/O routines in astropy.table. This means it's easy to do:
etc.
@taldcroft, if you would be happy for this to go ahead, I can add docs and tests.