Add initial CASA tests#324
Merged
Merged
Conversation
344065f to
5e1a243
Compare
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
240d9ab to
36b0cd1
Compare
Collaborator
Author
|
@e-koch ready for review! |
e-koch
approved these changes
Apr 20, 2026
This PR adds a bunch of infrastructure for testing code and running end-to-end regressions tests. For now, it's pretty barebones, but should make it easy to add tests going forwards. Tests are run using pytest, and a tox matrix to test different OS's (and potentially python versions) so we can check if/when things break. Coverage is handled by codecov.io, and code quality by ruff. For now, the ruff doesn't fail on errors since there are a lot, but my plan is to squash these in future PRs and align everything to a more common code practice. The tests at the moment just check the pipeline imports, CASA imports, and analysisUtils imports. For many of these, it also checks that the arguments we pass exist within the function. So, I see this as a baseline into which we should also include end-to-end regression tests and various tests for functions with known outputs. But it's a lot of code! - Add pytest suite for testing CASA imports and arguments - Add pytest suite for testing pipeline imports - Add pytest suite for testing analysisUtils functions and arguments - Include coverage - Run ruff for code checks - Add tox.ini configuration to run a matrix of tests - Add GH action for running tests automatically - Integrate with codecov.io - Make sure DerivedHandler is only imported if spectral-cube is installed - Fix changelog entry for dependabot PR - Tidy GH actions to avoid multiple runs etc.
36b0cd1 to
ede7177
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a bunch of infrastructure for testing code and running end-to-end regressions tests. For now, it's pretty barebones, but should make it easy to add tests going forwards.
Tests are run using pytest, and a tox matrix to test different OS's (and potentially python versions) so we can check if/when things break. Coverage is handled by codecov.io, and code quality by ruff. For now, the ruff doesn't fail on errors since there are a lot, but my plan is to squash these in future PRs and align everything to a more common code practice.
The tests at the moment just check the pipeline imports, CASA imports, and analysisUtils imports. For many of these, it also checks that the arguments we pass exist within the function. So, I see this as a baseline into which we should also include end-to-end regression tests and various tests for functions with known outputs. But it's a lot of code!