ukaea / PROCESS

PROCESS is a systems code at UKAEA that calculates in a self-consistent manner the parameters of a fusion power plant with a specified performance, ensuring that its operating limits are not violated, and with the option to optimise to a given function of these parameters.
https://ukaea.github.io/PROCESS/
MIT License
26 stars 11 forks source link

Warning for variables missing in regression test #3229

Open timothy-nunn opened 1 week ago

timothy-nunn commented 1 week ago

At present, the regression tests make the following assertions:

  1. Assert that an MFile exists
  2. Assert that the MFile contains some text
  3. Assert that the ifail value indicates success
  4. Assert there are no differences
  5. Assert that the new MFile contains all of the variables present in the reference MFile
  6. Assert that the reference MFile contains all of the variables present in the new MFile

Via these 6 assertions, a test failure indicates if an MFile has changed due to the changes on a branch. However, the final 3 assertions contain information that could be useful for a converged MFile. However, for example, if assertion 4 failed, the reviewer has no way of knowing if conditions 5 or 6 were met.

I propose that we warn before assertion 4 about assertions 5 and 6 (ie warn the reviewer if the MFiles contain different variables). That way, the reviewer gets the information from assertions 5 and 6 even if the test fails before there.

Note #3227 will stop these warnings being swamped by debug logs.