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
Visualization
Generations requires the Bokeh Python package to generate interactive plots of the simulation outputs in the browser. This functionality is attached to each modeling module. When the module runs, it automatically generates a .csv of the population densities for each organism at each time step Bokeh uses that .csv to automatically generate an html page with an interactive plot of the results in the user's browser.
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 automaticallymypy: check for runtime errors like misnamed imports or variables, or incompatible typestox: run the unit tests against Python 2.7 and 3.7coverage: 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
Metadata
Release files for generations 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| generations-1.3.0.tar.gz | 7.6 kB | Without provenance | Details for generations-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| generations-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for generations-1.3.0-py3-none-any.whl |
Total release size: 21.2 kB
Release files / generations-1.3.0.tar.gz
| Download URL | generations-1.3.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f80efd82515cbc6be359a544596831c3955a924776cad56dbfd04bd356f97c5a
|
|
BLAKE2b-256 checksum How to use checksums |
efdbfecf6542bb909dc178d9faabd6519835831375a504cb84ce7ec94bd9c260
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.0.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.0
|
Release files / generations-1.3.0-py3-none-any.whl
| Download URL | generations-1.3.0-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db700086fdd484af9c3d4e944dfa2f5b6760dda7400ff9e2a7968dfa32897476
|
|
BLAKE2b-256 checksum How to use checksums |
2d15330be202b0cba12dfce89fd0ded3d6ac1357bd94771f90380859ebd3e007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.0.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.0
|
Security for generations 1.3.0
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.