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

Reference

Expressions

References

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for powerconf-0.6.0.tar.gz
Algorithm Hash digest
SHA256 cf96a6457b9d2ac6f5f02d887df786cb3ed58a0c25746479ff6798a26ca947d4
MD5 4ff2fbae829ddc5936cf2e8a1e734b3d
BLAKE2b-256 4b0d018d0f2fc0db9f4cd2eba0a03c4b9e6077485c76c9c705e0e9e345289684

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for powerconf-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81261c6b66886f68b5c2f5e348cdc0f691e521bf3406c08f573a081988a84266
MD5 536b873980d169ad08f11ca6a9e04820
BLAKE2b-256 fbb3a5e8ec4b6eac5419f7890228b3c741cbae8d64e3411b0d0ca3878702ec19

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