Skip to content

Refactor tuvx tests#722

Merged
K20shores merged 18 commits intomainfrom
refactor_tuvx_tests
Jan 9, 2026
Merged

Refactor tuvx tests#722
K20shores merged 18 commits intomainfrom
refactor_tuvx_tests

Conversation

@K20shores
Copy link
Copy Markdown
Collaborator

@K20shores K20shores commented Jan 8, 2026

  • This makes our fortran tests look more like the regular unit/integration test summary.
  • It also reduces the number of dockerfiles we need to maintain, and may start enabling the fetch content tests to work again by placing them all into one dockerfile
    • There's a shared base that builds musica with gcc and then copies that into the following layers for gcc, intel, and nvhpc
  • I updated our linking so that we don't have to export the tuv and carm objects in the export set

- moving the fetch content tests to integration tests
- making a multistage dockerfile to build fetch content tests
- rework fortran packaging
Adding more information about the fetch content dockerfile
- Moves the fetch content tests into the existing docker action
- Attempts to reuse building the base layer across the targets
@K20shores K20shores force-pushed the refactor_tuvx_tests branch from 7582e07 to 999c611 Compare January 8, 2026 21:36
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.63%. Comparing base (7f6777b) to head (72ae9f2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #722   +/-   ##
=======================================
  Coverage   76.63%   76.63%           
=======================================
  Files         108      108           
  Lines        7849     7849           
=======================================
  Hits         6015     6015           
  Misses       1834     1834           
Flag Coverage Δ
cpp_fortran 69.60% <ø> (ø)
javascript 94.00% <ø> (ø)
python 82.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the test structure for MUSICA's Fortran interface, consolidating Docker builds and reorganizing tests into unit and integration categories to improve maintainability and reduce infrastructure complexity.

Key Changes:

  • Consolidated multiple compiler-specific Dockerfiles into a single multi-stage Dockerfile.fetch-content
  • Reorganized Fortran tests from fetch_content_integration into proper unit and integration test directories
  • Unified module installation paths using MUSICA_INSTALL_MOD_DIR variable throughout the build system
  • Moved get_musica_version function from util.F90 to a dedicated musica module

Reviewed changes

Copilot reviewed 27 out of 29 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
CMakeLists.txt Introduced MUSICA_MOD_DIR and MUSICA_INSTALL_MOD_DIR variables for consistent Fortran module handling
cmake/dependencies.cmake Added netcdf dependency handling and updated CARMA/TUV-x module directory configuration
cmake/setup_musica_target.cmake Removed PUBLIC linking of object libraries, added netcdf linking, and fixed install interface paths
cmake/musicaConfig.cmake.in Added netcdf dependency resolution for downstream consumers
cmake/musica.pc.in Corrected include directory path in pkg-config file
src/packaging/CMakeLists.txt Removed redundant install directives for object libraries and unified module installation
fortran/CMakeLists.txt Simplified module handling by removing duplicate directory setup and custom copy commands
fortran/packaging/CMakeLists.txt Updated module installation path to use MUSICA_INSTALL_MOD_DIR
fortran/musica.F90 Renamed internal function to musica_get_version_c for better naming consistency
fortran/util.F90 Removed get_musica_version function (moved to musica module) and cleaned up exports
fortran/test/CMakeLists.txt Added integration test subdirectory
fortran/test/unit/CMakeLists.txt Removed tests that were moved to integration directory
fortran/test/integration/CMakeLists.txt New file organizing integration tests for MICM and TUV-x
fortran/test/integration/test_micm_api.F90 Added error checking assertion
fortran/test/integration/test_micm_box_model.F90 New comprehensive MICM box model test
fortran/test/integration/test_micm_multiple_grid_cells.F90 New multi-grid cell test demonstrating parallel capabilities
fortran/test/integration/test_tuvx_api.F90 Minor whitespace cleanup
fortran/test/tutorial/demo.F90 Updated to use get_musica_version from musica module
fortran/test/test_simple.F90 Deleted (superseded by better organized tests)
fortran/test/fetch_content_integration/test_get_micm_version.F90 Deleted (functionality in tutorial/demo.F90)
fortran/test/fetch_content_integration/CMakeLists.txt Refactored to use shared test sources from integration directory
docker/Dockerfile.fetch-content New multi-stage Dockerfile supporting GCC, Intel, and NVHPC compilers
docker/Dockerfile.fortran-gcc Deleted (consolidated into Dockerfile.fetch-content)
docker/Dockerfile.fortran-intel Deleted (consolidated into Dockerfile.fetch-content)
docker/Dockerfile.fortran-nvhpc Deleted (consolidated into Dockerfile.fetch-content)
docker/Dockerfile.fortran-gcc.integration Modified to remove -j parallelism flag and memcheck option
docker/README.md New documentation for Docker build process and multi-stage builds
.github/workflows/docker.yml Consolidated fetch_content tests into docker.yml and added multi-compiler testing
.github/workflows/fetch_content_integration.yml Deleted (merged into docker.yml)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@K20shores K20shores merged commit c259e95 into main Jan 9, 2026
43 of 44 checks passed
@K20shores K20shores deleted the refactor_tuvx_tests branch January 9, 2026 20:37
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.

4 participants