-
Notifications
You must be signed in to change notification settings - Fork 400
Unit test improvements, small bug fixes #585
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
Conversation
sulkaharo
commented
Aug 8, 2017
- unit test for COB calculation - note the math is unverified
- New logic for ISF fetching
- Bug fix COB calculation if only one event is presented
- Sort glucose data to match later logic assumptions
…c for ISF fetching. Bug fix COB calculation if only one event is presented. Sort glucose data to match later logic assumptions.
|
@sulkaharo : is this branch ready for testing with node 8.1.x? |
|
If no objections, I'd like to merge this to dev for testing for a 0.5.3 release before we start merging new features (like exponential curves) for an eventual 0.6.0 release. |
|
This PR made the travis-ci build fail for nodejs 0.10 and 0.12. But the travis-ci now succeeds for nodejs 8.1.4. I think a nodejs upgrade should be postponed to oref0 0.6.x and not be required for oref 0.5.3. I have no objections of merging this branch to dev, but we should fix the travis-ci issues soon. |
|
Agreed that the node upgrade, nogit, and exponential-carbs can all wait for 0.6.0. |
|
The fail is due to the COB unit test giving a random result on the server due to an unknown reason, which needs investigation. 0.6.0 sounds right |
|
Would it be possible/useful to merge these unit tests for 0.5.3 without the 8.1.4 requirement? |
|
Merged this to 0.6.0-dev. If there are any tweaks we can make to this to make it suitable for merging to dev for the eventual 0.5.3 release, I'd like to do that as well. |
|
Running #568 (with this branch merged in) on a rig with default preferences (bilinear curve) to start with. The pump-loop is never completing before getting killed off. When I run it manually, it's getting stuck on some of the new code from this branch. top shows oref0-meal spinning at 100% of both CPUs. After letting it run for more than 10 minutes, it finally finished: This particular rig is running node v6.11.1 |
|
I re-did the 0.6.0-dev branch to not include this code, and retargeted the PR there to merge later once we figure out the performance issue. |
|
@sulkaharo We'll need to figure out how much of this we can incorporate into 0.6.0 (now in the dev branch) without negatively affecting performance. Any thoughts there? |
|
@sulkaharo @scottleibrand : What's the best way to proceed with these COB unit tests? Will we skip the node upgrade for oref0 0.6.x release, or will make sure oref0 works with node6 or node8 LTS? I would like to work on a unit test for #777 but, first would like to know how we proceed on this issue. |
|
Unless one of you have cycles to work on it, I plan to defer the node 8 upgrade until 0.6.1. 0.6.0 should work with node 8, but won't install it. |
|
I fixed the conficts with the code and merged to latest dev. Not sure where the performance issues are, when run locally this is the same performance as before. Note the test fails now though, the new COB math in 0.6.0 doesn't decay any of the carbs when the code in this test is run. |
|
The two places that can affect performance is the new ISF code - I just checked and reverting to 0.6.0 version didn't change the local runtime BUT noticed ISF test broke - looks like the 0.6.0 version miscalculates the ISF with profiles that have multiple ISF values. The performance is locally the same for both. Another place that affects performance is the sorting of glucose data in meal/total.js which can be removed if we can guarantee it's always invoked with pre-sorted data - I added the sorting due to finding out the calculation breaks if there's a problem with the sorting. |
Conflicts: tests/profile.test.js
|
I fixed your sorting function: it was using timestamp (which doesn't exist for glucose) instead of date or dateString. Now the tests are failing with |
|
Both |
|
Is any of this still needed in 0.7.0? |
|
@scottleibrand I think it would be good to have these fixes and more unit tests enabled for 0.7.0. |
|
Closing due to lack of interest. Please re-open if you make any progress on fixing the tests. |