From 14eeb51f66cf8ce0fda1a6f55c14329401927334 Mon Sep 17 00:00:00 2001 From: Fergus Cooper Date: Tue, 18 Aug 2020 15:55:14 +0100 Subject: [PATCH 1/9] Add build artifacts to gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index f5be6b7bd..6594043f0 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,7 @@ studies # Virtual environments venv* + +# Build artifacts +build/* +dist/* \ No newline at end of file From 88c5d3bd5811b1665c4f37b3bb6f60d68b342d64 Mon Sep 17 00:00:00 2001 From: Fergus Cooper Date: Tue, 18 Aug 2020 15:55:30 +0100 Subject: [PATCH 2/9] Add content type for description & python requirements --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 3926f297a..b9320fca7 100644 --- a/setup.py +++ b/setup.py @@ -34,6 +34,7 @@ def load_version(): # Description description='Probabilistic Inference in Noisy Time-Series', long_description=readme, + long_description_content_type='text/markdown', # License name license='BSD 3-clause license', @@ -73,4 +74,5 @@ def load_version(): 'traitlets', ], }, + python_requires='>=3.5', ) From d607472f5dddcf422767a5a82a041511a0133334 Mon Sep 17 00:00:00 2001 From: Fergus Cooper Date: Tue, 18 Aug 2020 16:08:11 +0100 Subject: [PATCH 3/9] First draft of pypi upload script --- .github/workflows/upload-to-pypi.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/upload-to-pypi.yml diff --git a/.github/workflows/upload-to-pypi.yml b/.github/workflows/upload-to-pypi.yml new file mode 100644 index 000000000..a497ad07f --- /dev/null +++ b/.github/workflows/upload-to-pypi.yml @@ -0,0 +1,40 @@ +name: Upload to PyPi + +on: + release: + types: + - published + +jobs: + + upload-to-pypi: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + architecture: x64 + + - name: install dependencies + run: | + python --version + python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade twine + + - name: create release binaries + run: | + python setup.py sdist bdist_wheel + + - name: create release binaries + run: | + python setup.py sdist bdist_wheel + + - name: publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} From a15c51de5da77e502879e53208df53bc2b599c40 Mon Sep 17 00:00:00 2001 From: Fergus Cooper Date: Tue, 18 Aug 2020 16:12:48 +0100 Subject: [PATCH 4/9] Remove duplicate step in script --- .github/workflows/upload-to-pypi.yml | 4 ---- .gitignore | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/upload-to-pypi.yml b/.github/workflows/upload-to-pypi.yml index a497ad07f..12b40cbb4 100644 --- a/.github/workflows/upload-to-pypi.yml +++ b/.github/workflows/upload-to-pypi.yml @@ -29,10 +29,6 @@ jobs: run: | python setup.py sdist bdist_wheel - - name: create release binaries - run: | - python setup.py sdist bdist_wheel - - name: publish to PyPI uses: pypa/gh-action-pypi-publish@master with: diff --git a/.gitignore b/.gitignore index 6594043f0..1eb2b092d 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,4 @@ venv* # Build artifacts build/* -dist/* \ No newline at end of file +dist/* From 7610c6703d5ed660e651e3b663becc684c6dd342 Mon Sep 17 00:00:00 2001 From: Fergus Cooper Date: Tue, 18 Aug 2020 16:27:24 +0100 Subject: [PATCH 5/9] Update all links in REAMDE so they ought to work on PyPI --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a49143faa..946086e38 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ [![Unit tests on multiple python versions](https://github.com/pints-team/pints/workflows/Unit%20tests%20on%20multiple%20python%20versions/badge.svg)](https://github.com/pints-team/pints/actions) [![Unit tests on multiple operating systems](https://github.com/pints-team/pints/workflows/Unit%20tests%20on%20multiple%20operating%20systems/badge.svg)](https://github.com/pints-team/pints/actions) [![codecov](https://codecov.io/gh/pints-team/pints/branch/master/graph/badge.svg)](https://codecov.io/gh/pints-team/pints) -[![Functional testing code](https://github.com/pints-team/functional-testing/blob/master/badge-code.svg)](https://github.com/pints-team/functional-testing) -[![Functional testing results](https://github.com/pints-team/functional-testing/blob/master/badge-results.svg)](https://www.cs.ox.ac.uk/projects/PINTS/functional-testing) +[![Functional testing code](https://raw.githubusercontent.com/pints-team/functional-testing/master/badge-code.svg)](https://github.com/pints-team/functional-testing) +[![Functional testing results](https://raw.githubusercontent.com/pints-team/functional-testing/master/badge-results.svg)](https://www.cs.ox.ac.uk/projects/PINTS/functional-testing) [![binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/pints-team/pints/master?filepath=examples) [![readthedocs](https://readthedocs.org/projects/pints/badge/?version=latest)](http://pints.readthedocs.io/en/latest/?badge=latest) [![BCH compliance](https://bettercodehub.com/edge/badge/pints-team/pints?branch=master)](https://bettercodehub.com/results/pints-team/pints) @@ -11,8 +11,8 @@ PINTS (Probabilistic Inference on Noisy Time-Series) is a framework for optimisation and Bayesian inference on ODE models of noisy time-series, such as arise in electrochemistry and cardiac electrophysiology. -PINTS is described in [this publication in JORS](http://doi.org/10.5334/jors.252), and can be cited using the information given in our [CITATION file](./CITATION). -More information about PINTS papers can be found in the [papers directory](./papers/). +PINTS is described in [this publication in JORS](http://doi.org/10.5334/jors.252), and can be cited using the information given in our [CITATION file](https://github.com/pints-team/pints/blob/master/CITATION). +More information about PINTS papers can be found in the [papers directory](https://github.com/pints-team/pints/tree/master/papers). ## Using PINTS @@ -28,19 +28,19 @@ simulate(parameters, times) --> Returns a vector of model evaluations at ``` Experimental data sets in PINTS are defined simply as lists (or arrays) of `times` and corresponding experimental `values`. -If you have this kind of data, and if [your model (or model wrapper)](examples/writing-a-model.ipynb) implements the two methods above, then you are ready to start using PINTS to infer parameter values using [optimisation](examples/optimisation-first-example.ipynb) or [sampling](examples/sampling-first-example.ipynb). +If you have this kind of data, and if [your model (or model wrapper)](https://github.com/pints-team/pints/blob/master/examples/stats/custom-model.ipynb) implements the two methods above, then you are ready to start using PINTS to infer parameter values using [optimisation](https://github.com/pints-team/pints/blob/master/examples/optimisation/first-example.ipynb) or [sampling](https://github.com/pints-team/pints/blob/master/examples/sampling/first-example.ipynb). A brief example is shown below: -![An example of using PINTS in an optimisation](example.svg) +![An example of using PINTS in an optimisation](https://raw.githubusercontent.com/pints-team/pints/f2e28d09a2668f883a7358ae7aaad4b4572554eb/example.svg) _(Left)_ A noisy experimental time series and a computational forward model. _(Right)_ Example code for an optimisation problem. -The full code can be [viewed here](examples/readme-example.ipynb) but a friendlier, more elaborate, introduction can be found on the [examples page](examples/README.md). +The full code can be [viewed here](https://github.com/pints-team/pints/blob/master/examples/sampling/readme-example.ipynb) but a friendlier, more elaborate, introduction can be found on the [examples page](https://github.com/pints-team/pints/blob/master/examples/README.md). A graphical overview of the methods included in PINTS can be [viewed here](https://pints-team.github.io/pints-methods-overview/). ### Examples and documentation -PINTS comes with a number of [detailed examples](examples/README.md), hosted here on github. +PINTS comes with a number of [detailed examples](https://github.com/pints-team/pints/blob/master/examples/README.md), hosted here on github. In addition, there is a [full API documentation](http://pints.readthedocs.io/en/latest/), hosted on readthedocs.io. @@ -63,7 +63,7 @@ Then navigate to the path where you downloaded PINTS to, and install both PINTS $ pip install . ``` -To install PINTS as a [developer](CONTRIBUTING.md), use +To install PINTS as a [developer](https://github.com/pints-team/pints/blob/master/CONTRIBUTING.md), use ``` $ pip install -e .[dev,docs] @@ -77,11 +77,11 @@ $ pip uninstall pints ## Contributing to PINTS -If you'd like to help us develop PINTS by adding new methods, writing documentation, or fixing embarassing bugs, please have a look at these [guidelines](CONTRIBUTING.md) first. +If you'd like to help us develop PINTS by adding new methods, writing documentation, or fixing embarassing bugs, please have a look at these [guidelines](https://github.com/pints-team/pints/blob/master/CONTRIBUTING.md) first. ## License -PINTS is fully open source. For more information about its license, see [LICENSE](LICENSE.md). +PINTS is fully open source. For more information about its license, see [LICENSE](https://github.com/pints-team/pints/blob/master/LICENSE.md). ## Get in touch From db5e341eb62473c0efc8f62b1cdfe668baab7272 Mon Sep 17 00:00:00 2001 From: Fergus Cooper Date: Tue, 18 Aug 2020 16:29:56 +0100 Subject: [PATCH 6/9] Users can pip install pints; developers clone & then install --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 946086e38..ce3f3da71 100644 --- a/README.md +++ b/README.md @@ -60,12 +60,14 @@ $ pip install --upgrade pip Then navigate to the path where you downloaded PINTS to, and install both PINTS and its dependencies by typing: ``` -$ pip install . +$ pip install pints ``` To install PINTS as a [developer](https://github.com/pints-team/pints/blob/master/CONTRIBUTING.md), use ``` +$ git clone https://github.com/pints-team/pints.git +$ cd pints $ pip install -e .[dev,docs] ``` From 1fd1f9881818bb77c46a875975276c9a7c8cabe6 Mon Sep 17 00:00:00 2001 From: Fergus Cooper Date: Tue, 18 Aug 2020 16:32:44 +0100 Subject: [PATCH 7/9] Add python 2.7 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b9320fca7..f1becdcdf 100644 --- a/setup.py +++ b/setup.py @@ -74,5 +74,5 @@ def load_version(): 'traitlets', ], }, - python_requires='>=3.5', + python_requires='==2.7, >=3.5', ) From dde3ca2ab75ab34f933e3a627d4eb666b7e6009a Mon Sep 17 00:00:00 2001 From: Fergus Cooper Date: Tue, 18 Aug 2020 16:43:21 +0100 Subject: [PATCH 8/9] Apparently comma is logical and not logical or..! --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f1becdcdf..acc997ae5 100644 --- a/setup.py +++ b/setup.py @@ -74,5 +74,5 @@ def load_version(): 'traitlets', ], }, - python_requires='==2.7, >=3.5', + python_requires='>=2.7,!=3.0,!=3.1,!=3.2,!=3.3,!=3.4', ) From 6dbed1e44aa82a438987017210884bfda5f32afa Mon Sep 17 00:00:00 2001 From: Fergus Cooper Date: Tue, 18 Aug 2020 16:46:18 +0100 Subject: [PATCH 9/9] Bump to 0.3.0 --- pints/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pints/version b/pints/version index 722b52502..4786a8513 100644 --- a/pints/version +++ b/pints/version @@ -1 +1 @@ -0,2,2 +0,3,0