Skip to content
Snippets Groups Projects

bypass dimension check if dimensions are undefined

Merged Michi Hostettler requested to merge bypass-check-dims-for-undefined-dimensions into master
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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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)
    • I don't think this needs to be set - we have a 1d array so this will always be 1 (I don't know what happens if we don't set it, or if we set it to not 1 though).

    • Please register or sign in to reply
  • 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
    Loading