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.3.0.tar.gz (20.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.3.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for powerconf-0.3.0.tar.gz
Algorithm Hash digest
SHA256 736f7f200bbe70768cd33ff62c3e306f6de07798bf78e64f5daa06b0c80f5c18
MD5 a385841e87a1ad50dc069e5f422c23d0
BLAKE2b-256 6d9618a3cb22bb9d8914f757494f0e0082f7fa220389ef10e738e14705658b6d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: powerconf-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f77380b7467272b330a283489dddef1d6e27377c21ec0e26eac6126f3c246fb
MD5 e18c0d313d735a3c63ec034ed9cd0d92
BLAKE2b-256 c811c9eea1081626a1d6251889a6ce3edd86779d402d115c10544c88a018f0a1

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