config-format is a tool meant to format preCICE configurations consistently. A uniform order simplifies cooperation debugging.
Install directly from PyPi using pipx or via pip:
pipx install precice-config-formatTo format one or more preCICE configuration files in-place:
precice-config-format FILE ...The script returns with exit code 0 on success, 1 on error, and 2 if a file was modified.
To use this script as a pre-commit hook select a tag and add:
- repo: https://github.com/precice/config-format
rev: '' # Use the tag you want to use
hooks:
- id: precice-config-formatTo exclude directories, use exclude:
- repo: https://github.com/precice/config-format
rev: '' # Use the tag you want to use
hooks:
- id: precice-config-format
exclude: '^thridparty' # optionally exclude directories hereThis repository contains a modified version of format_precice_config.py, which was part of the repository precice/precice-pre-commit-hooks.
The copyright holder Frédéric Simonis (@fsimonis [email protected]) decided on 23. June 2025 16:30 CET to rerelease the content of the file format_precice_config.py in this repository under the MIT license.