A System for Managing DUNE Parameters
What is this?
The dune-params
package provides the Python module dune.params
and a command line interface program called dune-params
. It provides a way to organize a set of fundamental parameters maintained in a spread sheet (following a particular schema) and derived parameters implemented as simple python code in order to generate output reports driven by (jinja2) templates.
More information can be found in the dune-params manual.
Installation
The dune-params
package is available from PyPI and so it is very easy to install. There are many ways to do this but it is recommended to install to a virtualenv.
$ virtualenv venv $ source venv/bin/activate $ pip install dune-params $ dune-params
Usage
See the manual to understand how dune-params
works. It can be used as a Python module or through its command line interface.
$ dune-params render [-r renderer] [-f my.filter.module.function] -t mytemplate -o myreport myparams.xls
Development
You may supply new render or filter modules of your own without needing to modify dune-params
directly. These module codes simply need to be accessible in the usual Python path.
If you wish to develop dune-params
directly, here is how to prepare a development environment. Again, it’s recommended that you work in a virtualenv.
$ virtualenv venv $ source venv/bin/activate $ git clone git remote add origin git@github.com:DUNE/dune-params.git $ cd dune-params $ python setup.py sdist $ pip install --upgrade dist/dune-params-X.Y.Z.tar.gz $ dune-params [...]
As you edit the code, repeat the pip install
command.