Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace round main with round in FHEM::Core::Utils::Math #1154

Merged
merged 4 commits into from
Jan 23, 2023

Conversation

sidey79
Copy link
Contributor

@sidey79 sidey79 commented Jan 21, 2023

  • Please check if the PR fulfills these requirements
  • Tests for the changes have been added / modified (needed for for bug fixes / features)
  • commandref has been added / updated (needed for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
  • Bugfix (please link issue)
  • Feature enhancement
  • Documentation update
  • Unittest enhancement
  • other
  • What is the current behavior?
    (You can also link to an open issue here, if this describes the current behavior)

The round sub from 98_Utils isn't reliable, because it can be overriden via POSIX or Math::Round package.

  • What is the new behavior (if this is a feature change)?

round from package FHEM::Core::Utils::Math is used which lives in a separate package and is not set into main

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

This module will stop working until fhem is updated to rev 27076 or newer:
https://svn.fhem.de/trac/browser/trunk/fhem/lib/FHEM/Core/Utils/Math.pm?rev=27076

  • Other information:

@codecov
Copy link

codecov bot commented Jan 21, 2023

Codecov Report

Merging #1154 (5e1beef) into master (261f202) will increase coverage by 0.34%.
The diff coverage is 89.58%.

@@            Coverage Diff             @@
##           master    #1154      +/-   ##
==========================================
+ Coverage   67.36%   67.70%   +0.34%     
==========================================
  Files         134      136       +2     
  Lines        9806     9829      +23     
  Branches     1571     1570       -1     
==========================================
+ Hits         6606     6655      +49     
+ Misses       1904     1879      -25     
+ Partials     1296     1295       -1     
Flag Coverage Δ
fhem 57.37% <89.58%> (+0.42%) ⬆️
modules 67.70% <89.58%> (+0.34%) ⬆️
perl 90.33% <ø> (+0.16%) ⬆️
unittests 67.70% <89.58%> (+0.34%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
FHEM/14_SD_WS09.pm 75.89% <78.26%> (+0.53%) ⬆️
FHEM/00_SIGNALduino.pm 64.25% <100.00%> (+0.60%) ⬆️
FHEM/14_SD_AS.pm 56.25% <100.00%> (+0.34%) ⬆️
FHEM/14_SD_WS.pm 68.36% <100.00%> (+0.03%) ⬆️
t/FHEM/14_BresserTemeo/00_load.t
t/FHEM/10_SD_Rojaflex/09_parseData.t
t/FHEM/14_SD_UT/09_parseData.t 94.11% <0.00%> (ø)
t/FHEM/10_SD_GT/00_load.t 100.00% <0.00%> (ø)
t/FHEM/14_Hideki/00_load.t 100.00% <0.00%> (ø)
t/FHEM/14_SD_WS/09_parseData.t 94.11% <0.00%> (ø)
... and 3 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

14_SD_AS
14_SD_WS
14_SD_WS09

changed round to FHEM::Core::Utils::Math
@sidey79 sidey79 merged commit 279c125 into master Jan 23, 2023
@sidey79 sidey79 deleted the master-roundpackage branch January 23, 2023 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ADE WS1907 is not recognized even though messages were received
4 participants