Skip to content

Commit

Permalink
Merge pull request #111 from ukhsa-collaboration/feature/prep-doc
Browse files Browse the repository at this point in the history
Feature/prep doc
  • Loading branch information
twomagpi authored Aug 5, 2024
2 parents 2f05282 + 20a2b10 commit d8c52bf
Show file tree
Hide file tree
Showing 132 changed files with 31,137 additions and 22,207 deletions.
1 change: 1 addition & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
push:
branches:
- master
- dev

jobs:
build-book:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest] # macos-latest
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand Down
113 changes: 113 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# PyGOM - Python Generic ODE Model

[![pypi version](https://img.shields.io/pypi/v/pygom.svg)](https://pypi.python.org/pypi/pygom)
[![Documentation Status](https://readthedocs.org/projects/pygom/badge/?version=master)](https://pygom.readthedocs.io/en/master/?badge=master)
[![licence](https://img.shields.io/pypi/l/pygom?color=green)](https://raw.githubusercontent.com/PublicHealthEngland/pygom/master/LICENSE.txt)
[![Github actions](https://github.com/PublicHealthEngland/pygom/workflows/pygom/badge.svg)](https://github.com/PublicHealthEngland/pygom/actions/)
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://hwilliams-phe.github.io/pygom/intro.html)

A generic framework for Ordinary Differential Equation (ODE) models, especially compartmental type systems.
This package provides a simple interface for users to construct ODE models backed by a comprehensive and easy to use tool–box implementing functions to easily perform common operations such as parameter estimation and solving for deterministic or stochastic time evolution.
With both the algebraic and numeric calculations performed automatically (but still accessible),
the end user is free to focus on model development.

## Installation

You can download a local copy of the PyGOM source files from this GitHub repository:

git clone https://github.com/ukhsa-collaboration/pygom.git

Please be aware that there may be redundant files within the package as it is under active development.

> [!NOTE]
> The latest fully reviewed version of PyGOM will be on the `master` branch and we generally recommend that users install this version. However, the current version being prepared for release (featuring up-to-date documentation) is hosted on the `feature/prep-doc` branch.
When running the following command line commands, ensure that your current working directory is the one where the PyGOM source files were downloaded to. This should be found from your home directory:

cd pygom

Activate the relevant branch for installation via Git Bash, if you have been recruited to test code for the
new release then this is the `feature/prep-doc` branch:

git checkout feature/prep-doc

Package dependencies can be found in the file, `requirements.txt`.
An easy way to install these to create a new [conda](https://conda.io/docs) environment in Anaconda Prompt via:

conda env create -f conda-env.yml

which you should ensure is active for the installation process using

conda activate pygom

Alternatively, you may add dependencies to your own environment through conda:

conda install --file requirements.txt

**or** via pip:

pip install -r requirements.txt

The final prerequisite, if you are working on a Windows machine, is that you will also need to install:
- [Graphviz](https://graphviz.org/)
- Microsoft Visual C++ 14.0 or greater, which you can get with [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)

You should now be able to install the PyGOM package via command line:

python setup.py install

and test that installation has completed successfully

python setup.py test

This will run a few test cases and can take some minutes to complete.

## Documentation

Documentation must be built locally and all necessary files can be found in the `docs` folder.
Documentation is built from the command line by first installing the additional documentation requirements:

pip install -r docs/requirements.txt

and then building the documentation:

jupyter-book build docs

The html files will be saved in the local copy of your repository under:

docs/_build/html

You can view the documentation by opening the index file in your browser of choice:

docs/_build/html/index.html

> [!NOTE]
> Building the documentation involves running many examples in python which can take up to 30 minutes. Subsequent builds with these examples unchanged are much quicker due to caching of the code outputs.
Please be aware that if the module tests fails, then the documentation for the package will not compile.

## Contributors

Thomas Finnie ([email protected])

Edwin Tye

Hannah Williams

Jonty Carruthers

Martin Grunnill

Joseph Gibson

## Version

0.1.7 Add Approximate Bayesian Computation (ABC) as a method of fitting to data

0.1.6 Bugfix scipy API, pickling, print to logging and simulation

0.1.5 Remove auto-simplification for much faster startup

0.1.4 Much faster Tau leap for stochastic simulations

0.1.3 Defaults to python built-in unittest and more in sync with conda
87 changes: 0 additions & 87 deletions README.rst

This file was deleted.

2 changes: 1 addition & 1 deletion conda-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ dependencies:
- graphviz
- cython
- pip
-pip:
- pip:
- -r requirements.txt
Loading

0 comments on commit d8c52bf

Please sign in to comment.