Skip to content

Commit

Permalink
Merge pull request #3 from ukhsa-collaboration/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
hareball90 authored Aug 31, 2023
2 parents 00863ee + 4660077 commit 4d5e904
Show file tree
Hide file tree
Showing 119 changed files with 15,908 additions and 5,408 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: build-book

# only run when specific files change
# only run on install-fix-docs branch
# TODO change this to dev/main branch once integrated
# TODO edit filepath once filepath levels are corrected

on:
push:
branches:
- install-fix-docs
paths:
- docs/**

jobs:
build-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
steps:
- uses: actions/checkout@v3

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1

# install python
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

# install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# set up pygom
- name: Build and install pygom
run: |
python setup.py build
python setup.py install
# build the book
# TODO check which flags are needed, -W
- name: Build the book
run: |
jupyter-book build --all -v docs/pygom-doc
# deploy book to github-pages
- name: GitHub Pages
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/pygom-doc/_build/html

5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ on:
branches:
- master

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.5, 3.6, 3.7, 3.8]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cover/*
__pycache__
*.egg-info
*.egg
.vscode/

# For jupyter / ipython
*/.ipynb_checkpoints
Expand All @@ -17,5 +18,8 @@ __pycache__
.settings

# For built documentation
/doc/_build*
/docs/pygom-doc/_build/*
/doc/_build/
/doc/source/savefig/*
/docs/pygom-doc/_autosummary/
*/_build/*
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contributor guidance

## suggested information for raising issues
- is it possible to produce a template for a new issue?

## requirements for amendments
- merge and pull requests should only be considered if the MR/PR explicitly states how the following has been addressed
- unit tests
- modified documentation
- justification
- successful execution of documentation (controlled by halting at errors in /docs/_config.yml, demonstrated by successful action)
- #TODO is there a reasonable limit on the code quantity that is submitted per review? (e.g. 200 lines) to ensure a suitable review can be completed

## workflow for incorporating merge and pull requests
- dev and master are protected and require a code review by the project owner (or designated reviewer)
- dev should contain all working amendments and collated before the next versioned merge request to master
- only a merge request should be made to master from dev from the UKHSA repo
- forked repo pull requests should be made into UKHSA dev branch (or others where appropriate)
- master branch is for versioned releases, which should be tagged and a summary of alterations made to README.md
- merge and pull requests to be made to dev, where builds and actions must run successfully before being incorporated
- if closing a ticket, if possible, include the commit reference which addresses the issue
- code reviewer should use the template to work through requirements (e.g. confirming tests have been added, documentation is appropriate, added to contributor file)

## adding to the documentation how to add to the jupyterbook;

## acknowledgements from contributors
- what counts as a contribution?
- ticket? pr/mr?
- how are contributors acknowledged?
- contributor md file?
- who adds the name to the contributor? suggest code reviewer on approval of MR/PR
- provide citable repo link
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
pygom - ODE modelling in Python
===============================

|Build status| |Github actions| |Documentation Status| |pypi version| |licence|
|Build status| |Github actions| |Documentation Status| |pypi version| |licence| |Jupyter Book Badge|

.. |pypi version| image:: https://img.shields.io/pypi/v/pygom.svg
:target: https://pypi.python.org/pypi/pygom
.. |Build status| image:: https://travis-ci.org/PublicHealthEngland/pygom.svg?branch=master
:target: https://travis-ci.org/PublicHealthEngland/pygom
.. |Documentation Status| image:: https://readthedocs.org/projects/pygom/badge/?version=master
:target: https://pygom.readthedocs.io/en/master/?badge=master
.. |licence| image:: https://img.shields.io/pypi/l/pygom?color=green :alt: PyPI - License
:target: https://raw.githubusercontent.com/PublicHealthEngland/pygom/master/LICENSE.txt
.. |Github actions| image:: https://github.com/PublicHealthEngland/pygom/workflows/pygom/badge.svg
:target: https://github.com/PublicHealthEngland/pygom/actions/
.. |Jupyter Book Badge| image:: https://jupyterbook.org/badge.svg
:target: https://hwilliams-phe.github.io/pygom/intro.html

A generic framework for ode models, specifically compartmental type problems.

Expand Down
Loading

0 comments on commit 4d5e904

Please sign in to comment.