Skip to content

Move unit tests out of mpas_tools#636

Merged
xylar merged 2 commits into
MPAS-Dev:masterfrom
xylar:update-unit-tests
May 29, 2025
Merged

Move unit tests out of mpas_tools#636
xylar merged 2 commits into
MPAS-Dev:masterfrom
xylar:update-unit-tests

Conversation

@xylar

@xylar xylar commented May 29, 2025

Copy link
Copy Markdown
Collaborator

This pull request involves significant cleanup and restructuring of the testing framework for the conda_package, as well as improvements to code readability and maintainability. The most important changes include renaming and reorganizing test files, replacing hardcoded file paths with utility functions, and updating string formatting to use f-strings for better readability.

Test Framework Restructuring:

  • Renaming and reorganizing test files: All test files under conda_package/mpas_tools/tests/ have been moved to conda_package/tests/ to streamline the directory structure. Corresponding imports and references have been updated.

  • Replacing hardcoded file paths with utility functions: Hardcoded paths for test data files (e.g., mesh_tools/mesh_conversion_tools/test/mesh.QU.1920km.151026.nc) have been replaced with calls to get_test_data_file() to improve flexibility and maintainability.

Code Readability Improvements:

  • Switching to f-strings for string formatting: Legacy string formatting (e.g., .format()) has been replaced with f-strings across multiple test files for better readability and consistency.

  • Reorganizing imports: Imports have been reordered and grouped logically to improve clarity in test files.

Documentation Updates:

  • Removal of outdated references in documentation: References to tests in the documentation (conda_package/docs/api.rst and conda_package/docs/cime.rst) have been removed or updated to reflect the new structure.

@xylar xylar self-assigned this May 29, 2025
@xylar xylar marked this pull request as ready for review May 29, 2025 09:20
@xylar xylar merged commit 9d0fe85 into MPAS-Dev:master May 29, 2025
6 checks passed
@xylar xylar deleted the update-unit-tests branch May 29, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant