Skip to content

Commit

Permalink
Merge branch 'master' into i1276-pull-request-method-template
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelClerx authored Jul 20, 2021
2 parents 8028bfb + 31d4f27 commit f650014
Show file tree
Hide file tree
Showing 92 changed files with 90,138 additions and 1,644 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/copyright-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- master
pull_request:
# Run workflow when PR is changed, or when changed from draft to ready
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'

Expand All @@ -14,13 +16,16 @@ jobs:
name: Copyright
runs-on: ubuntu-latest

# Skip job if it's a draft PR
if: github.event.pull_request.draft == false

steps:
- uses: actions/checkout@v1

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
architecture: x64

- name: install pints
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/coverage-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- master
pull_request:
# Run workflow when PR is changed, or when changed from draft to ready
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'

Expand All @@ -14,20 +16,23 @@ jobs:
name: Coverage
runs-on: ubuntu-latest

# Skip job if it's a draft PR
if: github.event.pull_request.draft == false

steps:
- uses: actions/checkout@v1

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
architecture: x64

- name: install pints
run: |
python --version
python -m pip install --upgrade pip setuptools wheel
python -m pip install .
python -m pip install .[stan]
python -m pip install coverage codecov
- name: run coverage
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/docs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- master
pull_request:
# Run workflow when PR is changed, or when changed from draft to ready
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'

Expand All @@ -14,13 +16,16 @@ jobs:
name: Docs
runs-on: ubuntu-latest

# Skip job if it's a draft PR
if: github.event.pull_request.draft == false

steps:
- uses: actions/checkout@v1

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
architecture: x64

- name: install pints
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/notebook-interfaces-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Notebooks (interfaces)

on:
schedule:
# 4am daily
- cron: '0 4 * * *'
# 4am on monday (minute, hour, day, month, day-of-the-week)
- cron: '0 4 * * 1'

jobs:

Expand All @@ -14,20 +14,24 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
architecture: x64

- name: install pints
# We use e.g. install pints[stan] to install dependencies for interfaces
# that have some code in pints/interfaces. Dependencies that are not used
# by any code in the `pints` module are installed with pip (e.g.
# `pip install autograd`).
- name: install pints, interfaces, extra dependencies
run: |
python --version
python -m pip install --upgrade pip setuptools wheel
python -m pip install .
python -m pip install .[dev]
python -m pip install .[dev,stan]
python -m pip install autograd
python -m pip install statsmodels
- name: run jupyter notebooks
run: |
python -m pip install statsmodels
python run-tests.py --interfaces
8 changes: 4 additions & 4 deletions .github/workflows/notebook-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Notebooks

on:
schedule:
# 4am daily
- cron: '0 4 * * *'
# 4am on monday (minute, hour, day, month, day-of-the-week)
- cron: '0 4 * * 1'

jobs:

Expand All @@ -14,10 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
architecture: x64

- name: install pints
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/style-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- master
pull_request:
# Run workflow when PR is changed, or when changed from draft to ready
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'

Expand All @@ -14,13 +16,16 @@ jobs:
name: Style
runs-on: ubuntu-latest

# Skip job if it's a draft PR
if: github.event.pull_request.draft == false

steps:
- uses: actions/checkout@v1

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
architecture: x64

- name: install pints
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/unit-test-os-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- master
pull_request:
# Run workflow when PR is changed, or when changed from draft to ready
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'

Expand All @@ -14,17 +16,20 @@ jobs:
name: OS unit tests
runs-on: ${{ matrix.os }}

# Skip job if it's a draft PR
if: github.event.pull_request.draft == false

