timofurrer / w1thermsensor

A Python package and CLI tool to work with w1 temperature sensors like DS1822, DS18S20 & DS18B20 on the Raspberry Pi, Beagle Bone and other devices.
MIT License
493 stars 113 forks source link

Add support for offsetting temperature readings #68

Closed jonte closed 4 years ago

jonte commented 4 years ago

A deficient temperature sensor may report an incorrect temperature. set_offset allows adding or subtracting a fixed value from readings of a sensor. This allows calibration of deficient sensors.

codecov-io commented 4 years ago

Codecov Report

Merging #68 into master will decrease coverage by 0.57%. The diff coverage is 95.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
- Coverage   47.01%   46.44%   -0.57%     
==========================================
  Files           6        6              
  Lines         502      534      +32     
==========================================
+ Hits          236      248      +12     
- Misses        266      286      +20
Impacted Files Coverage Ξ”
w1thermsensor/cli.py 34.56% <100%> (-0.65%) :arrow_down:
w1thermsensor/core.py 54.43% <94.73%> (-0.59%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 54b3e68...26bc9f3. Read the comment docs.

jonte commented 4 years ago

Seems like the build fails on master (and this PR) due to pypi-5.3.1 not being fetchable (the URL yields 404). There are some other pypi versions available: https://docs.travis-ci.com/user/languages/python/#python-versions <-- Should the build switch to one of these?

jonte commented 4 years ago

Hi @timofurrer,

Can I assist / make any changes in order to have this (PR #68 #69 #70) merged?

I think it makes sense to merge #69 first. I could then rebase #70 and #68, since these should build OK in CI once #69 has been merged.

jonte commented 4 years ago

Thanks for reviewing & merging @timofurrer.

What is the procedure/policy for releasing a new version of this module on pypi? Do you typically wait for a certain amount of new functionality before releasing? If not, it would be super helpful if we could do a new release, as the BitBake recipe I am using to install w1thermsensor uses the pypi release tarballs.

If this incurs extra work, let me know if I can help out!

Thanks.

timofurrer commented 4 years ago

I'll release a new version in the next few days - latest on Wednesday :tada:

I hope that helps!

jonte commented 4 years ago

That's perfect! Thanks a lot!

On Mon, Feb 3, 2020, 10:47 Timo Furrer notifications@github.com wrote:

I'll release a new version in the next few days - latest on Wednesday πŸŽ‰

I hope that helps!

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/timofurrer/w1thermsensor/pull/68?email_source=notifications&email_token=AAAQMCW6CFQPJ4X6TDPOQXLRA7R25A5CNFSM4KIPFB22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKTFM3Y#issuecomment-581326447, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQMCSW577MKWOMQH5M24LRA7R25ANCNFSM4KIPFB2Q .

timofurrer commented 4 years ago

I've just released v1.3.0 πŸŽ‰

jonte commented 4 years ago

Beautiful! Thanks a lot! :)

On Tue, Feb 4, 2020, 19:48 Timo Furrer notifications@github.com wrote:

I've just released v1.3.0 πŸŽ‰

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/timofurrer/w1thermsensor/pull/68?email_source=notifications&email_token=AAAQMCT5CFX6SEX75MQZPNLRBGZ6ZA5CNFSM4KIPFB22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKYX73A#issuecomment-582057964, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQMCQL2U5KHM62APD4TBLRBGZ6ZANCNFSM4KIPFB2Q .