BAMWelDX / weldx-widgets

This project provides widgets to perform common tasks using the weldx library
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

test failure in k3d visualization #108

Closed marscher closed 11 months ago

marscher commented 11 months ago

Some CS in test does not use coordinates, although all involved input CS, and data has units assigned.

_______________________________________ test_k3d_csm_vis _______________________________________
weldx_widgets/tests/test_k3d.py:30: in test_k3d_csm_vis
    plot = CoordinateSystemManagerVisualizerK3D(csm=csm)
weldx_widgets/visualization/csm_k3d.py:659: in __init__
    limits = self._get_limits()
weldx_widgets/visualization/csm_k3d.py:698: in _get_limits
    limits_trace = self._get_limits_trace()
weldx_widgets/visualization/csm_k3d.py:693: in _get_limits_trace
    limits = np.stack([lcs_vis.limits() for lcs_vis in self._lcs_vis.values()])
../../miniforge3/envs/wx/lib/python3.12/site-packages/pint/facets/numpy/quantity.py:64: in __array_function__
    return numpy_wrap("function", func, args, kwargs, types)
../../miniforge3/envs/wx/lib/python3.12/site-packages/pint/facets/numpy/numpy_func.py:953: in numpy_wrap
    return handled[name](*args, **kwargs)
../../miniforge3/envs/wx/lib/python3.12/site-packages/pint/facets/numpy/numpy_func.py:575: in _stack
    arrays, output_wrap = unwrap_and_wrap_consistent_units(*arrays)
../../miniforge3/envs/wx/lib/python3.12/site-packages/pint/facets/numpy/numpy_func.py:130: in unwrap_and_wrap_consistent_units
    args, _ = convert_to_consistent_units(*args, pre_calc_units=first_input_units)
../../miniforge3/envs/wx/lib/python3.12/site-packages/pint/facets/numpy/numpy_func.py:111: in convert_to_consistent_units
    tuple(convert_arg(arg, pre_calc_units=pre_calc_units) for arg in args),
../../miniforge3/envs/wx/lib/python3.12/site-packages/pint/facets/numpy/numpy_func.py:111: in <genexpr>
    tuple(convert_arg(arg, pre_calc_units=pre_calc_units) for arg in args),
../../miniforge3/envs/wx/lib/python3.12/site-packages/pint/facets/numpy/numpy_func.py:93: in convert_arg
    raise DimensionalityError("dimensionless", pre_calc_units)
E   pint.errors.DimensionalityError: Cannot convert from 'dimensionless' to 'mm'
CagtayFabry commented 11 months ago

found it: 8b5f6df

marscher commented 11 months ago

Still there was a requirement to filter the warning after the min/max reduction of the coordinates during the limit computation and reattaching the unit to the result. I wanted to test a recent pint version as it seems that this operation is supported upstream, but we have pinned pint for some reason in weldx.

marscher commented 11 months ago

The pip release of weldx does not pin pint, so we install version 0.23 on CI. The tests pass locally with version 0.20 installed.

CagtayFabry commented 11 months ago

Still there was a requirement to filter the warning after the min/max reduction of the coordinates during the limit computation and reattaching the unit to the result. I wanted to test a recent pint version as it seems that this operation is supported upstream, but we have pinned pint for some reason in weldx.

So the warning comes from pint 0.23? I can't find it in the CI run https://github.com/BAMWelDX/weldx-widgets/actions/runs/7172922883/job/19531144572

marscher commented 11 months ago

fixed by #107