instrumentkit / InstrumentKit

Python package for interacting with laboratory equipment over various buses.
250 stars 71 forks source link

Failing tests due to `pint` upgrade #395

Closed trappitsch closed 1 year ago

trappitsch commented 1 year ago

The current test suite seems to be failing, see #389 and #394. The issue seems to come from pint, the latest v0.21 was released on May 1, which was in between the last successful run of the suite and these new issues.

Running tox on my system, all except the py37 and py37-numpy envs fail.

I tracked the culprit to this line in units.py:

ureg.define("percent = []")

Removing that line (without understanding why we need it) makes the tests pass, but the py37 suite fails now.

We pinned pint so far to >=0.16.1, however, pint dropped Python 3.7 support officially after 0.17. Since ik has 3.7 support, I propose for now to pin it to ~=0.17.0 or alternativel to >=0.16.1,<0.21.0. Ideas?

scasagrande commented 1 year ago

That's annoying. Let's do >=0.16.1,<0.21.0 while look at the our other options.

Py37 EOL is very soon (June 27 2023)

trappitsch commented 1 year ago

Looks here like percent was actually introduced, that means we don't have to define it anymore from 0.21 on. From the merge of that PR and the release history, it seems like 0.21 was the first version to have this included... I prepare a PR with the proposed fix for now and once we drop 3.7 support, we can pin pint accordingly.

scasagrande commented 1 year ago

Interesting! That's good to know, thanks for looking into that

scasagrande commented 1 year ago

Resolved #396