aconrad / pycobertura

A code coverage diff tool for Cobertura reports
MIT License
114 stars 39 forks source link

feat: a customizable html report #93

Closed nilleb closed 4 years ago

nilleb commented 4 years ago

Let the HtmlReport caller

The report you obtain looks like

Capture d’écran 2020-04-19 à 15 20 06
nilleb commented 4 years ago

The no_file_sources_message is useful to pycobertura consumers which have an alternate way to produce the report. In the example screenshot, the report has been produced on a CI environment. The message in the sample is pretty useless, but I imagined to modify it in order to explain the visitor how to rebuild the same report on his developer machine, including the sources, if he has some doubts about how he could improve his code coverage.

aconrad commented 4 years ago

This PR looks good to me, thanks for the updates @nilleb!

Can we please add some tests in: https://github.com/aconrad/pycobertura/blob/master/tests/test_reporters.py

I have to revisit the CI integration, I'm not sure why Travis isn't working.

Also, please remember to update the CHANGES file and add yourself as a contributor. You might run into a merge conflict when your other PR gets merged but it's a reminder that we need to add a changelog entry.

aconrad commented 4 years ago

@nilleb thanks for your work on this! Your contribution is much appreciated!