No project description provided
Project description
preCICE Config Checker
A library that checks a preCICE configuration file for logical errors.
How does this differ from precice-tools check? This checker only checks the configuration for logical errors.
[!NOTE] This checker assumes that
precice-tools checkhas already been executed without an error on the configuration file.
Otherwise, the behavior of this checker is undefined.
Requirements
- Python 3.10
- Pip
- Git for cloning the repository
- precice-config-graph Library. This will be installed during the Installation step below.
Installation
- Clone this repository:
git clone https://github.com/precice/config-check
cd config-check
- Create a new Python Virtual Environment (optional, but recommended):
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install required dependencies:
pip install .
You need to force re-install the precice_config_graph-dependency on new versions, since it is downloaded directly from GitHub. To do so, run:
pip install --ignore-installed .
Project Structure
config-check
├── .github, .idea, etc…
│
├── docs # Documentation on rules and the inner workings of this checker
│ └── ...
│
├── preciceconfigcheck # Main library files
│ ├── rules # All rules that are checked by this utility
│ │ ├── ...
│ │ └── examples # Exemplary implementations of rules to test output format
│ │ └── ...
│ │
│ ├── tests # Configuration files to test rules
│ │ └── ...
│ │
│ ├── cli.py # Main entrypoint for this checker
│ ├── color.py # Definition of colors for CLI output
│ ├── rule.py # Class of a rule and logic to check all rules
│ ├── rules_processing.py # Processes rules and handles output
│ ├── rules_utils.py # Utility functions for rules
│ ├── severity.py # Enum for specifying severity of output
│ └── violation.py # Class of a violation
│
│
├── .gitignore, LICENSE, README.md
│
├── pyproject.toml # Project configuration (dependencies etc.)
└── shell.nix # Dependencies for anyone using NixOS / the nix-package manager. Should be replaced by a flake in the future.
Checking a preCICE config
To check a preCICE configuration file for logical errors, run the following within the root of this repository:
python -m preciceconfigcheck.cli "path/to/precice-config.xml"
If you want more information about the checks that were performed and their results, use
python -m preciceconfigcheck.cli "path/to/precice-config.xml" --debug
Suggesting new Rules
We are always open to suggestions for new rules. When encountering a logical error that does not already get reviewed by our checker, please create a new issue on our GitHub repository and:
- Check that the problem is not already under development (marked with
TODOin docs/Rules.md) - Explain the problem:
- What exactly is the problem?
- Why is it a problem?
- Are there cases when this setup is valid?
- Please also provide a
precice-config.xmlfile with the error you described and one with a fix of how it should be
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file precice_config_check-1.0.0.tar.gz.
File metadata
- Download URL: precice_config_check-1.0.0.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89113357ee45a264a23e40609358131fd275a69219171a6e700dfaccd32ca516
|
|
| MD5 |
f2d87dde2cae28b4e4264dccb36fab9a
|
|
| BLAKE2b-256 |
9a27f0fdb4da8631a86a5fa7ab42a88da752b2e788bb567ca0521da20f559acc
|
Provenance
The following attestation bundles were made for precice_config_check-1.0.0.tar.gz:
Publisher:
release.yml on precice/config-check
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
precice_config_check-1.0.0.tar.gz -
Subject digest:
89113357ee45a264a23e40609358131fd275a69219171a6e700dfaccd32ca516 - Sigstore transparency entry: 257621261
- Sigstore integration time:
-
Permalink:
precice/config-check@de10deea34326dedf0f97e49da84d8b1fc4577c2 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/precice
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@de10deea34326dedf0f97e49da84d8b1fc4577c2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file precice_config_check-1.0.0-py3-none-any.whl.
File metadata
- Download URL: precice_config_check-1.0.0-py3-none-any.whl
- Upload date:
- Size: 33.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c32d09be32b5fc6c366ab47c09803f2a89710f4326c559f70c8059fa2c0a6006
|
|
| MD5 |
8e0be6f02454a2af980da426c4f3b2bc
|
|
| BLAKE2b-256 |
c3ec7514de57ce46b628b3448f8a064963786e04dbb19d62473dc8144d19e1ba
|
Provenance
The following attestation bundles were made for precice_config_check-1.0.0-py3-none-any.whl:
Publisher:
release.yml on precice/config-check
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
precice_config_check-1.0.0-py3-none-any.whl -
Subject digest:
c32d09be32b5fc6c366ab47c09803f2a89710f4326c559f70c8059fa2c0a6006 - Sigstore transparency entry: 257621263
- Sigstore integration time:
-
Permalink:
precice/config-check@de10deea34326dedf0f97e49da84d8b1fc4577c2 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/precice
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@de10deea34326dedf0f97e49da84d8b1fc4577c2 -
Trigger Event:
push
-
Statement type: