-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: new page overviewing CI & code coverage #165
Conversation
@@ -97,7 +97,7 @@ | |||
"image_light": "logo-light-mode.png", | |||
"alt_text": "pyOpenSci Python Package Guide. The pyOpenSci logo is a purple flower with pyOpenSci under it. The o in open sci is the center of the flower", | |||
}, | |||
"header_links_before_dropdown": 4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes space for a CI&data section in our navigation.
@lwasser Should we close this draft? Or do you want to leave open. |
@willingc i think we need to keep this one open. its content that i have yet to finish. so maybe a help-wanted tag is warranted. this page isn't high priority now but i can try to put it in my task list as a chip away at it task. |
tasks
|
578ad59
to
33a61e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
pre-commit.ci autofix |
i'm a little confused about why CI and data are combined? it seems worth it to me to have a dedicated |
tests/code-cov.md
Outdated
:height: 450px | ||
:alt: Screenshot of the code cov service - showing test coverage for the stravalib package. in this image you can see a list of package modules and the associated number of lines and % lines covered by tests. at the top of the image you can see what branch is being evaluated and the path to the repository being shown. | ||
|
||
The CodeCov platform is a useful tool if you wish to visually track code coverage. Using it you can not only get the same summary information that you can get with **pytest-cov** extension. You can also get a visual representation of what lines are covered by your tests and what lines are not covered. Code coverage is mostly useful for evaluating unit tests and/or how much of your package code is "covered". It however will not evaluate things like integration tests and end-to-end workflows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be useful to mention that MyPy is also able to produce coverage reports for typing that can be uploaded to Codecov and overlaid on top of runtime testing coverage.
Here's one place where I implemented this:
- https://github.com/aio-libs/yarl/blob/3967268/.github/workflows/reusable-linters.yml#L66C11-L69C51
- https://github.com/aio-libs/yarl/blob/3967268/.pre-commit-config.yaml#L127C7-L127C57
It comes with a few challenges, though: https://discuss.python.org/t/is-there-any-tool-that-can-report-type-coverage-of-a-project/34962/4.
Also, there's GitHub Actions like irongut/CodeCoverageSummary
that can be helpful in presenting this in job summaries: https://github.com/cherrypy/cheroot/blob/a9c1fe4/.github/workflows/ci-cd.yml#L1100C5-L1112C65.
Finally, Coveragepy itself is able to output markdown for use in job summaries (https://github.com/aio-libs/yarl/blob/3967268/.github/workflows/ci-cd.yml#L331C9-L332C36) and it can produce HTML output locally.
The latter is quite useful since it will display context details that are not represented on Codecov. Plus, it's nice not to have to push to remote and trigger an expensive CI run to work on something locally and maybe even offline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!! this is super helpful. I've updated the file to add info about Mypy and exporting results in a local or ci build to avoid needing to use the website interfaces! !!
thank you, everyone, for the reviews!! Once Ci builds and is happy i'll merge this!! |
@all-contributors please add @webknjaz for review |
I've put up a pull request to add @webknjaz! 🎉 |
@all-contributors add @namurphy for code, review |
ENH: fixes from Jonny's review Fix: review edits from Jonny p2 Fix: typos and cleanup Fix: add example to tests ci page
Co-authored-by: Nick Murphy <[email protected]> Update ci-tests-data/ci.md Co-authored-by: Nick Murphy <[email protected]> Update ci-tests-data/ci.md Co-authored-by: Nick Murphy <[email protected]> Update ci-tests-data/ci.md Co-authored-by: Nick Murphy <[email protected]> Update ci-tests-data/ci.md Co-authored-by: Nick Murphy <[email protected]> Update ci-tests-data/ci.md Co-authored-by: Nick Murphy <[email protected]> Update ci-tests-data/code-cov.md Co-authored-by: Nick Murphy <[email protected]> Fix: edits from @namurphy to run tests page Co-authored-by: Nick Murphy <[email protected]> Update ci-tests-data/run-tests.md Co-authored-by: Nick Murphy <[email protected]>
Co-authored-by: Trevor James Smith <[email protected]> Fix: edit from trevor Co-authored-by: Trevor James Smith <[email protected]> Fix: edit from trevor Co-authored-by: Trevor James Smith <[email protected]> Fix: edits from Trevor Co-authored-by: Trevor James Smith <[email protected]> Fix: edits from Nick Co-authored-by: Nick Murphy <[email protected]> Packaging image Fix: remove unused block Fix Update ci-tests-data/tests-ci.md Co-authored-by: Trevor James Smith <[email protected]>
Co-authored-by: Carol Willing <[email protected]> Update ci-tests-data/ci.md Co-authored-by: Carol Willing <[email protected]> Update ci-tests-data/ci.md Co-authored-by: Carol Willing <[email protected]> Fix: other edits from review'
Fix: force to main Fix: main Fix: update for final page review Fix: remove dated image
Co-authored-by: Jeremiah Paige <[email protected]>
Ok, I've now renamed the CI section continuous-integration. The ci section is quite thin, but the one page we have, I think, is a great start 🚀 thank you, everyone. This is getting merged now!! 🎉 |
This pr is the final piece of content from the now closed pr #104 that was opened in september. it contains 2 short pages
because it's been so long i plan to review / edit prior to making this reviewable.