Open khoanguyen-dev opened 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.22%. Comparing base (
575a146
) to head (c837eb9
). Report is 7 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
There is still an error in the Pycode. The mio::CustomIndexArray<mio::abm::TestParameters, mio::abm::TestType>
could not be bound since the pymio::bind_CustomIndexArray
function does not include an overload for a tuple of doubles (just a single double).
I will try to work to extend this. If time is essential, I can set up the TestParameters
in the test directly instead of taking it from the world.parameters
.
According to CodeCov the coverage dropped because of some "indirect changes" by commit a8dd034 (I am not sure that the branch is reported correctly), so now line 200-202 in cpp/models/abm/infection.cpp are no longer covered. Probably some parameter change in the tests could fix this, but maybe have a look at the function as well (it might possibly need updating?).
It seems that I managed to fix the python bindings. However, I had to implement serialise and deserialise for the simple
struct TestParameters {
UncertainValue<> sensitivity;
UncertainValue<> specificity;
}
as it couldn't be detected by the templates in io/io.h. Is there a way around that? I can imagine letting this derive from std::pair
and write access operators for .first
and .second
but there may be something more simple. Please comment if you have ideas.
Is there a way around that?
Not really, we cannot iterate over members of generic structs. (Technically, we could using a void*, but that will cause more issues than it solves.)
I can imagine letting this derive from std::pair and write access operators for .first and .second
That (or tuples, vectors, or other types with its own (de)serialize_internal function) would work, but you lose the names when writing the Json.
I'd say the best options are
auto& [sensitivity, specificity] = params.get<GenericTest>();
I see. In that case I would leave it as is for now and make changes later if we need to.
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
If need be, add additional information and what the reviewer should look out for in particular:
Merge Request - Guideline Checklist
Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.
Checks by code author
Checks by code reviewer(s)
Closes #1012