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

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.4.0.tar.gz (54.6 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.4.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for powerconf-0.4.0.tar.gz
Algorithm Hash digest
SHA256 eb37c8ad6bead87e094b51a311da2fe5c64e50bd6a22a948eec2594ff5e106c5
MD5 46106b01828ccfae123977055d9c9448
BLAKE2b-256 59515606b11729a70b1131e2aad9f66cb1747d3b9b64047e1702275958d36b53

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for powerconf-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57b770e4b878b817fedf2e795131b209e7f622c82e0753b0e5fe3bbe439503f4
MD5 da02dcedf3dbcc3fa869974991fd9d69
BLAKE2b-256 50eca1c32975e9dbaa13adadb895d68ab1d61c788de8e996acf51654af3fe21b

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