-
Notifications
You must be signed in to change notification settings - Fork 117
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
refactor: simplify autotest framework #1464
Conversation
autotest/common_regression.py
Outdated
@@ -160,15 +161,15 @@ def setup_comparison(namefile, dst, remove_existing=True): | |||
print("Could not make " + dst) | |||
# clean directory | |||
else: | |||
print(f"cleaning...{dst}") | |||
print("Cleaning ", dst) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change is fine but I am wondering if there is a reason to move away from f-strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to use f-strings consistently and wrap paths with single quotes e.g. Cleaning 'some/folder'
as it's a bit easier to read
autotest/common_regression.py
Outdated
# Possible comparison - the order matters | ||
optcomp = ( | ||
"compare", | ||
OPTCOMP = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the change to uppercase for defined data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to move this to a top-level variable so other modules could import it, will do so if you agree
edit: done and renamed to COMPARE_PATTERNS
* fold TestSimulation into TestFramework class * rename simpath -> workspace * rename build_func -> build * rename exfunc -> check * rename exe_dict -> targets * support pathlib.Path throughout * steps toward unifying framework function signature
…avor of enumeration for simpler external API, still kluged internally
* feat(GWE): Introduce Groundwater Energy Transport * fix typo in meson file * fix a formating issue that was popping up in an MST autotest * some legacy line leftover from a botched rebase, possibly * Need update initial autotest to conform to new autotest standards adopted with #1464 * Start looking for post-rebase breakages * Get gwfgwe and gwegwe exchanges up-to-date based on #1505 * Code that had been moved to set_active_status in FMI was still present in fmi_fc(). Removing. * Forgot to remove unused variables after making changes in 4d76729 * Adding another autotest specific to GWE * Adding another autotest after getting it #1464 compliant * Compliantizing another new autotest with PR #1464 * Fixes in response to #1493 (comment) * Fix in response to #1493 (comment) * Rerunning black in response to #1493 (comment) * Fix in response to #1493 (comment) * Made changes to dfn files in response to #1493 (comment) and #1493 (comment) and reran mf6ivar.py, which updated the tex files in this commit * Fix in response to #1493 (comment) * remove unnecessary line of script * Add missing lines to ConnectionBuilder.f90 related to GWE * Add a GWE vs GWT comparison autotest * GWE-GWE exchanges now working. Other clean-up for code uniformity * Rebrand constant temperature package acronym to CTP * Missed an import renaming update * Forgot to remove a now obsolete file due to renaming. * Rebrand energy storage and transfer package acronym to EST * Forgot to remove a now obsolete file due to renaming (again) * Rebrand gwe dispersion package acronym to CND (conduction) since that is the dominant process in heat transport * Remove gwe-related code from generalized transport code (tsp1.f90 & tsp1ssm1.f90) * add single-cell test for energy source loading (ESL) package * Adding energy source loading (ESL) package * remove unused variable * fprettify * Add another ESL autotest * Adding another autotest that compares gwe to three different analytical solutions from Carslaw & Jaeger (1947) * Bringing over Stallman autotest from previous GWE PR (#1237) * Adding streamflow energy transport (SFE) package * Add autotest for SFE * Adding lake energy transport (LKE) package. Includes new autotest * forgot meson update * Adding multi-aquifer well energy transport (MWE) package. Includes new autotest * Adding unsaturated-zone energy transport (UZE) package. Includes 2 new autotests * Attempting to reapply a failing autotest. Unable to discern why it is failing as downloaded contents from its failure are working locally. * removing troublesome autotest. Downloaded contents from failed run on Actions doesn't yield the same output that the logs are reporting. This particular autotest has an analytical solution (and a plot) that might be better shown on the modflow6-examples repo anyway * Removing a file that shouldn't have been added (snuck in among other staged files) * Update release notes
Changes include
TestSimulation
intoTestFramework
simpath
->workspace
build_function
->build
(and inject in__init__
)exfunc
->check
exe_dict
->targets
require_failure
->xfail
action
->compare
run_comparison
,make_comparison
,mf6_regression
intocompare
(optional str), accepts:run_comparison=True and make_comparison=False
mf6_regression=True
None
disables comparisonbuild_models
creates modelscheck_output
checks resultsidxsim
and just use lambda ifbuild_models()
needs a test case indexpathlib.Path
orstr
pathscommon_regression.py
pytest-cases
from tests and as a test dependencyconftest.py
from test: require dev exes, warn/skip if download/rebuilt not found #1460Merge considerations
environment.yml
to specify this)Future directions