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.2.0.tar.gz (17.2 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.2.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for powerconf-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6aee79965bbd7359889a838faa161b650b9be59e2524d7736109301a7a68268c
MD5 2b42295ff1e60416e64fc63979f756fb
BLAKE2b-256 606288eb084c3083a155caf62e5b459a82bb775192c88df50777510b9f882f95

See more details on using hashes here.

File details

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

File metadata

  • Download URL: powerconf-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42f96289c76aab548169fd57afc4f9daa21d2bce6149070afafec4832f799068
MD5 38bb5ee171f1022249a484f3bdcffb9b
BLAKE2b-256 87cf498f0f963dc18c430ed581d8cb5639731fc1aa790f023d08984ec478088a

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