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 SS3 integration tests for testing convert_output() #45

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

Bai-Li-NOAA
Copy link
Collaborator

This PR addresses issue #29

  • tests/testthat/fixtures/prepare_ss3_output_files.R downloads and runs SS3 test models from the ss3-test-models repository. After running the models, all files are deleted, except for the Report.sso files, which are saved for testing ASAR.
  • tests/testthat/test-convert_output.R tests the convert_output() function using all SS3 test models saved in tests/testthat/fixtures/.
  • The tests verify that no errors occur when running convert_output(), ensure the result contains 31 columns, and confirm the file_save flag works as expected. Feel free to add any additional tests if needed.

All tests have passed.

@Bai-Li-NOAA Bai-Li-NOAA linked an issue Sep 26, 2024 that may be closed by this pull request
Schiano-NOAA
Schiano-NOAA previously approved these changes Sep 26, 2024
Copy link
Collaborator

@Schiano-NOAA Schiano-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vermillion snapper and verm snapper F4 has extra files in the folder. Not sure if this matters for the test but wanted to point out

@Bai-Li-NOAA
Copy link
Collaborator Author

It won't affect the tests, but thanks for flagging it. There was a race condition where SS3 hadn’t finished saving reports before the code deleted irrelevant files. Since SS3 runs externally, the deletion sometimes happened too soon. I fixed it by moving the file deletion out of the parallel process.

@Bai-Li-NOAA Bai-Li-NOAA merged commit 7efb129 into main Sep 26, 2024
10 checks passed
@Bai-Li-NOAA Bai-Li-NOAA deleted the test-convert-output branch September 26, 2024 17:38
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.

Add integration tests for convert_output()
2 participants