code coverage integration with IDEs has always been shaky, but we have a couple working examples across different repos. we should update our pyproject.toml files in rats to shift some of the configuration from tool.coverage.run to tool.pytest.ini_options, because it allows IDEs to better parse the results and show the coverage report in the native IDE ux. i think these changes don't affect the output when running pytest in a terminal.
- the
tool.coverage.run section should only have a data_file and relative_files config
- do not specify
branch because it break's the IDE's ability to use branching options
- do not specify
source values, i'm unsure why this breaks things, but it's not necessary
- in
tool.pytest.ini_options
- add a
--cov option for each source directory we were previously defining in coverage configs
- enable
--cov-branch
part of this work should also include documentation to explain how to configure your projects in similar ways.
code coverage integration with IDEs has always been shaky, but we have a couple working examples across different repos. we should update our
pyproject.tomlfiles in rats to shift some of the configuration fromtool.coverage.runtotool.pytest.ini_options, because it allows IDEs to better parse the results and show the coverage report in the native IDE ux. i think these changes don't affect the output when runningpytestin a terminal.tool.coverage.runsection should only have adata_fileandrelative_filesconfigbranchbecause it break's the IDE's ability to use branching optionssourcevalues, i'm unsure why this breaks things, but it's not necessarytool.pytest.ini_options--covoption for each source directory we were previously defining in coverage configs--cov-branchpart of this work should also include documentation to explain how to configure your projects in similar ways.