Skip to content

Comments

Add test for hourly points in range with flow units#1576

Open
AndrewKam123 wants to merge 2 commits intoOpenEnergyDashboard:developmentfrom
AndrewKam123:development
Open

Add test for hourly points in range with flow units#1576
AndrewKam123 wants to merge 2 commits intoOpenEnergyDashboard:developmentfrom
AndrewKam123:development

Conversation

@AndrewKam123
Copy link

Fixing LR26: range should have hourly points for middle readings for 15 minute for a 60 day period and flow units & kW as kW

Partly Addresses #962

##Type of change

(Check the ones that apply by placing an "x" instead of the space in the [ ] so it becomes [x])

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

Checklist

(Note what you have done by placing an "x" instead of the space in the [ ] so it becomes [x]. It is hoped you do all of them.)

  • [x ] I have followed the OED pull request ideas
  • [x ] I have removed text in ( ) from the issue request
  • [x ] 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

None

@huss
Copy link
Member

huss commented Feb 9, 2026

@AndrewKam123 Thank you for this contribution. I looked at the OED CLA records but do not see your GitHub ID as listed for having done the form. Could you either do the form (link above) or let me know if you think our records are off. Also, could you provide the GitHub IDs of anyone else who worked on this or let us know or let us know thathat you did this alone. Thanks and let me know if you need anything.

@AndrewKam123
Copy link
Author

@huss I have filled out the form as request. I worked on this with a few members from CodeDay. They are @opeadeyomoye and Pius Okobi.

@huss
Copy link
Member

huss commented Feb 9, 2026

I have filled out the form as request. I worked on this with a few members from CodeDay. They are @opeadeyomoye and Pius Okobi.

@AndrewKam123 Thanks. I see you did the CLA. I could not find entries for the other two people. Are you able to ask them to do it?

@AndrewKam123
Copy link
Author

Yes I am. I will send them the link to the form.

Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

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

Thanks to @AndrewKam123, @opeadeyomoye & @januarysfinest for your first contribution to OED. I made a few comments for you to consider. Please let me know if anything is not clear or you need something.

@@ -150,6 +150,70 @@ mocha.describe('readings API', () => {
});

// Add LR26 here
Copy link
Member

Choose a reason for hiding this comment

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

Can you please remove this comment as the test case is now done.

const expected = await parseExpectedCsv('src/server/test/web/readingsData/expected_line_range_ri_15_mu_kW_gu_kW_st_2022-08-25%00#00#00_et_2022-10-24%00#00#00.csv');

const res = await chai.request(app).get(`/api/unitReadings/line/meters/${METER_ID}`)
.query({ timeInterval: ETERNITY.toString(), graphicUnitId: unitId });
Copy link
Member

Choose a reason for hiding this comment

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

I think the testing document defined the timeInterval to be 2022-08-25 00:00:00 to 2022-10-24 00:00:00 and not infinity.


const unitId = await getUnitId('kW');

const expected = await parseExpectedCsv('src/server/test/web/readingsData/expected_line_range_ri_15_mu_kW_gu_kW_st_2022-08-25%00#00#00_et_2022-10-24%00#00#00.csv');
Copy link
Member

Choose a reason for hiding this comment

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

See the testing document about needing to add any new testing data file. The file specified for reading for the expected values needs to be added to the repository. When I tried to run the test it failed because the file was missing.

Copy link
Author

Choose a reason for hiding this comment

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

Okay, generating a new data file. Will update when completed.

Add test case LR26 for hourly points in readings.
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