Skip to content

Add initial CASA tests#324

Merged
thomaswilliamsastro merged 1 commit into
masterfrom
initial-tests
Apr 20, 2026
Merged

Add initial CASA tests#324
thomaswilliamsastro merged 1 commit into
masterfrom
initial-tests

Conversation

@thomaswilliamsastro

@thomaswilliamsastro thomaswilliamsastro commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator

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.

@thomaswilliamsastro thomaswilliamsastro force-pushed the initial-tests branch 4 times, most recently from 344065f to 5e1a243 Compare April 14, 2026 13:13
@codecov

codecov Bot commented Apr 14, 2026

Copy link
Copy Markdown

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 ☂️

@thomaswilliamsastro thomaswilliamsastro force-pushed the initial-tests branch 10 times, most recently from 240d9ab to 36b0cd1 Compare April 15, 2026 14:04
@thomaswilliamsastro thomaswilliamsastro marked this pull request as ready for review April 15, 2026 14:08
@thomaswilliamsastro

Copy link
Copy Markdown
Collaborator Author

@e-koch ready for review!

Comment thread tests/casa_config_files/startup.py Outdated
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.
@thomaswilliamsastro thomaswilliamsastro merged commit a242249 into master Apr 20, 2026
6 of 7 checks passed
@thomaswilliamsastro thomaswilliamsastro deleted the initial-tests branch April 20, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants