From 3bf92392b988c82ac86bf59938373006277c3f09 Mon Sep 17 00:00:00 2001 From: pavelkomarov Date: Fri, 3 Oct 2025 13:05:22 -0700 Subject: [PATCH 01/10] added coveralls to the tests workflow and added the ability to deploy to pypi with another workflow. All that's missing are secrets --- .github/workflows/release.yml | 18 ++++++++++++++++++ .github/workflows/test.yml | 12 +++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d830695 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +on: + release: + types: [created] +jobs: + deploy-to-pypi: + runs-on: ubuntu-latest + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - run: | + pip install build wheel twine + python -m build + twine upload dist/* \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2ecdd14..ee294e3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: pull_request: jobs: - Linux: + run-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -13,8 +13,10 @@ jobs: with: python-version: '3.x' - - name: tests + - name: tests and coverage run: | - pip install -e .[advanced,dev] - pytest pynumdiff - + pip install -e .[advanced,dev] coveralls + coverage run --source=pynumdiff -m pytest -s + coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} From 3679baa1d0ce5aef7163194772bbc4236a89c672 Mon Sep 17 00:00:00 2001 From: pavelkomarov Date: Fri, 3 Oct 2025 13:16:00 -0700 Subject: [PATCH 02/10] added coveralls badge to readme --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 68f9d10..5a4e978 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,13 @@ Python methods for numerical differentiation of noisy data, including multi-obje

+ Documentation Status + + Coverage Status - PyPI version + PyPI DOI From c4b1f8cc784749d0b57ce672b6e922cf076c5d50 Mon Sep 17 00:00:00 2001 From: pavelkomarov Date: Fri, 3 Oct 2025 13:36:45 -0700 Subject: [PATCH 03/10] reordered readme list --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5a4e978..9288b52 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,12 @@ Python methods for numerical differentiation of noisy data, including multi-obje 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: 1. convolutional smoothing followed by finite difference calculation -2. polynomial-fit-based methods -3. iterated finite differencing -4. total variation regularization of a finite difference derivative -5. Kalman (RTS) smoothing -6. basis-function-based methods -7. linear local approximation with linear model +2. polynomial fit methods +3. basis function fit methods +4. iterated finite differencing +5. total variation regularization of a finite difference derivative +6. Kalman (RTS) smoothing +7. local approximation with linear model 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). From a4b1c793c2d14fb16a8167403b01e20569e1f952 Mon Sep 17 00:00:00 2001 From: pavelkomarov Date: Wed, 8 Oct 2025 16:55:56 -0700 Subject: [PATCH 04/10] tried adding fetch depth of 0, because that might be important for coveralls --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ee294e3..7c27c93 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 # important for Coveralls to read commit history - uses: actions/setup-python@v5 with: python-version: '3.x' From f69407a0eb754555a3b020d6e4db05cc3193c49f Mon Sep 17 00:00:00 2001 From: pavelkomarov Date: Wed, 8 Oct 2025 17:09:53 -0700 Subject: [PATCH 05/10] trying something chat told me to do --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c27c93..6c3d2fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,3 +22,5 @@ jobs: coveralls env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + COVERALLS_SERVICE_NAME: github + COVERALLS_GIT_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} From b48be6bfdb473869dc0e882c33e28baf2b58ff14 Mon Sep 17 00:00:00 2001 From: pavelkomarov Date: Wed, 8 Oct 2025 17:16:28 -0700 Subject: [PATCH 06/10] undoing the thing --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c3d2fd..7c27c93 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,5 +22,3 @@ jobs: coveralls env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - COVERALLS_SERVICE_NAME: github - COVERALLS_GIT_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} From 677df07c5f7c90774ac792b28070c77279e3239a Mon Sep 17 00:00:00 2001 From: pavelkomarov Date: Wed, 8 Oct 2025 17:22:07 -0700 Subject: [PATCH 07/10] redoing the thing --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c27c93..6c3d2fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,3 +22,5 @@ jobs: coveralls env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + COVERALLS_SERVICE_NAME: github + COVERALLS_GIT_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} From fae2d538392e8e2932505be56ccbd8b97c69c412 Mon Sep 17 00:00:00 2001 From: pavelkomarov Date: Wed, 8 Oct 2025 17:41:53 -0700 Subject: [PATCH 08/10] being verbose so I can see what's getting mangled --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c3d2fd..9e4035f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,8 +19,7 @@ jobs: run: | pip install -e .[advanced,dev] coveralls coverage run --source=pynumdiff -m pytest -s - coveralls + coveralls --verbose env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - COVERALLS_SERVICE_NAME: github COVERALLS_GIT_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} From c290f5390500418d85227d8b2ee38080303086a0 Mon Sep 17 00:00:00 2001 From: pavelkomarov Date: Wed, 8 Oct 2025 17:51:26 -0700 Subject: [PATCH 09/10] trying alternative integration using coveralls github action --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9e4035f..9053cc3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,12 +14,12 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.x' - - name: tests and coverage run: | pip install -e .[advanced,dev] coveralls coverage run --source=pynumdiff -m pytest -s - coveralls --verbose - env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - COVERALLS_GIT_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} + coverage xml + - uses: coverallsapp/github-action@v2 + with: + format: cobertura + file: coverage.xml From 5ceb2b4423064c970ca5798a6bc3e466313a731b Mon Sep 17 00:00:00 2001 From: pavelkomarov Date: Wed, 8 Oct 2025 17:58:46 -0700 Subject: [PATCH 10/10] omitting an autogenerated file from consideration --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9053cc3..64a7313 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: - name: tests and coverage run: | pip install -e .[advanced,dev] coveralls - coverage run --source=pynumdiff -m pytest -s + coverage run --source=pynumdiff --omit='pynumdiff/_version.py' -m pytest -s coverage xml - uses: coverallsapp/github-action@v2 with: