Skip to main content

No project description provided

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

Uploaded Source

Built Distribution

powerconf-0.1.2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: powerconf-0.1.2.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-35-generic

File hashes

Hashes for powerconf-0.1.2.tar.gz
Algorithm Hash digest
SHA256 20a0fdab0ed7f75e92d18745893f039601ff72679eebc97883da1813ba78b6fa
MD5 1b92021b38c9d05423d6fcb78de66965
BLAKE2b-256 a09d2bf60a2aa6bf07d09aafc21a30916fbdc3578ec429ab14bac0f5adda6178

See more details on using hashes here.

File details

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

File metadata

  • Download URL: powerconf-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-35-generic

File hashes

Hashes for powerconf-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d7bdd2dc13ddb88487d83567a6f5a92ea80f016716f9f4bcae2a6ba56b2ffc6
MD5 e8da93dfefba86bec2ddc4ece46a0738
BLAKE2b-256 5bb98577ebd8614166551eb36cea55754633353b2436c2bece16aa631c7e2291

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