MolSSI/cookiecutter-cms

Codecov may not be finding configuration file

j-wags opened this issue · 0 comments

Repost of https://github.com/openforcefield/openforcefield/pull/432/files#r331088966

I haven't verified this directly (by making a new repo using the cookiecutter), but will update this Issue when I do so.

Basically, I removed our old coverage version pin, and codecov dropped by 30%. This was due to the code lines in the tests themselves becoming a part of the denominator for our coverage % (but oddly, not the numerator).

Per the docs here, this can be avoided using the [omit] keyword in a config file. This is present both in the OFFTK repo and in the cookiecutter, in setup.cfg. However, our pytest commands (and the cookiecutter's) don't specifically point to this file (using the --cov-config commandline argument).

I suspect that new versions of coverage or pytest-cov have changed the way that config files are found, such that setup.cfg is no longer found by default. Adding --cov-config=setup.cfg to the list of pytest args should fix that if it's also an issue in the cookiecutter.