Skip to content

[bin][parameter] Implement new parameter extraction scripts

Timo Koch requested to merge feature/paramlist-separate-formatting-and-data into master

Manual inputs are provided via a human-readable JSON file which is under version control. The parameters.txt file is now completely auto-generated and shouldn't be manually edited. All edits happen to the JSON file. This makes sure formatting and data are separated properly and git changes are minimal.

Fixes #959 (closed).

The script extracts the parameters from header files. Per default header files in test and examples are excluded (user-defined parameters).

The file parameters.json in doc/doxygen/extradoc is used as the default input. The script will take the explanation, default value, and param type of a detected parameter from the input if given. Otherwise, it tries to automatically choose a value. Hence, if the automatic output is not good for some reason, write the best version into parameters.json. Only ever modify parameters.json since parameters.txt is auto-generated by the script.

In the JSON file, one can define multiple default values for certain parameters. In this case, all different values will be listed in the output file.

Parameters that are not found in code but exist in the input file will be added to the output.

Usage: ./ (cwd = dumux/bin/doc)

After the execution, information will be written in a log file such as

  • the code where parameters can not be correctly extracted
  • for the parameters with multi entries, all the values are listed. And the default value will be marked with source (input or code)
  • added parameters, which may be manually added in the JSON file
  • the list of parameters without explanations

Merge request reports