Introduce convention class
This PR implements the first step towards using the specified convention to assume the style of docstrings and not rely on figuring out whether a docstring uses NumPy or Google style (#459).
This PR introduces a new class Convention that holds the error codes to check. It also keeps the name of the convention to use. I imagine that an instance of this class should be passed to the ConventionChecker. Convention-specific checks like _check_numpy_sections and _check_google_sections can then be executed based on the specified convention. This would eventually solve #459.
I added tests for the code I added and all existing tests still pass.
Is there any interest in moving this forward?
@adamjstewart / @Pierre-Sassoulas would you like to review this?
On vacation this week but will review next week.
Rebased on top of master and addressed feedback
We should add a test case for #459. All of our tests are passing but #459 is still broken.
I'm actually surprised that this PR fixed #459 for you because it is not supposed to, as outlined in the PR description. I did not touch anything regarding how docstrings are treated or how checks are executed so there must have been something else going on during your tests. This PR only formalizes the concept of conventions a bit.
Gotcha, yeah I have no idea why things were working before the rebase, maybe because the branch was old? I'm fine with formalizing the concept and then fixing #459 in a separate PR. Thanks for your work on this!