You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/documentation/testing.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ It is recommended that a range be specified when generating golden files for new
30
30
**Note:** If you output new variables and want to update the golden files to include these without modifying the original data, use the `--add-new-variables` option instead.
31
31
32
32
Adding a new test case can be done by modifying [cases.py](https://github.com/MFlowCode/MFC/tree/master/toolchain/mfc/test/cases.py).
33
-
The function `generate_cases` is responsible for generating the list of test cases.
33
+
The function `list_cases` is responsible for generating the list of test cases.
34
34
Loops and conditionals are used to vary parameters, whose defaults can be found in the `BASE_CFG` case object within [case.py](https://github.com/MFlowCode/MFC/tree/master/toolchain/mfc/test/case.py).
35
35
The function operates on two variables:
36
36
@@ -54,7 +54,7 @@ where:
54
54
-`params` is the fully resolved case dictionary, as would appear in a Python case input file.
55
55
-`ppn` is the number of processes per node to use when running the case.
56
56
57
-
To illustrate, consider the following excerpt from `generate_cases`:
57
+
To illustrate, consider the following excerpt from `list_cases`:
58
58
59
59
```python
60
60
for weno_order in [3, 5]:
@@ -67,22 +67,22 @@ for weno_order in [3, 5]:
67
67
})
68
68
69
69
ifnot (mp_weno =='T'and weno_order !=5):
70
-
cases.append(create_case(stack, '', {}))
70
+
cases.append(define_case_d(stack, '', {}))
71
71
72
72
stack.pop()
73
73
74
74
stack.pop()
75
75
```
76
76
77
-
When pushing to the stack, or creating a new case with the `create_case` function, you must specify:
77
+
When pushing to the stack, or creating a new case with the `define_case_d` function, you must specify:
78
78
-`stack`: The current stack.
79
79
-`trace`: A human-readable string describing what you are currently varying.
80
80
-`variations`: A Python dictionary with case parameter variations.
81
81
- (Optional) `ppn`: The number of processes per node to use (default is 1).
82
82
83
83
If a trace is empty (that is, the empty string `""`), it will not appear in the final trace, but any case parameter variations associated with it will still be applied.
84
84
85
-
Finally, the case is appended to the `cases` list, which will be returned by the `generate_cases` function.
85
+
Finally, the case is appended to the `cases` list, which will be returned by the `list_cases` function.
run.add_argument("-f", "--flags", metavar="FLAGS", dest="--", nargs=argparse.REMAINDER, type=str, default=[], help="Arguments to forward to the MPI invocation.")
125
125
run.add_argument("-c", "--computer", metavar="COMPUTER", type=str, default="default", help=f"(Batch) Path to a custom submission file template or one of {format_list_to_string(list(get_baked_templates().keys()))}.")
126
126
run.add_argument("-o", "--output-summary", metavar="OUTPUT", type=str, default=None, help="Output file (YAML) for summary.")
127
+
run.add_argument("--clean", action="store_true", default=False, help="Clean the case before running.")
0 commit comments