Skip to content

LR11: Add readings line meter range quantity test#1644

Open
matterwoven wants to merge 24 commits into
OpenEnergyDashboard:developmentfrom
matterwoven:development
Open

LR11: Add readings line meter range quantity test#1644
matterwoven wants to merge 24 commits into
OpenEnergyDashboard:developmentfrom
matterwoven:development

Conversation

@matterwoven

@matterwoven matterwoven commented Jun 15, 2026

Copy link
Copy Markdown

Description

Added LR11, additions fetch data in 15-minute interval readings with infinite start and end times. Test translates units from a document we added, converting the kWh format to MJ format with reverse conversion. (Document needed in Design Docs not present)

Addresses #LR11

Type of change

Test Document Alterations and Additions

  • Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

  • I have followed the OED pull request ideas
  • I have removed text in ( ) from the issue request
  • You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.

Limitations

A solution to the floating point error issue would be a true test file to replace our custom one. The testing file listed in the Design Docs was not locatable to the best of our ability, with full accuracy we will be able to clear tests without issues.

@huss

huss commented Jun 16, 2026

Copy link
Copy Markdown
Member

@matterwoven Thank you for this contribution. The PR description states the CLA has been signed by all contributors. However, OED records do not have one for you. Thus, I would like you to:

  • Please sign the CLA via the link in the description or let me know that you think our records are off.
  • Add a comment that gives the names of any other people involved or state that you are the only one who did work. If others worked on this then they also need to sign the CLA. You have a commit (Classmates contributions) that may imply others were involved.

Once this is done, this PR can be formally reviewed. Please let me know if you have any questions/thoughts.

@matterwoven

Copy link
Copy Markdown
Author

The other contributors for this project are BushyMustache and DennysSaenz123 on GitHub, their signing at time of writing should be in the process of completion, I have also signed the form

@matterwoven

Copy link
Copy Markdown
Author

Update, currently contributor DennysSaenz123 is away and will be signing the document soon, but at a later point

@huss

huss commented Jun 18, 2026

Copy link
Copy Markdown
Member

Update, currently contributor DennysSaenz123 is away and will be signing the document soon, but at a later point

I have all the CLAs. I will try to review the PR soon.

@huss

huss commented Jun 19, 2026

Copy link
Copy Markdown
Member

@matterwoven, @dennys123 & @BushyMustache Thank you for this contribution. I looked at it but there appears to be a number of unrelated files with changes. This is complicating the review. My first thought is that this branch is now slightly out of date with development. Since you are the developers, I wanted to see if you want to merge in the latest development. If not, let me know and OED can do it since it appears a clean merge.

@matterwoven

Copy link
Copy Markdown
Author

Thank you for letting me know, and apologies for the late response, me and my team have our own projects we're looking to so we would appreciate if OED could handle it, thanks again and appreciate the information

@huss

huss commented Jun 23, 2026

Copy link
Copy Markdown
Member

Thank you for letting me know, and apologies for the late response, me and my team have our own projects we're looking to so we would appreciate if OED could handle it, thanks again and appreciate the information

@matterwoven, @dennys123 & @BushyMustache I'm sorry to report that merging development did not resolve all the issues. Given this I did not push my merge back to be safe. I have not tried to carefully check all the files but I already noticed these items:

  • README.md was modified. OED does not permit names or user ids in the source code. The git commit record is what shows you did the work.
  • package.json & package-lock.json are modified. Even if these changes are reasonable they should not be part of this PR.

Given this, I'm not going to review this PR further until the only changes are in the two expected test files. If you are unable to do that then this PR will be closed. (Only noting this since a previous comment indicated you may not have time.) I would appreciate knowing either way so we can properly track this PR. Please let me know if anything is not clear or you have thoughts/questions.

@matterwoven matterwoven left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Cleaned up the issues you mentioned, if this helps the appeal let me know of any extra pieces needing changed, also note package-lock has been removed from this branch for re-creation, the old file seems unretrievable by me

@huss

huss commented Jun 26, 2026

Copy link
Copy Markdown
Member

Cleaned up the issues you mentioned, if this helps the appeal let me know of any extra pieces needing changed, also note package-lock has been removed from this branch for re-creation, the old file seems unretrievable by me

Normally OED does not recreate the package-lock.json file but I will see if I can recreate.

@huss

huss commented Jun 29, 2026

Copy link
Copy Markdown
Member

Cleaned up the issues you mentioned, if this helps the appeal let me know of any extra pieces needing changed, also note package-lock has been removed from this branch for re-creation, the old file seems unretrievable by me

Normally OED does not recreate the package-lock.json file but I will see if I can recreate.

I put back the development version of package-lock.json and pushed out the change. The file is back and not showing changes in the PR.

@huss huss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@matterwoven, @dennys123 & @BushyMustache Thank you for working on this. Review and testing found a few items to consider and I have made comments about them. I also want to note that LR11 is currently failing. This relates to PR #1659. The default tolerance is 10-7 but this test needs a value of 10-6. This PR will need to hold until that PR clears and the changed OED version is available to fix this situation. However, please make the other changes to prepare this PR. Please let me know if anything is not clear or you have thoughts/questions.

Comment thread src/server/test/web/readingsLineMeterRangeQuantity.js Outdated
Comment thread src/server/test/web/readingsLineMeterRangeQuantity.js Outdated
Comment thread src/server/test/web/readingsLineMeterRangeQuantity.js Outdated
@matterwoven

Copy link
Copy Markdown
Author

Thank you for the thorough follow up, I'll work in my spare time on preparing for this pull

@huss

huss commented Jul 2, 2026

Copy link
Copy Markdown
Member

@matterwoven I recently merged PR #1659 that, if I recall correctly, you need for this PR. It deals with modifying the testing tolerance. If this is correct, you should add the latest development to your branch to do the needed work. It is a good idea to update anyway. Please let me know if you have any thoughts/questions.

@matterwoven

Copy link
Copy Markdown
Author

Thank you for the merge! This addition to readingUtils.js was very useful, I added a 1 Delta defined deviation for tolerance and all tests pass, let me know if there's anything else I can do past this point, have an amazing day

@huss huss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@matterwoven Thank you for the updated code. It resolved all the open comments except one item. I think there was some confusion over the changes in expectRangeToEqualExpected as your updated code is still failing the test. Here is what I think needs to be done:

  • It might be useful to do the step below to run your test before any changes to verify it fails on your machine.
  • Fetch the OED (not your fork) development branch and merge it into your development branch on your machine. This should integrate the new code into your work. You can check by looking at the git commit records and/or the file with that code to see there are now 4 parameters for the function.
  • Change the tolerance for the test to be 10-6. To do this change the call to the function to be expectRangeToEqualExpected(res, expected, METER_ID, 0.000001);.
  • Follow the directions for testing your code. See the testing design doc (https://github.com/OpenEnergyDashboard/DesignDocs/blob/main/testing/testing.md#creating-a-new-test at step 9). It should show it as passing.

I'm hoping once this is done it will all work. Please let me know if you have any questions or something does not work as described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants