Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Move argument validation outside of argparse #279
Extracts the command line api configuration out into a separate module (configuration.py). The
This is a building block for eventually addressing #229
@@ Coverage Diff @@ ## master #279 +/- ## ========================================== - Coverage 91.63% 91.27% -0.37% ========================================== Files 13 14 +1 Lines 1566 1581 +15 Branches 269 283 +14 ========================================== + Hits 1435 1443 +8 - Misses 82 88 +6 - Partials 49 50 +1
latk left a comment
A few minor concerns, mostly related to pre-3.6 compatibility.
If you want to you can address them, otherwise I'll fix them before merging. I'll try to merge on Friday. As part of that I'll force-push a simplified commit history onto your pull request branch.
This creates an GcovrConfigOption class to handle the configuration. It was designed with argparse in mind but it can also be adapted to other systems. All config options are stored in the GCOVR_CONFIG_OPTIONS list. Initially there was also a class representing parsed values, so that we can check whether a value has been set. Instead, argparse.SUPPRESS is used to avoid a default assignment of None when the option has not been provided.
- explicitly specify all arguments instead of using kwargs - avoid unspecified dict iteration order prior to Python 3.6
The Travis/Python-3.4 build failed with an error within pkg_resources, i.e. setuptools/pip infrastructure: AttributeError: _DistInfoDistribution__dep_map Online sources indicate updating pip first should help. The problem is that pytest depends on setuptools, and also on other modules that require up to date setuptools during their installation. Since their installation order is undefined, installation can fail if setuptools isn't updated first.