ndokter / dsmr_parser

Library to parse Dutch Smart Meter Requirements (DSMR) telegrams.
MIT License
110 stars 64 forks source link

add value and unit properties to ProfileGenericObject to make sure th… #71

Closed lowdef closed 3 years ago

lowdef commented 3 years ago

Add value and unit properties to ProfileGenericObject to make sure that code like iterators that rely on that do not break.

lowdef commented 3 years ago

Fine with me? Should I change it?

On Fri, 12 Feb 2021, 17:43 Nigel Dokter, notifications@github.com wrote:

@ndokter commented on this pull request.

In dsmr_parser/objects.py https://github.com/ndokter/dsmr_parser/pull/71#discussion_r575355890:

@@ -155,6 +155,16 @@ def init(self, values): super().init(values) self._buffer_list = None

  • @property
  • def value(self):
  • value is added to make sure the telegram iterator does not break

  • return self.str()

The contents of the values seem more suited?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ndokter/dsmr_parser/pull/71#discussion_r575355890, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCJDWBFPDMB7FM2AJAT65TS6VLBPANCNFSM4VSDDVQQ .

codecov-io commented 3 years ago

Codecov Report

Merging #71 (804747c) into master (3dc77a8) will increase coverage by 0.05%. The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
+ Coverage   61.40%   61.45%   +0.05%     
==========================================
  Files          15       15              
  Lines         557      563       +6     
  Branches       66       66              
==========================================
+ Hits          342      346       +4     
- Misses        210      212       +2     
  Partials        5        5              
Impacted Files Coverage Δ
dsmr_parser/objects.py 68.80% <66.66%> (-0.11%) :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 3dc77a8...8c861ee. Read the comment docs.

lowdef commented 3 years ago

ProfileGenericObject.value now returns values. This ensures that iterators that acces DSMRObject value member do not break.

@ndokter Please merge.

ndokter commented 3 years ago

Sorry for the slow response. Thanks, i've merged the changes