Skip to main content

Validation utility for preCICE adapter configurations

Project description

preCICE Adapter Schema

Here the adapter configuration schema is stored, together with validation utility.

A schema ...

  • defines how a configuration file looks like (thus replaces any explicit documentation).
  • enables interoperability (through standardization).
  • simplifies auto-generation.
  • enables tooling support (e.g. IDEs or GUIs).
  • enables automatic LLM-based conversion from and to other configuration languages.
  • ...

Installation

Install the package using pip:

pip install preciceadapterschema

For development, install in editable mode:

pip install -e .

Usage

The preciceadapterschema package provides a validate function to validate preCICE adapter configurations against the JSON schema.

import preciceadapterschema

# Your configuration data
config_data = {
}

# Validate the configuration
try:
    preciceadapterschema.validate(config_data)
    print("Configuration is valid!")
except Exception as e:
    print(f"Validation failed: {e}")

The schema file (precice_adapter_config.schema.json) is included in the package and loaded automatically by the validate function.

Configuring preCICE Adapters

We recommend using MetaConfigurator to create and edit preCICE adapter configurations. It provides a user-friendly interface and ensures that your configurations are always valid according to the schema.

Development

Running Tests

Run tests using unittest:

python -m unittest discover -s tests -v

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_adapter_schema-0.4.1.tar.gz (5.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_adapter_schema-0.4.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file precice_adapter_schema-0.4.1.tar.gz.

File metadata

  • Download URL: precice_adapter_schema-0.4.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for precice_adapter_schema-0.4.1.tar.gz
Algorithm Hash digest
SHA256 9c2dfb2426e9136b2f66806c3a5e3cb5273a63a86865be95905a387a038c679f
MD5 f35601d7f3e06deb994e6b3352009c45
BLAKE2b-256 bd2039a7df543e52b77eaf38163467cab598957c1b2ee22d6f93146084521b60

See more details on using hashes here.

Provenance

The following attestation bundles were made for precice_adapter_schema-0.4.1.tar.gz:

Publisher: release.yml on precice/adapter-schema

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file precice_adapter_schema-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for precice_adapter_schema-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c465505125602a851a45d434e83a019b80c2696ffca98d8287155a93362faf5
MD5 03fa75d7a6597b4e581fb52a24a982d9
BLAKE2b-256 bad6592044c2e9e35b3801e395d0d75aebb00a392a245b4d40833ecc355bcdbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for precice_adapter_schema-0.4.1-py3-none-any.whl:

Publisher: release.yml on precice/adapter-schema

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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