-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Need to check the response for a column whose value has multiplicity > 1 (ie: an array).
See test_reader.py::test_parsing_columns()
-
MultiObj.b is an array element of type ivoa:real[2]
o for CONSTANT and LITERAL, this results in 'list of float', [ r1, r2 ]
o for COLUMN, this results in 'list of length 1 of MaskedColumn' -
MultiObj.a (scalar)
o LITERAL - float n/a v1
o CONSTANT - float n/a v1
o COLUMN - MaskedColumn(float) shape(2,) [r1v1, r2v1] -
MultiObj.b (array)
o LITERAL - list(float) len=2 [v1, v2]
o CONSTANT - list(float) len=2 [v1, v2]
o COLUMN - list(MaskedColumn(float)) len=1 <<< This doesn't look right
list[0] = MaskedColumn shape(2,2) [[r1v1, r1v2],[r2v1, r2v2]] -
Handled by: framework.VodmlDescriptor::select_return_value()
o this is the base class for Attribute, Reference, Composition
o current logic looks OK for Reference and Composition, but not Attribute
o probably want override in Attribute
Composition max = -1 for unbound (so if not making override, take into account)
rama/rama/reader/votable/tests/test_reader.py
Lines 136 to 147 in c1fc61a
| def test_parsing_columns( columns_file ): | |
| """ | |
| Test parsing of COLUMN elements | |
| <COLUMN dmtype ref > | |
| <OPTIONMAPPING> | |
| <OPTION>"string"</OPTION> | |
| <ENUMLITERAL>"vodml-id"</ENUMLITERAL> or <SEMANTICCONCEPT> | |
| </OPTIONMAPPING> | |
| </COLUMN> | |
| The parser pushes the Table rows into value arrays | |