An error occurred while fetching the assigned milestone of the selected merge_request.
bypass dimension check if dimensions are undefined
3 unresolved threads
3 unresolved threads
In https://issues.cern.ch/browse/INCA-7192 an extra characteristic was introduced in ValueDescriptor to indicate that dimensions are not known at the design level. In this case, row/column count in the descriptor default to 1.
When checking dimensions, pyJapc should honor this flag and bypass the check - otherwise it always asks for a dimension of 1.
CC @ahuschau as he saw it in his WS application.
Merge request reports
Activity
requested review from @isinkare
Hi @mihostet, thanks for the contribution! Can we get a unit test case for this?
added 1 commit
- 138312fa - Add failure test cases for array dimension check
added 1 commit
- fa5dcff1 - Add failure test cases for array dimension check
@mihostet, thanks. I've modified test cases to include failures. Please have a look. I'm happy to merge if you accept.
mentioned in commit ff9581e7
8 8 9 9 import jpype as jp 10 10 import numpy as np 11 import numpy.testing 107 106 assert r == jp.JClass("cern.japc.value.spi.value.simple.DoubleValue")(4.1) 108 107 109 108 109 @pytest.mark.parametrize("col,row,expect_failure", [ 110 (3, 1, False), 111 (1, 1, True), 112 ]) 113 def test_convert_py_to_val_w_simple_descriptor_array(japc, simple_descriptor, col, row, expect_failure): 114 value_descriptor = simple_descriptor( 115 jp.JClass("cern.japc.value.ValueType").DOUBLE_ARRAY) 116 value_descriptor.setColumnCount(col) 117 value_descriptor.setRowCount(row) 1315 1315 # of flags (of arbitrary length) which can be combined together. 1316 1316 return 1317 1317 1318 if simpleValueDesc.getExtraCharacteristic("UNDEFINED_COLUMN_COUNT") == "true":
Please register or sign in to reply