uclchem.advanced.generate_metadata ================================== .. py:module:: uclchem.advanced.generate_metadata .. autoapi-nested-parse:: Utility to regenerate the ``fortran_parameters`` section of ``fortran_metadata.yaml``. Parses all Fortran source files in ``src/fortran_src/`` and extracts module-scope ``PARAMETER`` declarations, then writes the result back into the YAML file. The ``internal_parameters`` and ``file_path_parameters`` sections are left untouched as they require manual curation. Usage:: uclchem-generate-metadata # update YAML in-place uclchem-generate-metadata --dry-run # print diff, do not write uclchem-generate-metadata --check # exit 1 if YAML would change (CI use) Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: uclchem.advanced.generate_metadata.main uclchem.advanced.generate_metadata.parse_fortran_parameters .. py:function:: main(argv: list[str] | None = None) -> None Entry point for ``uclchem-generate-metadata``. .. py:function:: parse_fortran_parameters(src_dir: pathlib.Path) -> dict[str, list[str]] Parse all ``.f90`` files in *src_dir* and return module-scope PARAMETERs. Handles Fortran continuation lines (ending with ``&`` and starting next line with ``&``). :param src_dir: Path to the directory containing Fortran source files. :type src_dir: Path :returns: Mapping of f2py module name (lowercase) to sorted list of PARAMETER names. :rtype: dict[str, list[str]]