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

Updates MVK test to be configured through testmod #4618

Open
wants to merge 48 commits into
base: master
Choose a base branch
from

Conversation

jasonb5
Copy link
Collaborator

@jasonb5 jasonb5 commented Apr 20, 2024

Updates MVK systemtest to be configure through a testmod. Add a
param.py file in the testmod directory. Running python -c "from CIME.SystemTests.mvk import MVKConfig; MVKConfig().print_rst_table()
will print out documentation for the settings/functions.

Test suite: n/a
Test baseline: n/a
Test namelist changes: n/a
Test status: n/a

Fixes #4592
User interface changes?:
Update gh-pages html (Y/N)?:

@jasonb5
Copy link
Collaborator Author

jasonb5 commented Apr 20, 2024

TODO:

  • Write documentation
  • Refactor discovery usermods/testmods directory.

@rljacob rljacob requested a review from mkstratos April 20, 2024 17:19
Copy link
Contributor

You can preview documentation at https://esmci.github.io/cime/branch/update-mvk-config/html/index.html

@jasonb5
Copy link
Collaborator Author

jasonb5 commented May 16, 2024

@jasonb5 jasonb5 marked this pull request as ready for review June 14, 2024 00:38
@rljacob
Copy link
Member

rljacob commented Jun 19, 2024

@mkstratos please review.

Copy link
Collaborator

@mkstratos mkstratos left a comment

Choose a reason for hiding this comment

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

I was able to run a default MVK test, and a modified MVK test with testmod capability, and it looks great! I just have a few minor comments (mostly due to undocumented changes to EVV).

)
self._set_attribute("ninst", 30, "The number of instances.")
self._set_attribute(
"critical", 13, "The critical value for rejecting the null hypothese."
Copy link
Collaborator

Choose a reason for hiding this comment

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

EVV no longer needs this as of v0.5.0, (implemented false discovery rate correction), but that's my fault as it's not fully documented! It won't cause an error, but it isn't used by evv's ks.py

evv_lib_dir = os.path.abspath(os.path.dirname(evv4esm.__file__))
version = evv4esm.__version_info__

assert version[0] <= 0 and version[1] <= 5, "Please install evv4esm less than 0.5.x"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This would need updating each time there's a new EVV version, maybe this should be a lower bound instead, all the changes are compatible with evv4esm >= 0.5.0

set_nml_variable("seed_custom", f"{iinst}")
set_nml_variable("seed_clock", ".true.")

def test_config(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this instead be called test_config_evv? That way it's clear that this method is for creating the configuration to be passed to evv4esm?

component str The main component.
components [] list Components that require namelist customization.
ninst 30 int The number of instances.
critical 13 int The critical value for rejecting the null hypothese.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as on mvk.py, just that I didn't document this (yet!).

@jasonb5
Copy link
Collaborator Author

jasonb5 commented Jul 11, 2024

@mkstratos Thanks for the feedback, it looks great.
I have the remaining requirements to support EAMxx, I'll have implemented shortly and we move forward with the PR.

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.

Feature: Parameters for SystemTests
3 participants