docs: integrate Codecov and enforce docstring coverage
A lot of the existing code doesn't have proper documentation yet. Adding docstrings to functions and classes would improve the readability to a great extent, and adding codecov to check docstring coverage would be the appropriate way to start emphasizing proper documentation.
cc @cyclotruc
@joydeep049
- I have added docstrings to all functions, classes, and modules in this PR, and enforced docstring existence using
darglintas part of our CI pipeline (andpre-commithooks). However, I didn’t enforce docstrings for the test functions yet. - I’m not sure if Codecov can directly check for docstring coverage, but it makes sense to integrate it once we have a solid testing setup. We could upload the
pytesttest report to Codecov to track it. - I suggested to @cyclotruc to add Codecov for test coverage, but he preferred to wait until we have more structured tests in place, as the current ones are not fully structured yet. However, I agree that Codecov should be added at some point.
For docstring coverage check, we can add interrogate to our CI. That would require every file to have atleast 80% docstring coverage for the CI to pass.
For docstring coverage check, we can add
interrogateto our CI. That would require every file to have atleast 80% docstring coverage for the CI to pass.
It sounds too strict for now, I think those rules should come progressively as the repo gets more complex
For docstring coverage check, we can add
interrogateto our CI. That would require every file to have atleast 80% docstring coverage for the CI to pass.It sounds too strict for now, I think those rules should come progressively as the repo gets more complex
I agree. Putting it in the CI might be too strict for now. We can advise contributors to run interrogate locally to make sure they have decent coverage.
@cyclotruc
@joydeep049 I think we might be in a better place now to start thinking about adding codecov
@filipchristiansen What do you think?
Agreed- I’ll add it. @cyclotruc Will you make an account (Only you can do it since the repo is under your username)?