Fix character array handling in VOTable parsing and serialization (issue #17098)#19974
Fix character array handling in VOTable parsing and serialization (issue #17098)#19974cosmoJFH wants to merge 2 commits into
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
5a36756 to
c4be280
Compare
7db2f89 to
d26fee6
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Hi @pllim, Yes, our intention is to fix #17098, as it is affecting the astroquery library, specifically the Euclid and Gaia modules (see astropy/astroquery#3599). Please note that this is my first contribution to Astropy, so I would greatly appreciate any feedback. Cheers, Jorge. |
27f5090 to
131bf83
Compare
This comment was marked as resolved.
This comment was marked as resolved.
ee2e746 to
bafd64e
Compare
|
Hi @pllim, Please find my point-by-point responses below.
The style changes were introduced automatically by PyCharm, which applies PEP 8 formatting rules. We can revert them if you would prefer to keep the existing style.
We believe having separate files makes it easier to test and validate the different scenarios. We developed new tests that read and parse VOTables in the BINARY2 format for the "unicodeChar" and "char data types. The following files correspond to fixed-length arrays (10x4): The following files correspond to variable-length arrays (10x*): The following files cover higher-dimensional arrays, including fixed-length arrays (10x4x2) and variable-length arrays (10x4x*): The following files are used by the new tests that read and parse regular VOTables (non-BINARY2 format) containing 1D string arrays: The final two VOTables contain 2D string arrays: We also added the parameterized test Our testing shows that t
Could you give us more details about this? Cheers, Jorge |
d15df54 to
3e32d1f
Compare
c879666 to
79eaad2
Compare
5146fe8 to
fb179ed
Compare
6130da8 to
cca17ec
Compare
25b1687 to
021ebdc
Compare
021ebdc to
2e41769
Compare
Fix handling of character array fields, fix #17098
The current implementation does not correctly handle certain character array cases during VOTable parsing and serialization, leading to inconsistent behavior and failures in the scenarios described in the issue. This PR updates the character array handling to correctly process these cases
The same underlying issue has also been observed downstream in astropy/astroquery#3599, (Gaia and Euclid).
VOTables produced for the Gaia and Euclid missions are generated using the STILTS library, which supports the creation of VOTables containing string arrays.
The following is an example that illustrates the issue:
Changes
We have included the following changes:
CharArrayandCharArrayVarArray, along with their Unicode counterparts (UnicodeCharArray,UnicodeCharArrayVarArray), to unify and simplify character array handling.We have added regression tests covering the cases described in #17098. We have also included new tests:
This is our first contribution to Astropy, so we would welcome any feedback on the implementation approach or on the test coverage.