Skip to content

Testing Framework Update#1519

Open
adrifoster wants to merge 57 commits intoNGEET:mainfrom
adrifoster:directory_update
Open

Testing Framework Update#1519
adrifoster wants to merge 57 commits intoNGEET:mainfrom
adrifoster:directory_update

Conversation

@adrifoster
Copy link
Contributor

@adrifoster adrifoster commented Dec 23, 2025

Provides an update to the testing directory and framework. Now makes use of more classes and an OOP style.

Resolves issue #1515

Also converts our math_utils functional test into a robust suite of unit tests, as this made more sense for what we were trying to do with the test.

Description:

Created a new directory structure for the testing directory:

  • tests/ - where the actual tests live
  • framework/ - the python code for the testing framework to create, build, and run tests
  • config/ - config files where tests are defined
  • templates/ - template files for new test generation
  • docs/ - any documentation
  • generate_empty_tests.py - script to generate boilerplate for new tests (unit or functional)
  • run_functional_tests.py - script to run functional tests
  • run_unit_tests.py - script to run unit tests
  • environment.yml - yml file for testing conda environment creation
  • README.md - updated README file explaining testing framework, how to run, and how to create new tests

The class structure for the unit and functional tests was overhauled to be more modular and more OOP, but the interaction with the script (./run_functional_tests -t test_name) is identical to before.

Collaborators:

@billsacks @ekluzek

Expectation of Answer Changes:

None

Checklist

Contributor

  • The in-code documentation has been updated with descriptive comments
  • The documentation has been assessed to determine if updates are necessary

Integrator

  • FATES PASS/FAIL regression tests were run
  • Evaluation of test results for answer changes was performed and results provided
  • FATES-CLM6 Code Freeze: satellite phenology regression tests are b4b

Test Results:

CTSM (or) E3SM (specify which) test hash-tag: ctsm5.3.054

CTSM (or) E3SM (specify which) baseline hash-tag: ctsm5.3.054

FATES baseline hash-tag: sci.1.88.3_api.42.0.0

Test Output:

add_subdirectory(functional_testing/fire/ros fates_ros_ftest)
add_subdirectory(functional_testing/patch fates_patch_ftest)
add_subdirectory(functional_testing/fire/mortality fates_firemort_ftest)
add_subdirectory(tests/functional/allometry fates_allom_ftest)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@rgknox
Copy link
Contributor

rgknox commented Dec 31, 2025

@adrifoster , if there is not one already, is there a place we can add a check for > python 3.12 ?

import sys

# Check for Python 3.12 or higher
if sys.version_info < (3, 12):
    sys.exit(f"Error: Python 3.12+ is required. You are using {sys.version}.")

@adrifoster
Copy link
Contributor Author

@adrifoster , if there is not one already, is there a place we can add a check for > python 3.12 ?

import sys

# Check for Python 3.12 or higher
if sys.version_info < (3, 12):
    sys.exit(f"Error: Python 3.12+ is required. You are using {sys.version}.")

ah yes good idea. I can add that.

@glemieux glemieux moved this from Finding Reviewers to Under Review in FATES Pull Request Planning and Status Jan 5, 2026
@glemieux
Copy link
Contributor

glemieux commented Feb 5, 2026

Waiting for derecho account to be topped up before running minimal test set to check the FatesUtilMod update. Otherwise this is ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Under Review

Development

Successfully merging this pull request may close these issues.

3 participants