Skip to main content

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)

Metadata

Release files for model-manager 0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for model-manager 0.8
File Size Uploaded Provenance Actions
model_manager-0.8.tar.gz 45.4 kB Without provenance Details for model_manager-0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for model-manager 0.8
File Interpreter ABI Platform Actions
model_manager-0.8-py2.py3-none-any.whl Python 3, Python 2 none any Details for model_manager-0.8-py2.py3-none-any.whl

Total release size: 96.4 kB

Release files / model_manager-0.8.tar.gz

Download URL model_manager-0.8.tar.gz
Size 45.4 kB
Tags Source
SHA-256 checksum
How to use checksums
658e171c885a2de03a8e59a4c56c2515b773ef31dab2729b629d6b83d0000d95
BLAKE2b-256 checksum
How to use checksums
fde870e2ba53b58faedbbf3b7b8e64a57f4fdfee38ad913ddc3fad9521a56c87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release files / model_manager-0.8-py2.py3-none-any.whl

Download URL model_manager-0.8-py2.py3-none-any.whl
Size 51.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e443fbdd85ae816df7b42c9cb89cf8b270a4ee345d4934bc142417badcebd794
BLAKE2b-256 checksum
How to use checksums
1dea110512e303ecaa5fa0df467cb255e20ee1806a2dd5313444f291741ea06c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Security for model-manager 0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page