strategy:
matrix:
os: [ubuntu-16.04, macos-latest, windows-latest]
os: [ubuntu-18.04, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v1

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
architecture: x64

- name: install pints
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/unit-test-python-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- master
pull_request:
# Run workflow when PR is changed, or when changed from draft to ready
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'

Expand All @@ -14,6 +16,9 @@ jobs:
name: Python unit tests
runs-on: ubuntu-latest

# Skip job if it's a draft PR
if: github.event.pull_request.draft == false

strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
Expand All @@ -31,7 +36,7 @@ jobs:
run: |
python --version
python -m pip install --upgrade pip setuptools wheel
python -m pip install .
python -m pip install .[stan]
- name: run unit tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upload-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
architecture: x64

- name: install dependencies
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ All notable changes to this project will be documented in this file.
- [#1112](https://github.com/pints-team/pints/pull/1112) A new `NoUTurnMCMC` sampler (NUTS) was added, along with a `DualAveragingAdaption` class to adaptively tune related Hamiltonian Monte Carlo methods.
- [#1025](https://github.com/pints-team/pints/pull/1025) Added a stochastic logistic growth problem for use with ABC.
### Changed
- [#1250](https://github.com/pints-team/pints/pull/1250) The returned values from `SingleChainMCMC.tell()` and `MultiChainMCMC.tell()` have been extended from current position `x` to `x, fx, accepted`, where `fx` is the current log likelihood and `accepted` is a bool indicating whether tell performed an acceptance step in this call.
- [#1195](https://github.com/pints-team/pints/pull/1195) The installation instructions have been updated to reflect that PINTS in now pip-installable.
- [#1191](https://github.com/pints-team/pints/pull/1191) Warnings are now emitted using `warnings.warn` rather than `logging.getLogger(..).warning`. This makes them show up like other warnings, and allows them to be suppressed with [filterwarnings](https://docs.python.org/3/library/warnings.html#warnings.filterwarnings).
- [#1112](https://github.com/pints-team/pints/pull/1112) The new NUTS method is only supported on Python 3.3 and newer; a warning will be emitted when importing PINTS in older versions.
- [#1112](https://github.com/pints-team/pints/pull/1112) The `pints.Logger` can now deal with `None` being logged in place of a proper value.
- [#1355](https://github.com/pints-team/pints/pull/1112) When called with `parallel=True` the method `pints.evaluate()` will now limit the number of workers it uses to the number of tasks it needs to process.
### Deprecated
- [#1201](https://github.com/pints-team/pints/pull/1201) The method `pints.rhat_all_params` was accidentally removed in 0.3.0, but is now back in deprecated form.
### Removed
- [#1250](https://github.com/pints-team/pints/pull/1250) The methods `SingleChainMCMC.current_log_pdf()` and `MultiChainMCMC.current_log_pdf()` have been removed.
### Fixed
- [#1264](https://github.com/pints-team/pints/pull/1264) Fixed a bug relating to how NUTS handles nans when values outside the range of the priors are proposed.
- [#1257](https://github.com/pints-team/pints/pull/1257) Fixed a bug in `GaussianLogPrior`, which meant the distribution could be instantiated with a non-positive standard deviation.
Expand Down
21 changes: 5 additions & 16 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import pints
import sphinx

# -- General configuration ------------------------------------------------

Expand All @@ -40,17 +36,10 @@
]

# Autodoc defaults
if int(sphinx.__version__.split('.')[1]) < 8:
autodoc_default_flags = [
'members',
'inherited-members',
# 'show-inheritance',
]
else:
autodoc_default_options = {
'members': None,
'inherited-members': None,
}
autodoc_default_options = {
'members': None,
'inherited-members': None,
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -66,7 +55,7 @@

# General information about the project.
project = u'Pints'
copyright = u'2019, Pints Authors'
copyright = u'2021, Pints Authors'
author = u'Pints Authors'

# The version info for the project you're documenting, acts as replacement for
Expand Down
5 changes: 3 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ relevant code.
## Statistical modelling
- [Autoregressive moving average errors](./stats/autoregressive-moving-average-errors.ipynb)
- [Cauchy sampling error](./stats/cauchy-sampling-error.ipynb)
- [Constant and multiplicative Gaussian error](./stats/constant_and_multiplicative_gaussian_error.ipynb)
- [Constant and multiplicative Gaussian error](./stats/constant-and-multiplicative-gaussian-error.ipynb)
- [Integrated noise model](./stats/integrated-gaussian-log-likelihood.ipynb)
- [Log priors](./stats/log-priors.ipynb)
- [Multiplicative Gaussian noise](./stats/multiplicative-gaussian-errors.ipynb)
Expand Down Expand Up @@ -133,9 +133,10 @@ relevant code.
- [Twisted Gaussian Banana](./toy/distribution-twisted-gaussian.ipynb)

## Interfaces
- [Automatic differentiation using autograd](./interfaces/automatic-differentiation-using-autograd.ipynb)
- [Stan](./interfaces/stan.ipynb)
- [Statsmodels ARIMA](./interfaces/statsmodels-arima.ipynb)
- [Statsmodels state space](.interfaces/statsmodels-state-space.ipynb)

## Miscellaneous
- [Automatic differentiation using autograd](./toy/automatic-differentiation-using-autograd.ipynb)
- [The example shown on the landing page](./sampling/readme-example.ipynb)
Loading

0 comments on commit f650014

Please sign in to comment.