Skip to content

TST/DEP: drop pytest-cov in favor of using coverage.py directly - #18879

Draft
neutrinoceros wants to merge 1 commit into
astropy:mainfrom
neutrinoceros:tst/dep/drop-pytest-cov
Draft

neutrinoceros wants to merge 1 commit into
astropy:mainfrom
neutrinoceros:tst/dep/drop-pytest-cov

Conversation

@neutrinoceros

Copy link
Copy Markdown
Contributor

Description

ref: #18878

This PR makes pytest-cov unused. As mentionned on the issue, however, removing pytest-cov from the env graph will also require #18783.

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@neutrinoceros neutrinoceros added this to the v8.0.0 milestone Nov 11, 2025
@neutrinoceros neutrinoceros added testing no-changelog-entry-needed dependencies Pull requests that update a dependency file labels Nov 11, 2025
@github-actions github-actions Bot added the Docs label Nov 11, 2025
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

Comment thread tox.ini Resolved
@neutrinoceros
neutrinoceros force-pushed the tst/dep/drop-pytest-cov branch 5 times, most recently from bd71928 to 3e3ede8 Compare November 11, 2025 16:39
@neutrinoceros
neutrinoceros marked this pull request as ready for review November 11, 2025 16:59
@neutrinoceros
neutrinoceros marked this pull request as draft November 12, 2025 20:43
@nstarman

Copy link
Copy Markdown
Member

Now computing coverage is 2 steps, versus 1 with pytest-cov ?

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

yes. This seems like a very reasonable price to pay to rid ourselves of a dependency, in my opinion. However, I did discover a blocking issue with this approach, reported upstream at OpenAstronomy/github-actions-workflows#330

@neutrinoceros neutrinoceros added the Upstream Action Required Was: Upstream Fix Required label Nov 13, 2025
@nstarman

Copy link
Copy Markdown
Member

I'm 🤷 on this. I've never had an issue with pytest-cov but I appreciate wanting to streamline dependencies.

@neutrinoceros

neutrinoceros commented Nov 13, 2025 •

Copy link
Copy Markdown
Contributor Author

FWIW I can't say I never had any issue with using coverage directly, but I have yet to encounter a problem that pytest-cov actually solves for me. Meanwhile, it has created problems of its own.

@github-actions github-actions Bot added the Close? Tell stale bot that this issue/PR is stale label Apr 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi humans 👋 - this pull request hasn't had any new commits for approximately 4 months. I plan to close this in 30 days if the pull request doesn't have any new commits by then.

In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary.

If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock.

If you believe I commented on this pull request incorrectly, please report this here.

@neutrinoceros neutrinoceros modified the milestones: v8.0.0, v8.1.0 Apr 11, 2026
@neutrinoceros neutrinoceros removed the Close? Tell stale bot that this issue/PR is stale label Apr 11, 2026
@github-actions github-actions Bot added the Close? Tell stale bot that this issue/PR is stale label Apr 12, 2026
@neutrinoceros neutrinoceros added keep-open and removed Close? Tell stale bot that this issue/PR is stale labels Apr 12, 2026
@nstarman

Copy link
Copy Markdown
Member

has created problems of its own.

I'm interested. What problems?

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

Sorry this got drowned in other notifications... I don't recall any specific incident regarding pytest-cov within astropy's CI, though I do remember seeing but general observations

  • any dependency introduces risks (supply chain attack) and/or maintenance burden
  • the fact that pytest-cov has major releases with breaking changes is evidence that the shim it provides over coverage.py isn't always free for ever. Of course the changelog is also evidence that this software isn't bug free (what is ?).

@neutrinoceros
neutrinoceros force-pushed the tst/dep/drop-pytest-cov branch from 3e3ede8 to f2b9064 Compare April 26, 2026 18:49
@nstarman

Copy link
Copy Markdown
Member

If getting rid of it has no impact, then 🤷 sure :)

@pllim

pllim commented Apr 29, 2026

Copy link
Copy Markdown
Member

@zacharyburnett or @Cadair , any opinions here? Thanks, all!

@pllim pllim removed the keep-open label Oct 14, 2026
@github-actions github-actions Bot added the Close? Tell stale bot that this issue/PR is stale label Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi humans 👋 - this pull request hasn't had any new commits for approximately 6 months. I plan to close this in a month if the pull request doesn't have any new commits by then.

In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary.

If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock.

If you believe I commented on this pull request incorrectly, please report this here.

@neutrinoceros
neutrinoceros force-pushed the tst/dep/drop-pytest-cov branch from f2b9064 to ffe9423 Compare October 15, 2026 15:08
@pllim pllim removed the Close? Tell stale bot that this issue/PR is stale label Oct 15, 2026

@zacharyburnett zacharyburnett left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing dependencies is always good!

@neutrinoceros
neutrinoceros force-pushed the tst/dep/drop-pytest-cov branch from ffe9423 to b05a5b3 Compare October 20, 2026 14:29

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file Docs no-changelog-entry-needed testing Upstream Action Required Was: Upstream Fix Required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants