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

add pytest no-crds option to disable tests that require crds #118

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Feb 9, 2023

This PR adds a no-crds pytest option to disable tests that require downloading ~500MB of files from CRDS.

Checklist

  • added entry in CHANGES.rst (either in Bug Fixes or Changes to API)
  • updated relevant tests
  • updated relevant documentation
  • updated relevant milestone(s)
  • added relevant label(s)

@braingram braingram added the no-changelog-entry-needed Trivial change that doesn't need an entry in the change log label Feb 9, 2023
@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (ec2cd1b) 65.22% compared to head (12591ce) 65.22%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #118   +/-   ##
=======================================
  Coverage   65.22%   65.22%           
=======================================
  Files         101      101           
  Lines        5450     5450           
=======================================
  Hits         3555     3555           
  Misses       1895     1895           
Impacted Files Coverage Δ
src/stdatamodels/jwst/datamodels/dqflags.py 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@braingram braingram marked this pull request as ready for review February 9, 2023 18:32
@braingram braingram mentioned this pull request Feb 9, 2023
5 tasks
@braingram braingram changed the title add pytest no_crds option to disable tests that require crds add pytest no-crds option to disable tests that require crds Feb 9, 2023
@braingram
Copy link
Collaborator Author

The option is off by default so that when pytest is run with no options, tests against crds will be run (and data will be downloaded when needed). The crds tests are only skipped if a user explicitly passes the --no-crds option.

This is useful because the test suite without the crds tests (on my machine) take ~48 seconds. With downloading data the crds tests alone take 218 seconds (490 seconds if using the vpn shared cache).

The crds tests contribute 0% to the test coverage.

Including this no-crds option will allow for much faster local testing.

@nden nden requested a review from a team as a code owner April 14, 2023 13:08
@nden nden merged commit bd6bad7 into spacetelescope:master Apr 14, 2023
@braingram braingram deleted the testing/no_crds branch April 14, 2023 13:16
@braingram
Copy link
Collaborator Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog-entry-needed Trivial change that doesn't need an entry in the change log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants