Skip to main content

A python package to manage your (scientific) model runs, input and output.

Project description

modelmanager

Version number: 0.8

Author: Michel Wortmann, Potsdam Institute of Climate Impact Research, Germany

Overview

A python package to create flexible APIs for (scientific) models.

Dependencies

Modelmanager itself has no dependencies, but some of its plugins do. They will direct you two install them through pip. Python development dependencies are listed in requirements_dev.txt. Before installing the any package (see below) consider setting up a virtual python environment (virtualenv mydevenv).

Installation

To install use pip:

$ pip install modelmanager

Or clone the repo:

$ git clone https://github.com/mwort/modelmanager.git
$ python setup.py install

Concept

The model The modelmanager links with your model like illustrated in this file structure:

modeldir/               # your main model directory
    mm/                 # the modelmanager resource directory
        settings.py     # define or import here all variables, functions and plugins
	      browser/        # this is a plugin directory, e.g. for the browser app

    modelexec           # all your model resources
    input/
    output/

With this setup you can either use your model interface through the commandline or through the python API (see Usage below).

Usage

Initialise project where in your model root directory:

cd home/mymodel
modelmanager init

Add some variables, functions or plugins for your model in mm/settings.py and call them on the commandline like this:

modelmanager example_function --example_argument=2

Or use your new model api in a Python script like this:

import modelmanager as mm

project = mm.Project()
result = project.example_function()

Use the browser app by adding this line to your settings:

from modelmanager.plugins.browser import *

Then start the application on the commandline:

modelmanager startbrowser

Navigate to localhost/admin in your browser.

Contributing

Bug reports, ideas and feature requests welcome on Github.

Testing

Run test in tests/ like this:

make                                # runs all tests
python test_project.py              # just runs test_projects with call stats
python -m unittest test_project.Settings  # just run Settings tests
make clean                          # clean any leftover test output

make should pass before submitting a pull/merge request.

Releasing

  • add entry in CHANGELOG.md
  • change version number in __init__.py and README.md, tag and commit (make version)
  • build sdist and push to git and pypi (make release)

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

model_manager-0.8.tar.gz (45.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

model_manager-0.8-py2.py3-none-any.whl (51.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file model_manager-0.8.tar.gz.

File metadata

  • Download URL: model_manager-0.8.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for model_manager-0.8.tar.gz
Algorithm Hash digest
SHA256 658e171c885a2de03a8e59a4c56c2515b773ef31dab2729b629d6b83d0000d95
MD5 050fc8cd86a586049acadf2c1a674151
BLAKE2b-256 fde870e2ba53b58faedbbf3b7b8e64a57f4fdfee38ad913ddc3fad9521a56c87

See more details on using hashes here.

File details

Details for the file model_manager-0.8-py2.py3-none-any.whl.

File metadata

  • Download URL: model_manager-0.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 51.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for model_manager-0.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e443fbdd85ae816df7b42c9cb89cf8b270a4ee345d4934bc142417badcebd794
MD5 467dc7f28e71662d8a601db688a86768
BLAKE2b-256 1dea110512e303ecaa5fa0df467cb255e20ee1806a2dd5313444f291741ea06c

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