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

[siemensrds] null annotations; JUnit; UoM; enhancements; bug; refactoring; logging #7769

Merged
merged 4 commits into from
May 26, 2020

Conversation

andrewfg
Copy link
Contributor

  • ENHANCED all classes are now declared @NonNullByDefault and the code has been refactored throughout to eliminate all null related compiler warnings.
  • ENHANCED to comply with null annotation rules, the point type classes previously embedded in the RdsDataPoints class have been refactored into individual classes of their own.
  • NEW JUnit test suite added.
  • BUG FIX as a result of JUnit testing, the JSON de-serializer needed to be extensively rewritten to properly parse all known test cases; it is also faster.
  • ENHANCED improvements in the clarity of logging messages.
  • BUG FIX added support for Units of Measure on reading from, and writing to, the cloud server; temperature values have been changed from DecimalType to QuantityType.
  • BUG FIX characters for the temperature degree sign have been recoded as escaped Unicode characters (since previously the spotless formatter was messing things up).
  • ENHANCED many methods and variables have been renamed for better self- documentation of the code.
  • ENHANCED the configuration parameter for polling interval has been moved to advanced level to avoid confusing regular users.
  • BUG FIX the present priority of data points was not being refreshed.
  • BUG FIX in case of unexpected errors, raise an exception instead of returning dummy values; and catch the exceptions at higher levels.
  • ENHANCED faster search for data points by point class; it was done by iteration, but now done (faster) through a second hash table lookup.

Signed-off-by: Andrew Fiddian-Green software@whitebear.ch

…toring; logging

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg added bug An unexpected problem or unintended behavior of an add-on enhancement An enhancement or new feature for an existing add-on labels May 24, 2020
@TravisBuddy
Copy link

Travis tests were successful

Hey @andrewfg,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Copy link
Contributor

@cpmeister cpmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing all this. I really love a lot of these changes.
Here are some things I noticed from my first pass.

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@TravisBuddy
Copy link

Travis tests were successful

Hey @andrewfg,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@TravisBuddy
Copy link

Travis tests were successful

Hey @andrewfg,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Copy link
Contributor

@cpmeister cpmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final changes

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@TravisBuddy
Copy link

Hey @andrewfg,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: 0a209610-9f71-11ea-a34f-dd9ab62511aa

@andrewfg
Copy link
Contributor Author

I don't know why Travis errored :( but I think it wasn't anything to do with my code :)

@cpmeister
Copy link
Contributor

The travis error wasn't caused by you, builds have been unstable lately for various reasons. Don't worry about it.

Copy link
Contributor

@cpmeister cpmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpmeister
Copy link
Contributor

Just waiting to see if the jenkins build succeeds.

@cpmeister cpmeister merged commit bfe0feb into openhab:2.5.x May 26, 2020
@cpmeister cpmeister added this to the 2.5.6 milestone May 26, 2020
@cpmeister cpmeister removed the bug An unexpected problem or unintended behavior of an add-on label May 26, 2020
@andrewfg
Copy link
Contributor Author

Great news! Many thanks @cpmeister for your support!

@andrewfg
Copy link
Contributor Author

Hi @cpmeister in your review of #7767 you suggested me to use QuantityType Percent on one channel; and this reminded me that I need to do the same for this [siemensrds] binding.

I have made a three line code modification, but I don't know how to add it -- either a) add to this already merged PR, of b) create a new micro PR for it.

The reason why I ask the question is that you merged this #7769 PR into 2.5.6 but if I try to create a new PR it currently can only be based on 2.5.x where the #7769 changes have not (yet) appeared.

@cpmeister
Copy link
Contributor

Please create a new PR for those new changes.

@andrewfg
Copy link
Contributor Author

andrewfg commented May 28, 2020

When will the changes that you merged from this PR actually become visible in the 2.5.x branch? I don’t see the merged changes yet, and so if I try make a new PR the diff shows everything that was changed since May 24th (including the so called already merged changes).

@andrewfg
Copy link
Contributor Author

When will the changes that you merged from this PR actually become visible in the 2.5.x branch?

Ok, I think it is solved. Probably I had some Git synchronization issue, but I resolved it by creating a clean new branch on my repo.

The new PR is here #7814

Dries-Vandenneucker added a commit to Dries-Vandenneucker/openhab-addons that referenced this pull request May 31, 2020
* 2.5.x: (174 commits)
  [hpprinter] Add additional data points and refactoring (openhab#7805)
  [neohub] new/legacy API; null annotations; enhancements; bugs; logging (openhab#7767)
  [meteoalerte] Initial contribution (openhab#7200)
  [lgwebos] Console command to show the access key (openhab#7801)
  [hue] Refactored state handling and fix polling after command (openhab#7518)
  [telegram] add attachment URL (openhab#7816)
  [siemensrds] readme adjusted to match openhab#7814 (openhab#7819)
  [lametrictime] correctly parse response (openhab#7818)
  [Seneye] Bug fix for using Pond or Home sensors. (openhab#7797)
  [siemensrds] apply UoM quantityType percent for relative humidity (openhab#7814)
  [alarmdecoder] Add vzone thing for virtual zone control (openhab#7800)
  [hue] Channel alert added for groups (openhab#7810)
  [hue] Keep compatibility with hue emulation for groups (openhab#7809)
  [dscalarm] Bridge/things management refactored (openhab#7748)
  [avmfritz] Add link to Fensterkontakt (magnetisch) to docs (openhab#7806)
  [deconz] add light/blind support and additional sensors (openhab#7608)
  [homekit] add support for min/max values for temperature (openhab#7782)
  [tesla] Use CXF JAX-RS client builder, if available (openhab#7804)
  [mqtt.homie] Improve Homie discovery time (openhab#7760)
  [siemensrds] null annotations; JUnit; UoM; enhancements; bug; refactoring; logging (openhab#7769)
  ...
LoungeFlyZ pushed a commit to LoungeFlyZ/openhab2-addons that referenced this pull request Jun 8, 2020
…ring; logging (openhab#7769)

* [siemensrds] null annotations; JUnit; U-o-M; enhancements; bug; refactoring; logging

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
J-N-K pushed a commit to J-N-K/openhab-addons that referenced this pull request Jul 14, 2020
…ring; logging (openhab#7769)

* [siemensrds] null annotations; JUnit; U-o-M; enhancements; bug; refactoring; logging

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Jul 26, 2020
…ring; logging (openhab#7769)

* [siemensrds] null annotations; JUnit; U-o-M; enhancements; bug; refactoring; logging

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: CSchlipp <christian@schlipp.de>
andrewfg added a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…ring; logging (openhab#7769)

* [siemensrds] null annotations; JUnit; U-o-M; enhancements; bug; refactoring; logging

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
andrewfg added a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…ring; logging (openhab#7769)

* [siemensrds] null annotations; JUnit; U-o-M; enhancements; bug; refactoring; logging

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
andrewfg added a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…ring; logging (openhab#7769)

* [siemensrds] null annotations; JUnit; U-o-M; enhancements; bug; refactoring; logging

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
andrewfg added a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
…ring; logging (openhab#7769)

* [siemensrds] null annotations; JUnit; U-o-M; enhancements; bug; refactoring; logging

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
…ring; logging (openhab#7769)

* [siemensrds] null annotations; JUnit; U-o-M; enhancements; bug; refactoring; logging

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
…ring; logging (openhab#7769)

* [siemensrds] null annotations; JUnit; U-o-M; enhancements; bug; refactoring; logging

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants