-
Notifications
You must be signed in to change notification settings - Fork 26
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
Refactor unit and integration tests and corresponding github actions #686
Conversation
@@ -186,7 +186,7 @@ def test_setup_returns_config_correctly(self): | |||
self.assertEqual( | |||
plasmodium.CONF, | |||
{ | |||
"default_url": "gs://test_plasmodium_release/", | |||
"default_url": "s3://test_plasmodium_release/", |
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 change ensures the tests don't try to access GCS within this test module (using a GCS URL triggers an attempt to authenticate, which then requires secrets, which then won't work on a PR from a fork).
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.
Thanks @alimanfoo
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.
Thanks for including s3fs @alimanfoo!
This PR aims to make a clearer distinction between unit and integration tests, where unit tests run against local or simulated data, and integration tests run against real remote data in GCS.
Reorganise the tests to bring together all tests which run against data in GCS into a common
tests/integration
directory, both for Anopheles and Plasmodium.The
legacy_tests.yml
action is renamed tointegration_tests.yml
and explicitly runs only those tests within thetests/integration
directory.The
tests.yml
andcoverage.yml
actions are updated to run all tests except those in thetests/integration
directory.Previously also we had a mixture of using poetry or pip to install the package and its dependencies in different actions. For simplicity this PR uses pip in all actions running tests or notebooks.
Ensure that mypy runs with the package and all its dependencies installed, for more comprehensive type checking, and fix or ignore additional typing errors that come up.
This lays some groundwork for #682 but doesn't resolve it.