- 2022-01-31: Increased robustness of test scripts.
- 2022-01-31: We now use `diff -w` to compare preCICE's output files for regression tests. In preCICE 2.3.0 the white spaces used have changed which broke our regressions tests.
- 2022-01-26: Renamed `dumupreciceindexwrapper.[hh|cc]` to `dumupreciceindexmapper.[hh|cc]` to be consistent with the class name.
- 2022-01-26: Made sure all private member of the adapter are prefixed with an underscore.
parser.add_argument('-c','--command',nargs=1,help='The executable and optional arguments as a single string',required=True)
parser.add_argument('-s','--script',nargs=1,help="The comparison script. [fuzzy, fuzzyData, exact, <path_to_script>] where the script takes two files as arguments.")
parser.add_argument('-f','--files',nargs='+',help="Pairs of file names (first reference, then current). Usage: '[-f ref1 cur1 [[ref2] [cur2] ...]]'")
parser.add_argument('-d','--delimiter',type=str,default=',',help='Column delimiter for data files')
parser.add_argument('-r','--relative',type=float,default=1e-2,help='maximum relative error (default=1e-2) when using fuzzy comparison')
parser.add_argument('-a','--absolute',type=float,default=1.5e-7,help='maximum absolute error (default=1.5e-7) when using fuzzy comparison')
parser.add_argument('-z','--zeroThreshold',type=json.loads,default='{}',help='Thresholds for treating numbers as zero for a parameter as a python dict e.g. {"vel":1e-7,"delP":1.0}')
parser.add_argument(
"-c",
"--command",
nargs=1,
help="The executable and optional arguments as a single string",
required=True,
)
parser.add_argument(
"-s",
"--script",
nargs=1,
help="The comparison script. [fuzzy, fuzzyData, exact, <path_to_script>] where the script takes two files as arguments.",
)
parser.add_argument(
"-f",
"--files",
nargs="+",
help="Pairs of file names (first reference, then current). Usage: '[-f ref1 cur1 [[ref2] [cur2] ...]]'",
)
parser.add_argument(
"-d","--delimiter",type=str,default=",",help="Column delimiter for data files"
)
parser.add_argument(
"-r",
"--relative",
type=float,
default=1e-2,
help="maximum relative error (default=1e-2) when using fuzzy comparison",
)
parser.add_argument(
"-a",
"--absolute",
type=float,
default=1.5e-7,
help="maximum absolute error (default=1.5e-7) when using fuzzy comparison",
)
parser.add_argument(
"-z",
"--zeroThreshold",
type=json.loads,
default="{}",
help='Thresholds for treating numbers as zero for a parameter as a python dict e.g. {"vel":1e-7,"delP":1.0}',
)
args=vars(parser.parse_args())
# check parameters
ifargs['script']:
iflen(args['files'])%2!=0ornotargs['files']:
sys.stderr.write("The files have to be pairs of reference and current solution files. Usage '-f [ref1] [cur1] [[ref2] [cur2] ...]'")
ifargs["script"]:
iflen(args["files"])%2!=0ornotargs["files"]:
sys.stderr.write(
"The files have to be pairs of reference and current solution files. Usage '-f [ref1] [cur1] [[ref2] [cur2] ...]'"
sys.stderr.write("Tried to delete a reference solution. Specify reference file first, then the current solution. Usage: '[-f ref1 cur1 [[ref2] [cur2] ...]]'")