Closed eyck closed 2 years ago
Thanks for this report as well. Here, again, could you provide an example XML database? While this fix avoids the divide by 0, I think it will likely not get the coverage percentage correct.
Actually I do not have a database for this anymore since it has been created using a buggy random stimulus (which I fixed), My problem here was that the viewer simply crashed with the 'division by zero' message... Rgd. the coverage percentage: If you do not have a cross bin, the coverage is 0%, isnt't it? And this was -to my understanding- exactly the problem here. FC4SC on writes the cross bins into the XML database which are hit. In the faulty case none have been hit so therefore the node did not have any bins.
Good point, @eyck. I'm interested in how coverage is written when, for example, a single cross bin is hit. If only hit bins are recorded, I think the code would currently report 100% coverage. That said, happy to accept this PR for now and make updates as we have more FC4SC examples.
One question though: when will this change make it to PyPi? Is there a release or do you follow continous delivery?
pyucis is setup for CI/CD, so a release is on PyPi ~5min after a new change is committed. I migrated PyUCIS from Azure to GitHub last weekend, and that introduced a slight issue with PyPi and package versions. That issue is now resolved, and the latest release on PyPi (https://pypi.org/project/pyucis/0.0.6.2526245027/) includes the changes from this PR.
I use FC4SC and when reporting cross coverages it does not write items which are not hit. This leads to a division by zero exeception.