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

Improvements to regression test python scripts #1222

Merged
merged 7 commits into from
Aug 24, 2022

Conversation

bjonkman
Copy link
Contributor

Feature or improvement description
After using the manual regression test python scripts for debugging recent HydroDyn module changes, I made the following improvements to the scripts:

  • The data files for the HydroDyn test cases that are stored in the glue-code regression tests are now copied in the module-level python script. Previously it seemed to assume that you ran the glue-code regression tests first.
  • The HTML file summarizing the results now contains the completion code (non-zero if the simulation did not run to completion) and a link to the .log file with the screen output generated when the case ran. This is helpful with debugging, particularly if a case did not complete.
  • When the baseline data file contains a different number of columns or time steps than the test data, the differences are now shown as NaN instead of causing a fatal error in the Python script.
  • There was a missing variable in executePythonRegressionCase.py that has now been fixed.
  • When the scripts attempted to read ASCII files, it printed many blank lines to the screen (one for every line in the output file?). That has now been removed.
  • The manualRegressionTest.py script has been modified to allow it to also execute module driver regression tests (not just the openfast reg tests):
    • There is now a -module flag to allow the user to specify a particular module to run (e.g. -module=hydrodyn or -module=Inflowwind).
    • If you use the documented syntax without the -module flag, it will work as before with openfast regression tests.
  • On my system (and maybe all others), specifying -p wouldn't generate plots but -p=true would. I updated the arguments to allow the -p option to work, too.

Impacted areas of the software
regression test scripts: mostly the manual tests

Additional supporting information
These changes have been incorporated into #1008, but I'm pulling them into a separate PR so they could theoretically get incorporated into the OpenFAST/dev branch sooner.

Test results, if applicable
This shouldn't change any regression test results, but the screen output may have fewer blank lines.

- Copy input files needed for HydroDyn test cases (some files are stored in the glue-codes directory, so it will error if module is tested before glue-code is)
- Return the completion code if a simulation did not run to the end (as opposed to comparing old results with no clear indication that the results are old)
- fix missing variable in `executePythonRegressionCase.py`
- if test_data and baseline_data are not the same size, return NaNs. We don't currently have a way to test if any of the columns are the same.
- summary HTML file now contains columns for `Completion Code` and a link to the `.log` file containing screen output when the case ran (helpful for debugging)
- fixed the issue where a blank line was printed to the screen for every line read in a ascii output file
- fixed issue where specifying `-p` wouldn't generate plots but `-p=true` would (at least on my system)
- make source directory an absolute path to fix issue when scripts to run module drivers change the working directory
- add a `-module` optional argument to `manualRegressionTest.py` to allow it to execute the driver regression tests
@andrew-platt andrew-platt changed the base branch from dev to main August 23, 2022 17:09
@andrew-platt andrew-platt changed the base branch from main to dev August 23, 2022 17:09
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.

3 participants