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.7.0.tar.gz (70.9 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.7.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for powerconf-0.7.0.tar.gz
Algorithm Hash digest
SHA256 bdd2b72d09bbce1c2038524fe5a186951d088c5e78429e929106ff7c6ab454bf
MD5 0ffc129d88a8d0874b53ffdae33e3e72
BLAKE2b-256 f1c8dc4863eb5e55ae292fedbe16286c9911f56af5ed5011b178088213f25784

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for powerconf-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58d73f7fdcba834962e1b89a434d827e840d23e16e0e9e1a793d0ce35578f95f
MD5 70bc14cc6412cd4c37e2ced1bba20336
BLAKE2b-256 e09cb583a7aa468fa8f248f5cbeacfc8472fd9bf033079998be4a9b86aea3e42

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