Skip to content

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

License

Notifications You must be signed in to change notification settings

precice/adapter-schema

Repository files navigation

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 precice-adapter-schema

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

About

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

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •  

Languages