Repository navigation
Raise exception when fast_reader called with incompatible formats, guess all available fast formats - #5578
Conversation
|
Well, appears MSVC users had some of that functionality all along... |
|
What's the "Fast converter"? |
|
In the tests above, it's with the |
|
okay, then what is "io.ascii Fast-C"? Is this the same but with not-fortran-style exponents? |
|
No, with |
|
The notebook needed a couple of updates to get it to work with the current master: |
|
So, this PR has evolved beyond the original intend of just raising errors to fix test failures in parallel mode, is my interpretation correct? |
|
The original issues in #5574 were not specifically related to parallel mode, but more generally to requests of |
|
Not being familiar with the functionality myself, is it correct to assert this as an API change that effects released version? Just need to know for tagging and milestoning. Thanks! |
|
Not sure if it qualifies as an API change; whereas now |
Thanks for the clarifications! This sounds like a bug fix, so I'll tag is as so for now. Subpackage maintainer can re-tag as appropriate. |
|
Yes, I'd certainly label it as a bug fix (even where the results were not changed, in some instances it would silently fall back on the slower reader). Would still be interesting to know it it in fact solves #5693 as well, or if there is more work to do. |
|
@plim That is difficult since I have no direct access to the framework that produced the error -- it is run only on our |
|
Given the previous comment, I'm re-milestoning this to v1.3.2. |
|
@bsipocz, if I understood @olebole right, it is now merged into Debian |
Changed ValueError exception in check_column_names() and associated test to InconsistentTableError; changes in core.py may overlap with PR astropy#7425.
|
@taldcroft - It seems that I've managed to rebase, pushed the result to my fork to be sure that travis passes. (The diff be viewed here: https://github.com/astropy/astropy/compare/master...bsipocz:dhomeier_fortranexp2?expand=1, travis is running here: https://travis-ci.org/bsipocz/astropy/builds/377092449) If you're happy with it, I can force push it to this branch. |
|
Thanks @bsipocz; I assume the download failure in the coverage tests is unrelated. |
|
@dhomeier - Please add those commits to here. I can always cherry pick those commits, but would rather not force push the rebase without @taldcroft's approval. |
|
@bsipocz - thanks!! It looks like there are a few diffs that I don't entirely understand between your rebase and the last commit when you did the rebase (before the last two), i.e. However, these are all just trivial formatting / whitespace diffs so I am 👍 doing the force push, then cherry-picking the remaining commits. (And possibly doing a final clean-up to re-apply the format/whitespace diffs). |
|
@taldcroft - Indeed, those whitespace stuff were rebase remnants from an earlier commit. I've cleaned them up in the last cleanup commit. |
|
@taldcroft - yes, I think it's good to go. |
|
@taldcroft, seems I cannot view the current changeset after the forced push, but from my last commit and your cleanup everything looks good to me, too. |
|
🎉 Thanks @dhomeier for the contribution and your patience! |
|
Adding to the list, this really was a concentrated effort by all three of you, @dhomeier, @taldcroft, and @bsipocz. The PR would not have been finished in this form if any of you had not put in the large effort that you did to finish this. It's a testament to the complexity of our ascii reader classes that it needed that much effort, but thanks to you be can continue to improve the performance and consistency to make them even better. |
|
Thanks @taldcroft and @bsipocz for helping to get this PR into a mergeable state, this was indeed a task that had grown beyond my means! |


Test the updated exception handling in incompatible reader/fast_reader settings (see #5574) to check if they pass CI, and improve
guessstrategy to work with all supported formats of the fast reader.with
fast_readerexplicitly requested, options and formats not supported by same now raise aParameterErrorrather than silently falling back to a slow reader.for tables with a mismatches in the number of data columns the fast reader now raises an
InconsistentTableErrorjust like its Python counterpart, instead of aCParserError. A different return remains in case of fewer columns specified in the header, where the Python parser raises aValueError.where
fast_readeris enabled,guess=Trueshould now try all formats available in fast versions instead of only the first one (FastBasic) before falling back on the slow readers (iffast_readerhas been flagged as optional, i.e.fast_reader=True, but not'force'or a specific fast_readerdict).