[SIGMON-525] Fix sonar coverage
Context
- Goal: restore the coverage in sonar
What was done
- change
sonar.python.coverage.reportPath
tosonar.python.coverage.reportPaths
which was no longer supported - merge the doctest CI step into the pytest one (https://docs.pytest.org/en/7.1.x/how-to/doctest.html). This choice was made because adding the
--doctest-modules
option to pytest adds on top of the "regular" tests docstring tests to pytest, therefore most of the tests were run twice. Also, the doctest CI step hadallow_failure: true
, but the failure was caused by the fact that some tests needed java to run which was not installed in this CI step, not because the doctest was failing in itself. - fix the lack of python install in the sonar step
- add some mypy stub types that were causing errors
- as a bonus, add fancy GitLab coverage and unit test reports.
QA
- acceptance tests were written, see SIGMON-525
Review objectives
- assessment of code functionality
- assessment of code quality
Edited by Simon Mazenoux