Skip to main content

A set of recursive population models for ecologists

Project description

generations

A set of recursive population models for ecologists including:

  • Nicholson Bailey host-parasitoid model
  • Weed-herbivore coupled model for an annual plant that forms a seed bank from Buckley et al. 2005
  • Weed-herbivore model for a biennial plant that forms a seed bank

Installation

Generations is available from the Python Package Index. It can be installed using pip:

pip install generations

Running

Once installed, the user can run the various models in generations by entering the following commands. Python's -m flag imports and runs the specified module. Each population model in generations is in it's own module:

python -m generations.nicholson_bailey

python -m generations.buckley

python -m generations.biennial

Custom parameters

The user can also create a copy of the default configuration file for the population model modules in their working directory. The file will be named model_parameters.cfg.

python -m generations.create_config

The user can then edit parameters to fit their desired ecological system. Model parameters will be loaded from the working directory into the population models at runtime.

Development

Generations source code is available on GitHub.

git clone https://github.com/alfalimajuliett/generations.git

Testing

./test.sh

This will run the unit tests. If you have pipenv, it will also run a number of other checks:

  • yapf: reformat the code automatically
  • mypy: check for runtime errors like misnamed imports or variables, or incompatible types
  • tox: run the unit tests against Python 2.7 and 3.7
  • coverage: report on lines that are not covered by unit tests

Uploading to PyPI

Install pipenv if you don't have it.

Increment the version in setup.py.

Run the tests one last time:

./test.sh

Build the distribution files:

pipenv run python3 setup.py sdist bdist_wheel

Upload using twine. It will prompt for your PyPI password:

pipenv run twine upload dist/*

Commit the version, create a tag, and push tags:

git commit -am "$version"
git tag $version
git push --tags
git push

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

generations-1.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

generations-1.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file generations-1.1.0.tar.gz.

File metadata

  • Download URL: generations-1.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for generations-1.1.0.tar.gz
Algorithm Hash digest
SHA256 20dbdbbc6da126c2d9f248aebc2d29e5198207de1bc268cac26c35b574e13671
MD5 e62e7ac1c8ff0d566251ab662e9a1541
BLAKE2b-256 fe0298f707c33b58f96a77ca839aef833bfbef87633ff7a17fba80b23e4df4e5

See more details on using hashes here.

File details

Details for the file generations-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: generations-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for generations-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e6af575a76dd6c6d0c4a7b1735867f579b3a7cc2417149bb23f469a6239a33f
MD5 e33bdca75a19a429db06275e509e7a0a
BLAKE2b-256 4a0f2e030015d812a78f3c00affb06c5331b5aef764b1e7f6d4bfd31dc3b836f

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