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
33 stars 11 forks source link

Use Ford instead of autodoc to create dicts #946

Closed jonmaddock closed 1 year ago

jonmaddock commented 4 years ago

Summary

In order to use Ford for documentation and to retire Autodoc, the creation of dictionaries used in the Python utilities needs to stop relying on the Autodoc tags in the Fortran source. These dictionaries need to still be created using Ford documentation comments, once the Autodoc comments are removed.

Modify create_dicts.py to use the Ford project object and Ford comments instead of Autodoc comments to create dicts. create_dicts should create a JSON dict (process_dicts.json) instead of a Python source file. Change global_variables.f90 Autodoc comments to Ford style, so they are picked up by Ford. Change plot_proc.py, in_dat.py, mfile.py and run_process.py to use the new JSON dict file to get these Python utilities working. CI system should now use a fork of Ford that calls create_dicts in Process with the Ford project object as an argument.

The Ford fork runs, and creates the Ford project object using the Fortran source and the Ford-style comments within it. This then calls create_dicts(project) within Process with the project as an argument, which in turn creates a JSON dict inside Process. The Python utilities then use this JSON dict, instead of the previous process_dicts.py, to run.

Checklist

After implementing issue do the following

jonmaddock commented 4 years ago

created branch issue-945-ford_dicts to address this issue

jonmaddock commented 4 years ago

marked the task Run test suite as completed

jonmaddock commented 4 years ago

marked the task Does it change the output? If so, give justifications. as completed

jonmaddock commented 4 years ago

marked the task Does it change the baseline 2019 run? (you may need to run on Freia) as completed

jonmaddock commented 4 years ago

marked the task Run run_process without errors (not on CI system) as completed

jonmaddock commented 4 years ago

marked the task Check that uncertainty quantification utilities still work as completed

jonmaddock commented 4 years ago

marked the task Merge request created as completed

jonmaddock commented 4 years ago

Ford is now being used to create dicts in Process.

jonmaddock commented 4 years ago

closed