Skip to content
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

pytest: set default --cov, --cov-report #2275

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

adamjstewart
Copy link
Collaborator

With this, you can now use pytest --cov and pytest will automatically know you want coverage specifically for --cov=torchgeo and --cov-report=term-missing. This can also easily be overridden on the command line:

> pytest --cov=torchgeo.datasets.foo --cov-report=xml

I haven't yet found a way to enable coverage by default (without needing --cov) in a way that can also be overridden on the command line, but I'm pretty happy with this for now.

P.S. I also removed the 10 slowest tests reports, as we don't really pay any attention to these.

@adamjstewart adamjstewart added this to the 0.6.1 milestone Sep 4, 2024
@github-actions github-actions bot added documentation Improvements or additions to documentation testing Continuous integration testing dependencies Packaging and dependencies labels Sep 4, 2024
@calebrob6
Copy link
Member

P.S. I also removed the 10 slowest tests reports, as we don't really pay any attention to these.

What tests were these?

@adamjstewart
Copy link
Collaborator Author

You can see them on CI for the latest commit: https://github.com/microsoft/torchgeo/actions/runs/10728981926/job/29754689425

It's all model setup, especially Scale-MAE, DOFA, etc.

@adamjstewart adamjstewart merged commit d4a7b72 into microsoft:main Sep 10, 2024
19 checks passed
@adamjstewart adamjstewart deleted the config/coverage branch September 10, 2024 15:15
adamjstewart added a commit that referenced this pull request Oct 10, 2024
* pytest: set default --cov, --cov-report

* Prevent ambiguity between packages and directories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Packaging and dependencies documentation Improvements or additions to documentation testing Continuous integration testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants