bluesky / hklpy

Diffractometer computation library with ophyd pseudopositioner support
https://blueskyproject.io/hklpy
BSD 3-Clause "New" or "Revised" License
2 stars 11 forks source link

BUG: 3 tests fail at home, not in GHA #310

Closed prjemian closed 6 months ago

prjemian commented 6 months ago

These tests:

FAILED hkl/tests/test_save_restore_UB.py::test_restore_orientation - KeyError: "Wrong axes names.  Expected ['john', 'paul', 'george', 'ringo'], received ('omega', 'chi', 'phi', 'tth')"
FAILED hkl/tests/test_user.py::test_calc_UB - TypeError: Expected list, tuple, or calc.Position() object, received FourcRealPos(omega=-145.451, chi=90, phi=0, tth=69.0966)
FAILED hkl/tests/test_user.py::test_setor - TypeError: Expected list, tuple, or calc.Position() object, received FourcRealPos(omega=-145.451, chi=90, phi=0, tth=69.0966)
prjemian commented 6 months ago

The TypeError fails are easy to find. https://github.com/bluesky/hklpy/blob/95be6c932e093782f0cbcfc75fa94dd54690085c/hkl/diffract.py#L37 subclass ophyd.PseudoPositioner. This class method: https://github.com/bluesky/ophyd/blob/68e4fd33e10987d36d51914f274eaae5289252c7/ophyd/pseudopos.py#L482-L500

returns a namedtuple with name ending in RealPos.

prjemian commented 6 months ago

The other fail seems to be a confusion between handling of canonical and user-refined positioner names.

prjemian commented 6 months ago

Odd that it fails on home system (even with a fresh clone of the repo) but does not fail in GHA.