thouska / spotpy

A Statistical Parameter Optimization Tool
https://spotpy.readthedocs.io/en/latest/
MIT License
254 stars 152 forks source link

A command line interface for spotpy #174

Closed philippkraft closed 6 years ago

philippkraft commented 6 years ago

This PR supersedes mainly #143, but contains also some older changes for the MPI parallelization (sorry for the mix up) and the presentation of describe as html in the browser. Documentation for the command line interface is still missing. Usage in code can be seen in examples/cli_cmf_lumped and usage from the command line is shown by the help

python cli_cmf_lumped.py --help

Invocation of a 100 Monte Carlo runs:

python cli_cmf_lumped.py run -n 100 --sampler mc --dbformat csv --dbname montecarloruns

The cli module is not imported automatically with spotpy to keep the click dependency optional. The cli supports also the use of environmental variables, like SPOTPY_RUNS or SPOTPY_DBFORMAT. A third option is to use a configuration file spotpy.conf.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 564


Changes Missing Coverage Covered Lines Changed/Added Lines %
spotpy/unittests/test_cli.py 35 36 97.22%
spotpy/parallel/mproc.py 6 8 75.0%
spotpy/parallel/mpi.py 0 3 0.0%
spotpy/parallel/umproc.py 0 6 0.0%
spotpy/cli.py 46 53 86.79%
<!-- Total: 88 107 82.24% -->
Files with Coverage Reduction New Missed Lines %
spotpy/parallel/umproc.py 1 0.0%
spotpy/algorithms/mle.py 1 91.84%
spotpy/algorithms/sa.py 1 82.86%
spotpy/algorithms/abc.py 1 88.79%
spotpy/algorithms/demcz.py 1 91.35%
spotpy/parallel/mpi.py 2 0.0%
spotpy/algorithms/rope.py 3 90.0%
<!-- Total: 10 -->
Totals Coverage Status
Change from base Build 561: -1.4%
Covered Lines: 4544
Relevant Lines: 5073

💛 - Coveralls