Skip to content

Commit

Permalink
Merge pull request #304 from dynamicslab/bump-versions
Browse files Browse the repository at this point in the history
Bump versions in CI, requirements
  • Loading branch information
akaptano authored Apr 7, 2023
2 parents 972c788 + 2ab4301 commit 4c32d26
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: docs/JOSS2/paper.md
- name: Upload
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: paper
# This is the output path where Pandoc will write the compiled
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.7
python-version: "3.8"
- name: Linting
run: |
pip install pre-commit
Expand All @@ -23,12 +23,12 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8]
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -46,7 +46,7 @@ jobs:
run: |
pytest test --cov=pysindy --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
Expand All @@ -55,7 +55,7 @@ jobs:
pip install papermill
cd examples
papermill --report-mode 1_feature_overview.ipynb out.json
- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: 3.7
python-version: "3.8"
- name: Install dependencies
run: pip install wheel
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Upload package
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@v1.8.5
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ sphinx:
configuration: docs/conf.py

python:
version: 3.7
version: 3.8
install:
- requirements: requirements-dev.txt
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,14 @@ you can run the following to automatically reformat your staged code
Note that you will then need to re-stage any changes ``pre-commit`` made to your code.

Building documentation requires [pandoc](https://pandoc.org/installing.html) as a separate install. Once installed, run

.. code-block:: bash
python -m sphinx -TEb html -d _build/doctrees -D language=en . ./build
Or check the build step in the most recent CI run or [RTD build](https://readthedocs.org/projects/pysindy/builds/).

There are a number of SINDy variants and advanced functionality that would be great to implement in future releases:

1. Bayesian SINDy, for instance that from Hirsh, Seth M., David A. Barajas-Solano, and J. Nathan Kutz. "Sparsifying Priors for Bayesian Uncertainty Quantification in Model Discovery." arXiv preprint arXiv:2107.02107 (2021).
Expand Down
24 changes: 12 additions & 12 deletions examples/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ PySINDy Examples

This directory showcases the following examples of PySINDy in action.

`Feature overview <./1_feature_overview.ipynb>`_
`Feature overview <./1_feature_overview/example.html>`_
-----------------------------------------------------------------------------------------------------------
This notebook gives an almost exhaustive overview of the different features available in PySINDy. It's a good reference for how to set various options and work with different types of datasets.

`Introduction to SINDy <./2_introduction_to_sindy/example.ipynb>`_
---------------------------------------------------------------------------------------------------------------------
We recommend that people new to SINDy start here. We give a gentle introduction to the SINDy method and how different steps in the algorithm are represented in PySINDy. We also show how to use PySINDy to learn a model for a simple linear differential equation.

`Original paper <./3_original_paper.ipynb>`_
`Original paper <./3_original_paper/example.html>`_
-------------------------------------------------------------------------------------------------------
This notebook uses PySINDy to reproduce the examples in the `original SINDy paper <https://www.pnas.org/content/pnas/113/15/3932.full.pdf>`_. Namely, it applies PySINDy to the following problems:

Expand All @@ -23,7 +23,7 @@ This notebook uses PySINDy to reproduce the examples in the `original SINDy pape
* Logistic map
* Hopf system

`Scikit-learn compatibility <./4_scikit_learn_compatibility.ipynb>`_
`Scikit-learn compatibility <./4_scikit_learn_compatibility/example.html>`_
-------------------------------------------------------------------------------------------------------------------------------
Shows how PySINDy interfaces with various Scikit-learn objects.

Expand All @@ -34,40 +34,40 @@ Shows how PySINDy interfaces with various Scikit-learn objects.
---------------------------------------------------------------------------------------------------------
Explore the differentiation methods available in PySINDy on pure differentiation problems and as components in the SINDy algorithm.

`Deeptime compatibility <./6_deeptime_compatibility.ipynb>`_
`Deeptime compatibility <./6_deeptime_compatibility/example.html>`_
------------------------------------------------------------------------------------------------------------------------
See a demonstration of PySINDy objects designed to conform to the `Deeptime <https://deeptime-ml.github.io/latest/index.html>`_ API.

`Plasma physics <./7_plasma_example.ipynb>`_
`Plasma physics <./7_plasma_example/example.html>`_
----------------------------------------------------------------------------------------------
Use the ``ConstrainedSR3`` optimizer to build a constrained model for the temporal POD modes of a plasma simulation.


`Trapping SINDy <./8_trapping_sindy_paper_examples.ipynb>`_
`Trapping SINDy <./8_trapping_sindy_paper_examples/example.html>`_
-----------------------------------------------------------------------------------------------------------
This notebook applies the ``TrappingSR3`` optimizer to various canonical fluid systems., proposed in this paper: Kaptanoglu, Alan A., et al. "Promoting global stability in data-driven models of quadratic nonlinear dynamics." Physical Review Fluids 6.9 (2021): 094401. A preprint is found here `<https://arxiv.org/abs/2105.01843>`_.

`SINDyPI <./9_sindypi_with_sympy.ipynb>`_
`SINDyPI <./9_sindypi_with_sympy/example.html>`_
----------------------------------------------------------------------------------------------
This notebook applies the ``SINDyPI`` optimizer to a simple implicit ODE and was originally proposed in this paper: Kaheman, Kadierdan, J. Nathan Kutz, and Steven L. Brunton. "SINDy-PI: a robust algorithm for parallel implicit sparse identification of nonlinear dynamics." Proceedings of the Royal Society A 476.2242 (2020): 20200279.

`PDEFIND <./10_PDEFIND_examples.ipynb>`_
`PDEFIND <./10_PDEFIND_examples/example.html>`_
----------------------------------------------------------------------------------------------
This notebook applies the PDEFIND algorithm (SINDy for PDE identification) to a number of PDEs, and was originally proposed in this paper: Rudy, Samuel H., et al. "Data-driven discovery of partial differential equations." Science Advances 3.4 (2017): e1602614.

`Greedy Algorithms <./11_SSR_FROLS_examples.ipynb>`_
`Greedy Algorithms <./11_SSR_FROLS_examples/example.html>`_
-----------------------------------------------------------------------------------------------------
This notebook uses the step-wise sparse regression (SSR) and forward-regression orthogonal least-squares (FROLS) algorithms, which are greedy algorithms that iteratively truncate (or add) one nonzero coefficient at each algorithm iteration.

`Weak formulation SINDy <./12_weakform_SINDy_examples.ipynb>`_
`Weak formulation SINDy <./12_weakform_SINDy_examples/example.html>`_
--------------------------------------------------------------------------------------------------------------
This notebook uses SINDy to identify the weak-formulation of a system of ODEs or PDEs, adding significant robustness against noise in the data.

`Model ensembles <./13_ensembling.ipynb>`_
`Model ensembles <./13_ensembling/example.html>`_
----------------------------------------------------------------------------------------------
This notebook uses sub-sampling of the data and sub-sampling of the SINDy library to generate many models, and the user can choose how to average or otherwise combine these models together. This tends to make SINDy more robust against noisy data.

`Cavity flow <./14_cavity_flow.ipynb>`_
`Cavity flow <./14_cavity_flow/example.html>`_
----------------------------------------------------------------------------------------------
Demonstrates the use of SINDy to learn a model for the quasiperiodic dynamics in a shear-driven cavity at Re=7500, following Callaham, Brunton, and Loiseau (2021), preprint available here `<https://arxiv.org/pdf/2106.02409>`_.

Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-e .
-r requirements.txt
pytest~=6.0.0
pytest>=6.2.4
black
pytest-cov
pytest-lazy-fixture
Expand All @@ -12,15 +12,15 @@ setuptools_scm_git_archive
jupyter
jupytext
notebook
sphinx >= 2
sphinx==5.3.0
sphinxcontrib-apidoc
sphinx_rtd_theme
pre-commit
hypothesis
nbsphinx
jupyter_contrib_nbextensions
pandas
pandoc
seaborn
ipython
scs<=2.1.4
gurobipy>=9.5.1,<10.0
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ scipy
derivative
matplotlib
cmake
scs>=2.1,!=2.1.4
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
Expand Down

0 comments on commit 4c32d26

Please sign in to comment.