Skip to main content

Powerup you configuration files.

Project description

powerconf

Powerful configuration tools for numerical simulation.

powerconf allows you to write configuration files for things like physics simulations with support for variable interpolation and expression evaluation. Consider a simulation that will solve some partial differential equation on a 2-dimensional Cartesian grid. Perhaps the simulation itself requires us to set the min and max range and the number of points to use along each axis. A simple YAML configuration for the simulation might look something like this

grid:
    x:
        min: 0 cm
        max: 1.5 cm
        N: 151
    y:
        min: 0 cm
        max: 1.0 cm
        N: 101

This is fine, but it might be useful to specify the resolution to use instead of the number of points. With powerconf, we can write a configuration file that looks like this

grid:
    resolution: 1 um
    x:
        min: 0 cm
        max: 1.5 cm
        N: $( (${max} - ${min})/${../resolution} + 1)
    y:
        min: 0 cm
        max: 1.0 cm
        N: $( (${max} - ${min})/${../resolution} + 1)

In this example, we give a resolution to use for both x and y directions and then calculate the number of points to use with an expression. Note the relative paths to configuration parameters used in the expressions. powerconf uses the fspathtree module to provide filesystem-like access to elements in a nested dict.

Install

Install with pip

$ pip install powerconf

Examples

See the doc/examples folder for examples of how to use the powerconf command and python module.

render command example

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

powerconf-0.5.0.tar.gz (60.3 kB view details)

Uploaded Source

Built Distribution

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

powerconf-0.5.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file powerconf-0.5.0.tar.gz.

File metadata

  • Download URL: powerconf-0.5.0.tar.gz
  • Upload date:
  • Size: 60.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for powerconf-0.5.0.tar.gz
Algorithm Hash digest
SHA256 095c6884281a83018f9ccdb409f631a610df8613d6424abf195bc00aad85fa97
MD5 dded5ea7341d7052bfed5683aa334063
BLAKE2b-256 4ad30d9c281c0ad4f0e233e0fd1a80074b11ff5734c5ab6f019d3a1ec254e306

See more details on using hashes here.

File details

Details for the file powerconf-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: powerconf-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for powerconf-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec7e7bebc9de08740ff886845cf359085dea7a488171ee3c78e0a9a2cc7056a4
MD5 d325df97d5a5e2f64326e3ea5e6fbc2b
BLAKE2b-256 1a677c2103cb91aedc94dd263b63671c9ce86b0af1af5fdfdb4a5fb3360fb081

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