Skip to content

Commit 0454017

Browse files
authored
Merge pull request #158 from florisvb/CI-improvements
Deploy workflow + Coveralls
2 parents 9606879 + 5ceb2b4 commit 0454017

File tree

3 files changed

+39
-13
lines changed

3 files changed

+39
-13
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
on:
2+
release:
3+
types: [created]
4+
jobs:
5+
deploy-to-pypi:
6+
runs-on: ubuntu-latest
7+
env:
8+
TWINE_USERNAME: __token__
9+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: '3.x'
15+
- run: |
16+
pip install build wheel twine
17+
python -m build
18+
twine upload dist/*

.github/workflows/test.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,21 @@ on:
55
pull_request:
66

77
jobs:
8-
Linux:
8+
run-tests:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0 # important for Coveralls to read commit history
1214
- uses: actions/setup-python@v5
1315
with:
1416
python-version: '3.x'
15-
16-
- name: tests
17+
- name: tests and coverage
1718
run: |
18-
pip install -e .[advanced,dev]
19-
pytest pynumdiff
20-
19+
pip install -e .[advanced,dev] coveralls
20+
coverage run --source=pynumdiff --omit='pynumdiff/_version.py' -m pytest -s
21+
coverage xml
22+
- uses: coverallsapp/github-action@v2
23+
with:
24+
format: cobertura
25+
file: coverage.xml

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ Python methods for numerical differentiation of noisy data, including multi-obje
99
</p>
1010

1111
<p align="center">
12+
<img src='https://github.com/florisvb/pynumdiff/actions/workflows/test.yml/badge.svg'/>
1213
<a href='https://pynumdiff.readthedocs.io/master/'>
1314
<img src='https://app.readthedocs.org/projects/pynumdiff/badge/?version=master' alt='Documentation Status' /></a>
15+
<a href='https://coveralls.io/github/florisvb/PyNumDiff?branch=master'>
16+
<img src='https://coveralls.io/repos/github/florisvb/PyNumDiff/badge.svg?branch=master' alt='Coverage Status' /></a>
1417
<a href="https://badge.fury.io/py/pynumdiff">
15-
<img src="https://badge.fury.io/py/pynumdiff.svg" alt="PyPI version" height="18"></a>
18+
<img src="https://badge.fury.io/py/pynumdiff.svg" alt="PyPI"></a>
1619
<a href="https://zenodo.org/badge/latestdoi/159711175">
1720
<img src="https://zenodo.org/badge/159711175.svg" alt="DOI"></a>
1821
<a href="https://joss.theoj.org/papers/102257ee4b0142bf49bc18d7c810e9d5">
@@ -24,12 +27,12 @@ Python methods for numerical differentiation of noisy data, including multi-obje
2427
PyNumDiff is a Python package that implements various methods for computing numerical derivatives of noisy data, which can be a critical step in developing dynamic models or designing control. There are seven different families of methods implemented in this repository:
2528

2629
1. convolutional smoothing followed by finite difference calculation
27-
2. polynomial-fit-based methods
28-
3. iterated finite differencing
29-
4. total variation regularization of a finite difference derivative
30-
5. Kalman (RTS) smoothing
31-
6. basis-function-based methods
32-
7. linear local approximation with linear model
30+
2. polynomial fit methods
31+
3. basis function fit methods
32+
4. iterated finite differencing
33+
5. total variation regularization of a finite difference derivative
34+
6. Kalman (RTS) smoothing
35+
7. local approximation with linear model
3336

3437
Most of these methods have multiple parameters, so we take a principled approach and propose a multi-objective optimization framework for choosing parameters that minimize a loss function to balance the faithfulness and smoothness of the derivative estimate. For more details, refer to [this paper](https://doi.org/10.1109/ACCESS.2020.3034077).
3538

0 commit comments

Comments
 (0)