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 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.1.3.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

powerconf-0.1.3-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: powerconf-0.1.3.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for powerconf-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e635b5d5a47c0488a5a706bf751ccbb6d0489c68882813e450328841dfebaba1
MD5 d51f7dc56d37cf6a32c5378e0d333bee
BLAKE2b-256 8269add333dcfa1243de9eca31be8fbc1ea2f99dbce5888eec707aab5e6993ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: powerconf-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for powerconf-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2165c3212ed36bb5229efc514c75eabf9d4d43003d8baf159a127683bca67642
MD5 5bd91b23113977230e658b7a58e9a164
BLAKE2b-256 cb1e7f7024d4357435244e8665dc4d22c6e87f2ab724b1f464c6eb4ff9426da1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page