gitingest icon indicating copy to clipboard operation
gitingest copied to clipboard

docs: integrate Codecov and enforce docstring coverage

Open joydeep049 opened this issue 1 year ago • 6 comments

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 avatar Jan 02 '25 15:01 joydeep049

@joydeep049

  • I have added docstrings to all functions, classes, and modules in this PR, and enforced docstring existence using darglint as part of our CI pipeline (and pre-commit hooks). 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 pytest test 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.

filipchristiansen avatar Jan 02 '25 19:01 filipchristiansen

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.

joydeep049 avatar Jan 03 '25 08:01 joydeep049

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.

It sounds too strict for now, I think those rules should come progressively as the repo gets more complex

cyclotruc avatar Jan 03 '25 08:01 cyclotruc

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.

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 avatar Jan 03 '25 14:01 joydeep049

@joydeep049 I think we might be in a better place now to start thinking about adding codecov

@filipchristiansen What do you think?

cyclotruc avatar Jan 24 '25 23:01 cyclotruc

Agreed- I’ll add it. @cyclotruc Will you make an account (Only you can do it since the repo is under your username)?

filipchristiansen avatar Jan 25 '25 01:01 filipchristiansen