cerfacs-globc/icclim

TST: Automated tests

Closed this issue · 2 comments

bzah commented
  • icclim version: 5.0.2
  • Python version:

Description

From #101:

For now icclim has very few unit tests.
We should consider setting a minimal coverage goal and display the actual coverage on pull requests and our github home page.

The most in need of test functionalities such as indices formulas, percentile calculus and bootstrapping algorithm are all in xclim and they are already well tested.
In icclim it would be nice to:

  1. Add unit tests for custom indices
  2. Add unit tests for icclim pre-processing (metadata dance, cf_calendar, frequency, index_config)
  3. Add integration tests for at least one simple index and a percentile based index.
  4. Decide of a minimal code coverage threshold and block PR merge when it drops (as a first step, 60% would be nice)
  5. Compute coverage on CI and show it (proudly) on a github readme badge.
bzah commented

See coverage report #127 (comment)

bzah commented

We reached 81% coverage thanks to

  • Removing old unmaintained code from tests/integration_tests
  • Adding of a few unit tests.
  • Adding of an basic integration test

I think these improvement are sufficient to close this issue now.
For now I'm not sure 4.

[...] block PR merge when it drops

must be addressed.