Skip to content

[SIGMON-525] Fix sonar coverage

Simon Mazenoux requested to merge SIGMON-525_sonar_coverage into dev

Context

  • Goal: restore the coverage in sonar

What was done

  • change sonar.python.coverage.reportPath to sonar.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 had allow_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

Review objectives

  • assessment of code functionality
  • assessment of code quality
Edited by Simon Mazenoux

Merge request reports