Skip to content

Commit

Permalink
Merge pull request #300 from ICB-DCM/develop
Browse files Browse the repository at this point in the history
Release 0.10.2
  • Loading branch information
yannikschaelte authored May 10, 2020
2 parents ad222b4 + 3a755bd commit db0e807
Show file tree
Hide file tree
Showing 24 changed files with 380 additions and 112 deletions.
3 changes: 1 addition & 2 deletions .travis_pip_reqs.txt → .ci_pip_reqs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
wheel
cloudpickle
gitpython
sqlalchemy
Expand All @@ -24,8 +25,6 @@ ipython
feather-format
bkcharts
tzlocal
rpy2>=3.2.0
cffi>=1.13.1
flake8
pytest
codecov
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/ci_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh

# apt
sudo apt-get update
sudo apt-get install redis-server

# pip
python -m pip install --upgrade pip
pip install -r .ci_pip_reqs.txt

# install package
pip install -e .

# optional dependencies
for par in "$@"
do
case $par in

R)
# R environment
sudo apt-key adv \
--keyserver keyserver.ubuntu.com \
--recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository \
'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
sudo apt-get update
sudo apt-get install r-base
pip install rpy2>=3.2.0 cffi>=1.13.1
;;

petab)
# PEtab
sudo apt-get install swig3.0 libatlas-base-dev libhdf5-serial-dev
sudo ln -s /usr/bin/swig3.0 /usr/bin/swig
pip install https://github.com/icb-dcm/petab/archive/develop.zip
pip install -e \
'git+https://github.com/icb-dcm/amici.git@develop#egg=amici&subdirectory=python/sdist'
git clone --depth 1 \
https://github.com/petab-dev/petab_test_suite .tmp/petab_test_suite
pip install -e .tmp/petab_test_suite
;;

*)
echo "Unknown argument" >&2
exit 1
;;
esac
done
64 changes: 64 additions & 0 deletions .github/workflows/ci_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

# trigger
on: [pull_request]

jobs:
notebooks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Prepare python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Cache
uses: actions/cache@v1
with:
path: ~/.cache
key: ${{ runner.os }}-ci-notebooks

- name: Install dependencies
run: .github/workflows/ci_dependencies.sh R petab

- name: Run notebooks
run: |
test/run_notebooks.sh
docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Prepare python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Cache
uses: actions/cache@v1
with:
path: ~/.cache
key: ${{ runner.os }}-ci-docs

- name: Install dependencies
run: |
sudo apt-get install pandoc
python -m pip install --upgrade pip
pip install -e .
pip install sphinx nbsphinx nbconvert sphinx-rtd-theme
- name: Build docs
run: sphinx-build -W -b html doc/ doc/_build/html
113 changes: 113 additions & 0 deletions .github/workflows/ci_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: CI

# trigger
on: [push]

jobs:
base:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Prepare python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Cache
uses: actions/cache@v1
with:
path: ~/.cache
key: ${{ runner.os }}-ci-base
restore-keys: ${{ runner.os }}-

- name: Install dependencies
run: .github/workflows/ci_dependencies.sh R

- name: Run tests
run: |
python -m pytest --cov=pyabc --cov-report=xml \
test/test_* test/visualization/test_*
- name: Coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml

external:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Prepare python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Cache
uses: actions/cache@v1
with:
path: ~/.cache
key: ${{ runner.os }}-ci-external
restore-keys: ${{ runner.os }}-

- name: Install dependencies
run: .github/workflows/ci_dependencies.sh R

- name: Run tests
run: |
python -m pytest --cov=pyabc --cov-report=xml \
test/external/test_*
- name: Coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml

petab:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Prepare python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Cache
uses: actions/cache@v1
with:
path: ~/.cache
key: ${{ runner.os }}-ci-petab
restore-keys: ${{ runner.os }}-

- name: Install dependencies
run: .github/workflows/ci_dependencies.sh petab

- name: Run tests
run: |
python -m pytest --cov=pyabc --cov-report=xml \
test/petab/test_*
- name: Coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Prepare python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
64 changes: 0 additions & 64 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<img src="https://raw.githubusercontent.com/ICB-DCM/pyABC/master/doc/logo/logo.png" alt="pyABC logo" width="30%"/>

[![build Status](https://travis-ci.org/ICB-DCM/pyABC.svg?branch=master)](https://travis-ci.org/ICB-DCM/pyABC)
[![CI](https://github.com/ICB-DCM/pyABC/workflows/CI/badge.svg)](https://github.com/ICB-DCM/pyABC/actions)
[![docs](https://readthedocs.org/projects/pyabc/badge/?version=latest)](http://pyabc.readthedocs.io/en/latest/)
[![codacy](https://api.codacy.com/project/badge/Grade/923a9ab160e6420b9fc468701be60a98)](https://www.codacy.com/app/yannikschaelte/pyABC?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ICB-DCM/pyABC&amp;utm_campaign=Badge_Grade)
[![codecov](https://codecov.io/gh/ICB-DCM/pyABC/branch/master/graph/badge.svg)](https://codecov.io/gh/ICB-DCM/pyABC)
Expand Down
3 changes: 0 additions & 3 deletions doc/api_sge.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
.. _api_sge:

.. automodule:: pyabc.sge
:members:
:special-members: __init__, __call__
:show-inheritance:

.. autoclass:: pyabc.sge.SGE
:members:
Expand Down
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Welcome to pyABC's documentation!
=================================

.. image:: https://travis-ci.org/ICB-DCM/pyABC.svg?branch=master
:target: https://travis-ci.org/ICB-DCM/pyABC
.. image:: https://github.com/ICB-DCM/pyABC/workflows/CI/badge.svg
:target: https://github.com/ICB-DCM/pyABC/actions
.. image:: https://readthedocs.org/projects/pyabc/badge/?version=latest
:target: https://pyabc.readthedocs.io/en/latest
.. image:: https://api.codacy.com/project/badge/Grade/923a9ab160e6420b9fc468701be60a98
Expand Down
9 changes: 9 additions & 0 deletions doc/releasenotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ Release Notes
...........


0.10.2 (2020-05-09)
-------------------

* Update CI test system: latest Ubuntu, python 3.8, simplify R build (#296).
* Add weights logging to adaptive distances (#295).
* Migrate CI tests to GitHub Actions for speed-up, reliability and
maintainability (#297, #298).


0.10.1 (2020-03-17)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion doc/sampler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ Pickling
.. note::
This section is of interest to developers, of if you encounter memory
This section is of interest to developers, or if you encounter memory
problems.
For most of the samplers, pyABC uses
Expand Down
1 change: 0 additions & 1 deletion flake8_exclude.txt

This file was deleted.

Loading

0 comments on commit db0e807

Please sign in to comment.