pymeasure / pyleco

Python implementation of the Laboratory Experiment COntrol (LECO) protocol
MIT License
9 stars 3 forks source link

Test for older python versions. #61

Closed BenediktBurger closed 7 months ago

BenediktBurger commented 7 months ago

Just to test old python versions (Py 3.7, Py 3.8)

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 91.76030% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 87.53%. Comparing base (4cc7cca) to head (08c198c).

Files Patch % Lines
pyleco/json_utils/rpc_server_definition.py 84.81% 7 Missing and 5 partials :warning:
pyleco/json_utils/errors.py 88.88% 4 Missing :warning:
pyleco/actors/actor.py 62.50% 2 Missing and 1 partial :warning:
pyleco/directors/transparent_director.py 57.14% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## feature/legacy #61 +/- ## ================================================== + Coverage 87.28% 87.53% +0.25% ================================================== Files 33 36 +3 Lines 2626 2856 +230 Branches 314 345 +31 ================================================== + Hits 2292 2500 +208 - Misses 280 295 +15 - Partials 54 61 +7 ``` | [Flag](https://app.codecov.io/gh/pymeasure/pyleco/pull/61/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymeasure) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/pymeasure/pyleco/pull/61/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymeasure) | `87.53% <91.76%> (+0.25%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymeasure#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

BenediktBurger commented 7 months ago

Python<3.9 requires typing.List instead of list. On the other hand, pydantic (a dependency of openrpc) requires list and not typing.List to annotate methods available via RPC.

BenediktBurger commented 7 months ago

We have to rename cls argument to device class. (major change).

For 3.7, setup tools makes problems

BenediktBurger commented 7 months ago

typing.Protocol is for Python>=3.8, so 3.7 is not viable Other 3.8 feature: walrus operator (":=")