Skip to main content

A tool for consistently formatting a preCICE configuration file.

Project description

preCICE Config-Format

config-format is a tool meant to format preCICE configurations consistently. A uniform order simplifies cooperation debugging.

Installation options

Install directly from PyPi using pipx or via pip:

pipx install precice-config-format

Usage

To 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.

pre-commit hook

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-format

To 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 here

Licensing

This 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 frederic.simonis@ipvs.uni-stuttgart.de) 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

precice_config_format-2.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

precice_config_format-2.0.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file precice_config_format-2.0.0.tar.gz.

File metadata

  • Download URL: precice_config_format-2.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for precice_config_format-2.0.0.tar.gz
Algorithm Hash digest
SHA256 bc70154657c23d65aa9a6e34bd5962eb82d08c3b9ee414d94316c41ca06a3d99
MD5 ce3324839e6727220a450db7b62826c6
BLAKE2b-256 ed77273bde237cdb41976cc2a93a0e56dfdd1af0866b811fb5503537683fc02e

See more details on using hashes here.

File details

Details for the file precice_config_format-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for precice_config_format-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f04309e645afb5f9261cef28b3ff079669ba20327039a6371ddd5631fbf5efd2
MD5 b7d0b1fc11f7703d257cf3e8f05e0f34
BLAKE2b-256 e9dc610306b832be1fac47504bd3686fede4922e6b3091a1f942d6743c40a31f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page