Skip to content

Commit

Permalink
Merge branch 'master' into modelrunner
Browse files Browse the repository at this point in the history
  • Loading branch information
david-zwicker committed Feb 3, 2024
2 parents 092e63e + c5f478e commit fb66731
Show file tree
Hide file tree
Showing 237 changed files with 15,026 additions and 6,738 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/check_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Check documentation"

on: [push]

jobs:
docs:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
44 changes: 32 additions & 12 deletions .github/workflows/coverage_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,57 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install FFmpeg
continue-on-error: true
run: |
sudo apt-get install ffmpeg
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: mpi4py/setup-mpi@v1
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements_mpi.txt
pip install -r tests/requirements_full.txt
pip install -r tests/requirements.txt
- name: Generate coverage report
- name: Generate serial coverage report
env:
NUMBA_DISABLE_JIT: 1
MPLBACKEND: agg
PYPDE_TESTRUN: 1
run: |
export PYTHONPATH="${PYTHONPATH}:`pwd`"
pytest --cov-config=pyproject.toml --cov=pde -n auto tests
- name: Setup MPI
uses: mpi4py/setup-mpi@v1

- name: Generate parallel coverage report
env:
NUMBA_DISABLE_JIT: 1
MPLBACKEND: agg
PYPDE_TESTRUN: 1
run: |
export NUMBA_DISABLE_JIT=1
export MPLBACKEND="agg"
export PYTHONPATH="${PYTHONPATH}:`pwd`"
pytest --cov-config=tests/.coveragerc --cov-report xml:report_coverage.xml --cov=pde --runslow pde
mpiexec -n 2 pytest --cov-config=tests/.coveragerc --cov-report xml:report_coverage.xml --cov-append --cov=pde --use_mpi pde
pip install -r tests/requirements_mpi.txt
mpiexec -n 2 pytest --cov-config=pyproject.toml --cov-append --cov=pde --use_mpi tests
- name: Create coverage report
run: |
coverage xml -o coverage_report.xml
- name: Upload coverage to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./report_coverage.xml
file: ./coverage_report.xml
flags: unittests
name: codecov-pydev
fail_ci_if_error: true
21 changes: 15 additions & 6 deletions .github/workflows/release_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,33 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0 # https://github.com/pypa/setuptools_scm/issues/480

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build twine
- name: Prepare build
run: |
python -m build 2>&1 | tee build.log
# exit `fgrep -i warning build.log | wc -l`
- name: Check the package
run: twine check --strict dist/*

- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m twine upload dist/*
run: python -m twine upload dist/*
12 changes: 7 additions & 5 deletions .github/workflows/tests_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ jobs:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'

- name: Install dependencies
# install all requirements
Expand All @@ -27,5 +29,5 @@ jobs:
NUMBA_WARNINGS: 1
MPLBACKEND: agg
run: |
cd tests
python run_tests.py --unit --num_cores auto --showconfig
cd scripts
python run_tests.py --unit --runslow --num_cores auto --showconfig
11 changes: 6 additions & 5 deletions .github/workflows/tests_minversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ jobs:
matrix:
os: [macos-latest, ubuntu-latest] # windows-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 60

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'

Expand All @@ -27,6 +29,5 @@ jobs:
NUMBA_WARNINGS: 1
MPLBACKEND: agg
run: |
pip install pytest pytest-cov
cd tests
python run_tests.py --unit --num_cores auto --showconfig
cd scripts
python run_tests.py --unit --runslow --num_cores auto --showconfig
12 changes: 7 additions & 5 deletions .github/workflows/tests_mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest] #, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- uses: mpi4py/setup-mpi@v1

- name: Install dependencies
Expand All @@ -28,5 +30,5 @@ jobs:
NUMBA_WARNINGS: 1
MPLBACKEND: agg
run: |
cd tests
cd scripts
python run_tests.py --unit --use_mpi --showconfig
10 changes: 5 additions & 5 deletions .github/workflows/tests_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
pyversion: ['3.8', '3.10']
pyversion: ['3.8', '3.11']
timeout-minutes: 30

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyversion }}

Expand All @@ -26,4 +26,4 @@ jobs:
- name: Test types with mypy
continue-on-error: true
run: |
python -m mypy --config-file tests/mypy.ini --pretty --package pde
python -m mypy --config-file pyproject.toml --pretty --package pde
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ docs/source/examples_gallery/
docs/paper/paper.pdf
tests/coverage/
tests/mypy-report/
pde/_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
5 changes: 0 additions & 5 deletions .isort.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions .lgtm.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
[![PyPI version](https://badge.fury.io/py/py-pde.svg)](https://badge.fury.io/py/py-pde)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/py-pde.svg)](https://anaconda.org/conda-forge/py-pde)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

[![Build Status](https://github.com/zwicker-group/py-pde/actions/workflows/tests_all.yml/badge.svg)](https://github.com/zwicker-group/py-pde/actions/workflows/tests_all.yml)
[![codecov](https://codecov.io/gh/zwicker-group/py-pde/branch/master/graph/badge.svg)](https://codecov.io/gh/zwicker-group/py-pde)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/zwicker-group/py-pde.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/zwicker-group/py-pde/context:python)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/zwicker-group/py-pde/master?filepath=examples%2Fjupyter)

[![Documentation Status](https://readthedocs.org/projects/py-pde/badge/?version=latest)](https://py-pde.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.02158/status.svg)](https://doi.org/10.21105/joss.02158)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
Expand All @@ -25,36 +22,35 @@ dynamical systems in physics. The focus of the package lies on easy usage to
explore the behavior of PDEs. However, core computations can be compiled
transparently using numba for speed.

[Try it out online!](https://mybinder.org/v2/gh/zwicker-group/py-pde/master?filepath=examples%2Fjupyter)
[Try it online!](https://mybinder.org/v2/gh/zwicker-group/py-pde/master?filepath=examples%2Fjupyter)


Installation
------------

`py-pde` is available on `pypi`, so you should be able to install it through
`pip`:
`py-pde` is available on `pypi`, so you should be able to install it through `pip`:

```bash
pip install py-pde
```

In order to have all features of the package available, you might also want to
In order to have all features of the package available, you might want to
install the following optional packages:

```bash
pip install h5py pandas tqdm
pip install h5py pandas mpi4py numba-mpi
```

Moreover, `ffmpeg` needs to be installed for creating movies.

As an alternative, you can install `py-pde` through [conda](https://docs.conda.io/en/latest/)
using [conda-forge](https://conda-forge.org/) channel:
using the [conda-forge](https://conda-forge.org/) channel:

```bash
conda install -c conda-forge py-pde
```

Installation with `conda` includes all required dependencies to have all features of `py-pde`.
Installation with `conda` includes all dependencies of `py-pde`.

Usage
-----
Expand Down
11 changes: 0 additions & 11 deletions codecov.yml

This file was deleted.

File renamed without changes.
Loading

0 comments on commit fb66731

Please sign in to comment.