From f9b22928f3f3ba11e40bcd35be0ed6db9e03b11d Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 08:52:48 -0600 Subject: [PATCH 01/19] Convert readme to md format --- README.md | 145 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..ba88f5f --- /dev/null +++ b/README.md @@ -0,0 +1,145 @@ +--- +title: SParse Optimization Research COde (SPORCO) +--- + +[![Supported Python Versions](https://img.shields.io/pypi/pyversions/sporco.svg)](https://github.com/bwohlberg/sporco) +[![Package License](https://img.shields.io/github/license/bwohlberg/sporco.svg)](https://github.com/bwohlberg/sporco/blob/master/LICENSE) +[![Documentation Status](https://readthedocs.org/projects/sporco/badge/?version=latest)](http://sporco.readthedocs.io/en/latest/?badge=latest) +[![DOI](https://img.shields.io/badge/DOI-10.25080%2Fshinma--7f4c6e7--001-blue.svg)](https://dx.doi.org/10.25080/shinma-7f4c6e7-001)\ +[![Test status](https://github.com/bwohlberg/sporco/actions/workflows/pytest.yml/badge.svg)](https://github.com/bwohlberg/sporco/actions/workflows/pytest.yml) +[![Test Coverage](https://codecov.io/gh/bwohlberg/sporco/branch/master/graph/badge.svg)](https://codecov.io/gh/bwohlberg/sporco)\ +[![PyPi Release](https://badge.fury.io/py/sporco.svg)](https://badge.fury.io/py/sporco) +[![PyPi Downloads](https://static.pepy.tech/personalized-badge/sporco?period=total&left_color=grey&right_color=brightgreen&left_text=downloads)](https://pepy.tech/project/sporco) +[![Conda Forge Release](https://img.shields.io/conda/vn/conda-forge/sporco.svg)](https://anaconda.org/conda-forge/sporco) +[![Conda Forge Downloads](https://img.shields.io/conda/dn/conda-forge/sporco.svg)](https://anaconda.org/conda-forge/sporco)\ +[![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/bwohlberg/sporco-notebooks/master?filepath=index.ipynb) + +| + +SPORCO is a Python package for solving optimisation problems with +sparsity-inducing regularisation. These consist primarily of sparse +coding and dictionary learning problems, including convolutional sparse +coding and dictionary learning, but there is also support for other +problems such as Total Variation regularisation and Robust PCA. The +optimisation algorithms in the current version are based on the +Alternating Direction Method of Multipliers (ADMM) or on the Proximal +Gradient Method (PGM). + +If you use this software for published work, please [cite +it](http://sporco.readthedocs.io/en/latest/overview.html#citing). + +# Documentation + +[Documentation](http://sporco.rtfd.io/) is available online, or can be +built from the root directory of the source distribution by the command + + python setup.py build_sphinx + +in which case the HTML documentation can be found in the +`build/sphinx/html` directory (the top-level document is `index.html`). +Although the SPORCO package itself is compatible with Python 3.x, +building the documention requires Python 3.3 or later due to the use of +[Jonga](https://github.com/bwohlberg/jonga) to construct call graph +images for the SPORCO optimisation class hierarchies. + +An overview of the package design and functionality is also available in + +> Brendt Wohlberg, [SPORCO: A Python package for standard and convolutional sparse +> representations](http://conference.scipy.org/proceedings/scipy2017/brendt_wohlberg.html), +> in Proceedings of the 15th Python in Science Conference, (Austin, TX, +> USA), +> \<\>\`\_, pp. 1\--8, +> Jul 2017 + +# Usage + +Scripts illustrating usage of the package can be found in the `examples` +directory of the source distribution. These examples can be run from the +root directory of the package by, for example + + python examples/scripts/sc/bpdn.py + +To run these scripts prior to installing the package it will be +necessary to first set the `PYTHONPATH` environment variable to include +the root directory of the package. For example, in a `bash` shell + + export PYTHONPATH=$PYTHONPATH:`pwd` + +from the root directory of the package. + +[Jupyter Notebook](http://jupyter.org/) examples are also +[available](https://github.com/bwohlberg/sporco-notebooks). These +examples can be viewed online via +[nbviewer](https://nbviewer.jupyter.org/github/bwohlberg/sporco-notebooks/blob/master/index.ipynb), +or run interactively at +[binder](https://mybinder.org/v2/gh/bwohlberg/sporco-notebooks/master?filepath=index.ipynb). + +# Requirements + +The primary requirements are Python itself, and modules +[future](http://python-future.org), [numpy](http://www.numpy.org), +[scipy](https://www.scipy.org), [imageio](https://imageio.github.io/), +[pyfftw](https://hgomersall.github.io/pyFFTW), and +[matplotlib](http://matplotlib.org). Module +[numexpr](https://github.com/pydata/numexpr) is not required, but some +functions will be faster if it is installed. If module +[mpldatacursor](https://github.com/joferkington/mpldatacursor) is +installed, functions `plot.plot`, `plot.contour`, and `plot.imview` will +support the data cursor that it provides. + +Instructions for installing these requirements are provided in the +[Requirements](http://sporco.rtfd.io/en/latest/install.html#requirements) +section of the package documentation. + +# Installation + +To install the most recent release of SPORCO from +[PyPI](https://pypi.python.org/pypi/sporco/) do + + pip install sporco + +The [development version](https://github.com/bwohlberg/sporco) on GitHub +can be installed by doing + + pip install git+https://github.com/bwohlberg/sporco + +or by doing + + git clone https://github.com/bwohlberg/sporco.git + +followed by + + cd sporco + python setup.py build + python setup.py install + +The install commands will usually have to be performed with root +privileges. + +SPORCO can also be installed as a [conda](https://conda.io/docs/) +package from the [conda-forge](https://conda-forge.org/) channel + + conda install -c conda-forge sporco + +A summary of the most significant changes between SPORCO releases can be +found in the `CHANGES.rst` file. It is strongly recommended to consult +this summary when updating from a previous version. + +# Extensions + +Some additional components of SPORCO are made available in separate +repositories: + +- [SPORCO-CUDA](https://github.com/bwohlberg/sporco-cuda): + GPU-accelerated versions of selected convolutional sparse coding + algorithms +- [SPORCO Notebooks](https://github.com/bwohlberg/sporco-notebooks): + Jupyter Notebook versions of the example scripts distributed with + SPORCO +- [SPORCO Extra](https://github.com/bwohlberg/sporco-extra): + Additional examples, data, and contributed code + +# License + +SPORCO is distributed as open-source software under a BSD 3-Clause +License (see the `LICENSE` file for details). From df7632fdb4c3a838ef61922e3ff082d41ab92a5b Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 08:59:39 -0600 Subject: [PATCH 02/19] Clean up --- README.md | 101 ++++++++++++++++-------------------------------------- 1 file changed, 29 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index ba88f5f..1b44fa2 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,6 @@ ---- -title: SParse Optimization Research COde (SPORCO) ---- - [![Supported Python Versions](https://img.shields.io/pypi/pyversions/sporco.svg)](https://github.com/bwohlberg/sporco) [![Package License](https://img.shields.io/github/license/bwohlberg/sporco.svg)](https://github.com/bwohlberg/sporco/blob/master/LICENSE) -[![Documentation Status](https://readthedocs.org/projects/sporco/badge/?version=latest)](http://sporco.readthedocs.io/en/latest/?badge=latest) -[![DOI](https://img.shields.io/badge/DOI-10.25080%2Fshinma--7f4c6e7--001-blue.svg)](https://dx.doi.org/10.25080/shinma-7f4c6e7-001)\ +[![Documentation Status](https://readthedocs.org/projects/sporco/badge/?version=latest)](http://sporco.readthedocs.io/en/latest/?badge=latest)\ [![Test status](https://github.com/bwohlberg/sporco/actions/workflows/pytest.yml/badge.svg)](https://github.com/bwohlberg/sporco/actions/workflows/pytest.yml) [![Test Coverage](https://codecov.io/gh/bwohlberg/sporco/branch/master/graph/badge.svg)](https://codecov.io/gh/bwohlberg/sporco)\ [![PyPi Release](https://badge.fury.io/py/sporco.svg)](https://badge.fury.io/py/sporco) @@ -13,93 +8,60 @@ title: SParse Optimization Research COde (SPORCO) [![Conda Forge Release](https://img.shields.io/conda/vn/conda-forge/sporco.svg)](https://anaconda.org/conda-forge/sporco) [![Conda Forge Downloads](https://img.shields.io/conda/dn/conda-forge/sporco.svg)](https://anaconda.org/conda-forge/sporco)\ [![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/bwohlberg/sporco-notebooks/master?filepath=index.ipynb) +[![DOI](https://img.shields.io/badge/DOI-10.25080%2Fshinma--7f4c6e7--001-blue.svg)](https://dx.doi.org/10.25080/shinma-7f4c6e7-001) + -| +# SParse Optimization Research COde (SPORCO) -SPORCO is a Python package for solving optimisation problems with -sparsity-inducing regularisation. These consist primarily of sparse -coding and dictionary learning problems, including convolutional sparse -coding and dictionary learning, but there is also support for other -problems such as Total Variation regularisation and Robust PCA. The -optimisation algorithms in the current version are based on the -Alternating Direction Method of Multipliers (ADMM) or on the Proximal -Gradient Method (PGM). +SPORCO is a Python package for solving optimisation problems with sparsity-inducing regularisation. These consist primarily of sparse coding and dictionary learning problems, including convolutional sparse coding and dictionary learning, but there is also support for other problems such as Total Variation regularisation and Robust PCA. The optimisation algorithms in the current version are based on the Alternating Direction Method of Multipliers (ADMM) or on the Proximal Gradient Method (PGM). + +If you use this software for published work, please [cite it](http://sporco.readthedocs.io/en/latest/overview.html#citing). -If you use this software for published work, please [cite -it](http://sporco.readthedocs.io/en/latest/overview.html#citing). # Documentation -[Documentation](http://sporco.rtfd.io/) is available online, or can be -built from the root directory of the source distribution by the command +[Documentation](http://sporco.rtfd.io/) is available online, or can be built from the root directory of the source distribution by the command python setup.py build_sphinx -in which case the HTML documentation can be found in the -`build/sphinx/html` directory (the top-level document is `index.html`). -Although the SPORCO package itself is compatible with Python 3.x, -building the documention requires Python 3.3 or later due to the use of -[Jonga](https://github.com/bwohlberg/jonga) to construct call graph -images for the SPORCO optimisation class hierarchies. +in which case the HTML documentation can be found in the `build/sphinx/html` directory (the top-level document is `index.html`). Although the SPORCO package itself is compatible with Python 3.x, building the documention requires Python 3.3 or later due to the use of [Jonga](https://github.com/bwohlberg/jonga) to construct call graph images for the SPORCO optimisation class hierarchies. An overview of the package design and functionality is also available in -> Brendt Wohlberg, [SPORCO: A Python package for standard and convolutional sparse -> representations](http://conference.scipy.org/proceedings/scipy2017/brendt_wohlberg.html), -> in Proceedings of the 15th Python in Science Conference, (Austin, TX, -> USA), -> \<\>\`\_, pp. 1\--8, -> Jul 2017 +> Brendt Wohlberg, [SPORCO: A Python package for standard and convolutional sparse representations](http://conference.scipy.org/proceedings/scipy2017/brendt_wohlberg.html), +> in Proceedings of the 15th Python in Science Conference, (Austin, TX, USA), +> \<\>, pp. 1--8, Jul 2017 + # Usage -Scripts illustrating usage of the package can be found in the `examples` -directory of the source distribution. These examples can be run from the -root directory of the package by, for example +Scripts illustrating usage of the package can be found in the `examples` directory of the source distribution. These examples can be run from the root directory of the package by, for example python examples/scripts/sc/bpdn.py -To run these scripts prior to installing the package it will be -necessary to first set the `PYTHONPATH` environment variable to include -the root directory of the package. For example, in a `bash` shell +To run these scripts prior to installing the package it will be necessary to first set the `PYTHONPATH` environment variable to include the root directory of the package. For example, in a `bash` shell export PYTHONPATH=$PYTHONPATH:`pwd` from the root directory of the package. -[Jupyter Notebook](http://jupyter.org/) examples are also -[available](https://github.com/bwohlberg/sporco-notebooks). These -examples can be viewed online via -[nbviewer](https://nbviewer.jupyter.org/github/bwohlberg/sporco-notebooks/blob/master/index.ipynb), -or run interactively at -[binder](https://mybinder.org/v2/gh/bwohlberg/sporco-notebooks/master?filepath=index.ipynb). +[Jupyter Notebook](http://jupyter.org/) examples are also [available](https://github.com/bwohlberg/sporco-notebooks). These examples can be viewed online via [nbviewer](https://nbviewer.jupyter.org/github/bwohlberg/sporco-notebooks/blob/master/index.ipynb), or run interactively at [binder](https://mybinder.org/v2/gh/bwohlberg/sporco-notebooks/master?filepath=index.ipynb). + # Requirements -The primary requirements are Python itself, and modules -[future](http://python-future.org), [numpy](http://www.numpy.org), -[scipy](https://www.scipy.org), [imageio](https://imageio.github.io/), -[pyfftw](https://hgomersall.github.io/pyFFTW), and -[matplotlib](http://matplotlib.org). Module -[numexpr](https://github.com/pydata/numexpr) is not required, but some -functions will be faster if it is installed. If module -[mpldatacursor](https://github.com/joferkington/mpldatacursor) is -installed, functions `plot.plot`, `plot.contour`, and `plot.imview` will -support the data cursor that it provides. - -Instructions for installing these requirements are provided in the -[Requirements](http://sporco.rtfd.io/en/latest/install.html#requirements) -section of the package documentation. +The primary requirements are Python itself, and modules [future](http://python-future.org), [numpy](http://www.numpy.org), [scipy](https://www.scipy.org), [imageio](https://imageio.github.io/), [pyfftw](https://hgomersall.github.io/pyFFTW), and [matplotlib](http://matplotlib.org). Module [numexpr](https://github.com/pydata/numexpr) is not required, but some functions will be faster if it is installed. If module [mpldatacursor](https://github.com/joferkington/mpldatacursor) is installed, functions `plot.plot`, `plot.contour`, and `plot.imview` will support the data cursor that it provides. + +Instructions for installing these requirements are provided in the [Requirements](http://sporco.rtfd.io/en/latest/install.html#requirements) section of the package documentation. + # Installation -To install the most recent release of SPORCO from -[PyPI](https://pypi.python.org/pypi/sporco/) do +To install the most recent release of SPORCO from [PyPI](https://pypi.python.org/pypi/sporco/) do pip install sporco -The [development version](https://github.com/bwohlberg/sporco) on GitHub -can be installed by doing +The [development version](https://github.com/bwohlberg/sporco) on GitHub can be installed by doing pip install git+https://github.com/bwohlberg/sporco @@ -113,22 +75,18 @@ followed by python setup.py build python setup.py install -The install commands will usually have to be performed with root -privileges. +The install commands will usually have to be performed with root privileges. -SPORCO can also be installed as a [conda](https://conda.io/docs/) -package from the [conda-forge](https://conda-forge.org/) channel +SPORCO can also be installed as a [conda](https://conda.io/docs/) package from the [conda-forge](https://conda-forge.org/) channel conda install -c conda-forge sporco -A summary of the most significant changes between SPORCO releases can be -found in the `CHANGES.rst` file. It is strongly recommended to consult -this summary when updating from a previous version. +A summary of the most significant changes between SPORCO releases can be found in the `CHANGES.rst` file. It is strongly recommended to consult this summary when updating from a previous version. + # Extensions -Some additional components of SPORCO are made available in separate -repositories: +Some additional components of SPORCO are made available in separate repositories: - [SPORCO-CUDA](https://github.com/bwohlberg/sporco-cuda): GPU-accelerated versions of selected convolutional sparse coding @@ -141,5 +99,4 @@ repositories: # License -SPORCO is distributed as open-source software under a BSD 3-Clause -License (see the `LICENSE` file for details). +SPORCO is distributed as open-source software under a BSD 3-Clause License (see the `LICENSE` file for details). From 1889321344bf007d8a44346045da04bacedc5f88 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 09:01:50 -0600 Subject: [PATCH 03/19] Clean up --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1b44fa2..d4f416d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Supported Python Versions](https://img.shields.io/pypi/pyversions/sporco.svg)](https://github.com/bwohlberg/sporco) [![Package License](https://img.shields.io/github/license/bwohlberg/sporco.svg)](https://github.com/bwohlberg/sporco/blob/master/LICENSE) -[![Documentation Status](https://readthedocs.org/projects/sporco/badge/?version=latest)](http://sporco.readthedocs.io/en/latest/?badge=latest)\ +[![Documentation Status](https://readthedocs.org/projects/sporco/badge/?version=latest)](http://sporco.readthedocs.io/en/latest/?badge=latest) [![Test status](https://github.com/bwohlberg/sporco/actions/workflows/pytest.yml/badge.svg)](https://github.com/bwohlberg/sporco/actions/workflows/pytest.yml) [![Test Coverage](https://codecov.io/gh/bwohlberg/sporco/branch/master/graph/badge.svg)](https://codecov.io/gh/bwohlberg/sporco)\ [![PyPi Release](https://badge.fury.io/py/sporco.svg)](https://badge.fury.io/py/sporco) @@ -29,8 +29,7 @@ in which case the HTML documentation can be found in the `build/sphinx/html` dir An overview of the package design and functionality is also available in > Brendt Wohlberg, [SPORCO: A Python package for standard and convolutional sparse representations](http://conference.scipy.org/proceedings/scipy2017/brendt_wohlberg.html), -> in Proceedings of the 15th Python in Science Conference, (Austin, TX, USA), -> \<\>, pp. 1--8, Jul 2017 +> in Proceedings of the 15th Python in Science Conference, (Austin, TX, USA), doi:10.25080/shinma-7f4c6e7-001, pp. 1--8, Jul 2017 # Usage From 8c7adf4fd2343fe7d25bb52ba18783339805314f Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 09:03:43 -0600 Subject: [PATCH 04/19] Remove rst version of readme --- README.rst | 159 ----------------------------------------------------- 1 file changed, 159 deletions(-) delete mode 100644 README.rst diff --git a/README.rst b/README.rst deleted file mode 100644 index e1e2485..0000000 --- a/README.rst +++ /dev/null @@ -1,159 +0,0 @@ -SParse Optimization Research COde (SPORCO) -========================================== - - -.. image:: https://img.shields.io/pypi/pyversions/sporco.svg - :target: https://github.com/bwohlberg/sporco - :alt: Supported Python Versions -.. image:: https://img.shields.io/github/license/bwohlberg/sporco.svg - :target: https://github.com/bwohlberg/sporco/blob/master/LICENSE - :alt: Package License -.. image:: https://readthedocs.org/projects/sporco/badge/?version=latest - :target: http://sporco.readthedocs.io/en/latest/?badge=latest - :alt: Documentation Status -.. image:: https://github.com/bwohlberg/sporco/actions/workflows/pytest.yml/badge.svg - :target: https://github.com/bwohlberg/sporco/actions/workflows/pytest.yml - :alt: Test status -.. image:: https://codecov.io/gh/bwohlberg/sporco/branch/master/graph/badge.svg - :target: https://codecov.io/gh/bwohlberg/sporco - :alt: Test Coverage - -.. image:: https://badge.fury.io/py/sporco.svg - :target: https://badge.fury.io/py/sporco - :alt: PyPi Release -.. image:: https://static.pepy.tech/personalized-badge/sporco?period=total&left_color=grey&right_color=brightgreen&left_text=downloads - :target: https://pepy.tech/project/sporco - :alt: PyPi Downloads - -.. image:: https://img.shields.io/conda/vn/conda-forge/sporco.svg - :target: https://anaconda.org/conda-forge/sporco - :alt: Conda Forge Release -.. image:: https://img.shields.io/conda/dn/conda-forge/sporco.svg - :target: https://anaconda.org/conda-forge/sporco - :alt: Conda Forge Downloads - -.. image:: http://mybinder.org/badge.svg - :target: https://mybinder.org/v2/gh/bwohlberg/sporco-notebooks/master?filepath=index.ipynb - :alt: Binder - -.. image:: https://img.shields.io/badge/DOI-10.25080%2Fshinma--7f4c6e7--001-blue.svg - :target: https://dx.doi.org/10.25080/shinma-7f4c6e7-001 - :alt: DOI - -| - - -SPORCO is a Python package for solving optimisation problems with sparsity-inducing regularisation. These consist primarily of sparse coding and dictionary learning problems, including convolutional sparse coding and dictionary learning, but there is also support for other problems such as Total Variation regularisation and Robust PCA. The optimisation algorithms in the current version are based on the Alternating Direction Method of Multipliers (ADMM) or on the Proximal Gradient Method (PGM). - -If you use this software for published work, please `cite it `__. - - -Documentation -------------- - -`Documentation `_ is available online, or can be built from the root directory of the source distribution by the command - -:: - - python setup.py build_sphinx - -in which case the HTML documentation can be found in the ``build/sphinx/html`` directory (the top-level document is ``index.html``). Although the SPORCO package itself is compatible with Python 3.x, building the documention requires Python 3.3 or later due to the use of `Jonga `_ to construct call graph images for the SPORCO optimisation class hierarchies. - - -An overview of the package design and functionality is also available in - - Brendt Wohlberg, `SPORCO: A Python package for standard and convolutional sparse representations `_, in Proceedings of the 15th Python in Science Conference, (Austin, TX, USA), doi:`10.25080/shinma-7f4c6e7-001 `_, pp. 1--8, Jul 2017 - - -Usage ------ - -Scripts illustrating usage of the package can be found in the ``examples`` directory of the source distribution. These examples can be run from the root directory of the package by, for example - -:: - - python examples/scripts/sc/bpdn.py - - -To run these scripts prior to installing the package it will be necessary to first set the ``PYTHONPATH`` environment variable to include the root directory of the package. For example, in a ``bash`` shell - -:: - - export PYTHONPATH=$PYTHONPATH:`pwd` - - -from the root directory of the package. - - -`Jupyter Notebook `_ examples are also `available `_. These examples can be viewed online via `nbviewer `_, or run interactively at `binder `_. - - - -Requirements ------------- - -The primary requirements are Python itself, and modules `future `__, `numpy `__, `scipy `__, `imageio `__, `pyfftw `__, and `matplotlib `__. Module `numexpr `__ is not required, but some functions will be faster if it is installed. If module `mpldatacursor `__ is installed, functions ``plot.plot``, ``plot.contour``, and ``plot.imview`` will support the data cursor that it provides. - -Instructions for installing these requirements are provided in the `Requirements `__ section of the package documentation. - - -Installation ------------- - -To install the most recent release of SPORCO from `PyPI `__ do - -:: - - pip install sporco - - -The `development version `__ on GitHub can be installed by doing - -:: - - pip install git+https://github.com/bwohlberg/sporco - -or by doing - -:: - - git clone https://github.com/bwohlberg/sporco.git - -followed by - -:: - - cd sporco - python setup.py build - python setup.py install - -The install commands will usually have to be performed with root privileges. - - -SPORCO can also be installed as a `conda `__ package from the `conda-forge `__ channel - -:: - - conda install -c conda-forge sporco - - - -A summary of the most significant changes between SPORCO releases can be found in the ``CHANGES.rst`` file. It is strongly recommended to consult this summary when updating from a previous version. - - -Extensions ----------- - -Some additional components of SPORCO are made available in separate repositories: - -* `SPORCO-CUDA `__: GPU-accelerated versions of selected convolutional sparse coding algorithms - -* `SPORCO Notebooks `__: Jupyter Notebook versions of the example scripts distributed with SPORCO - -* `SPORCO Extra `__: Additional examples, data, and contributed code - - -License -------- - -SPORCO is distributed as open-source software under a BSD 3-Clause License (see the ``LICENSE`` file for details). From 14702f51dee68b20671d9f5fb6d3531ed8a55ba0 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 09:13:13 -0600 Subject: [PATCH 05/19] Update actions version --- .github/workflows/pypi_upload.yml | 4 ++-- .github/workflows/pytest.yml | 6 +++--- .github/workflows/pytest_windows.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml index ac84fa9..545cd6d 100644 --- a/.github/workflows/pypi_upload.yml +++ b/.github/workflows/pypi_upload.yml @@ -15,11 +15,11 @@ jobs: name: Upload package to PyPI runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Install Python 3 - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: 3.8 - name: Install dependencies diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 408c82d..94acdb8 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -19,10 +19,10 @@ jobs: os: [ubuntu-latest, macOS-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -38,7 +38,7 @@ jobs: $CONDA/bin/pytest --cov=sporco --cov-report=xml - name: Upload coverage to codecov if: matrix.os == 'ubuntu-latest' - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: env_vars: OS,PYTHON fail_ci_if_error: false diff --git a/.github/workflows/pytest_windows.yml b/.github/workflows/pytest_windows.yml index af0cde1..cb9562b 100644 --- a/.github/workflows/pytest_windows.yml +++ b/.github/workflows/pytest_windows.yml @@ -20,10 +20,10 @@ jobs: os: [windows-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} From bd095ee570ecf5bd9af9102f229d842a99cff13c Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 09:32:37 -0600 Subject: [PATCH 06/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 94acdb8..b1f83c7 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -13,29 +13,28 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8, 3.9] -# python-version: [3.8] -# os: [ubuntu-latest, macOS-latest, windows-latest] + python-version: [3.9, 3.10] os: [ubuntu-latest, macOS-latest] steps: - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + - uses: conda-incubator/setup-miniconda@v3 with: + auto-update-conda: true + activate-environment: test-env python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - $CONDA/bin/conda config --env --append channels conda-forge - $CONDA/bin/conda env update --file requirements.txt --name base - $CONDA/bin/conda install pytest-cov - $CONDA/bin/python -m pip install --upgrade pip - $CONDA/bin/pip install -e . + conda config --env --append channels conda-forge + conda env update --file requirements.txt --name base + conda install pytest-cov + python -m pip install --upgrade pip + pip install -e . - name: Unit tests run: | - $CONDA/bin/pytest --cov=sporco --cov-report=xml + pytest --cov=sporco --cov-report=xml - name: Upload coverage to codecov if: matrix.os == 'ubuntu-latest' uses: codecov/codecov-action@v3 From cf0bff114a125795253a3094224823580dffa4d0 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 09:33:58 -0600 Subject: [PATCH 07/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index b1f83c7..485df22 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.9, 3.10] + python-version: ["3.9", "3.10"] os: [ubuntu-latest, macOS-latest] steps: From 27bd0ce56262019f800a913dbcce376441b84810 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 09:47:23 -0600 Subject: [PATCH 08/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 485df22..266ec58 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -27,10 +27,9 @@ jobs: - name: Install dependencies run: | - conda config --env --append channels conda-forge - conda env update --file requirements.txt --name base - conda install pytest-cov + conda install -c conda-forge pytest pytest-cov python -m pip install --upgrade pip + pip install -r requirements.txt pip install -e . - name: Unit tests run: | From 58fcb6c305af825a098d575b8b5d784b94d875fe Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 10:12:11 -0600 Subject: [PATCH 09/19] Remove dependency --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4229fd2..1de2698 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,4 @@ scipy>=0.19.1 imageio matplotlib>=1.3.1 pyfftw>=0.10.4 -pytest-runner pytest From a8b4d1f1107c9016cbe676eaa149901e0621202d Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 10:12:15 -0600 Subject: [PATCH 10/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 266ec58..d34d559 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -18,22 +18,21 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true activate-environment: test-env python-version: ${{ matrix.python-version }} - - name: Install dependencies run: | conda install -c conda-forge pytest pytest-cov python -m pip install --upgrade pip + pip install pytest-cov pip install -r requirements.txt pip install -e . - name: Unit tests run: | - pytest --cov=sporco --cov-report=xml + pytest --cov=sporco --cov-report xml - name: Upload coverage to codecov if: matrix.os == 'ubuntu-latest' uses: codecov/codecov-action@v3 From 1e563202189a974fde678ff4af51070b80cde95d Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 10:17:57 -0600 Subject: [PATCH 11/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index d34d559..58c6801 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: python-version: ["3.9", "3.10"] - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-latest, macOS-latest, windows-latest] steps: - uses: actions/checkout@v3 @@ -27,7 +27,7 @@ jobs: run: | conda install -c conda-forge pytest pytest-cov python -m pip install --upgrade pip - pip install pytest-cov + pip install pytest-cov setuptools pip install -r requirements.txt pip install -e . - name: Unit tests From 5a9e93835880d357a7446b0e14fcad61d5241d3c Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 10:28:05 -0600 Subject: [PATCH 12/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 58c6801..da8d406 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -23,6 +23,9 @@ jobs: auto-update-conda: true activate-environment: test-env python-version: ${{ matrix.python-version }} + - name: Display environment details + run: | + conda info - name: Install dependencies run: | conda install -c conda-forge pytest pytest-cov From bed668f2ddea0fc72a2be750f6e607ddf26bdd4d Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 10:29:02 -0600 Subject: [PATCH 13/19] Remove separate windows test workflow --- .github/workflows/pytest_windows.yml | 42 ---------------------------- 1 file changed, 42 deletions(-) delete mode 100644 .github/workflows/pytest_windows.yml diff --git a/.github/workflows/pytest_windows.yml b/.github/workflows/pytest_windows.yml deleted file mode 100644 index cb9562b..0000000 --- a/.github/workflows/pytest_windows.yml +++ /dev/null @@ -1,42 +0,0 @@ -# Run pytest on windows. See -# https://autobencoder.com/2020-08-24-conda-actions/ - -name: test-windows - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - workflow_dispatch: - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - python-version: [3.8, 3.9] - os: [windows-latest] - - steps: - - uses: actions/checkout@v3 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - C:\Miniconda\condabin\conda.bat config --env --append channels conda-forge - C:\Miniconda\condabin\conda.bat env update --file requirements.txt --name base - C:\Miniconda\condabin\conda.bat init powershell - - name: Unit tests - run: | - C:\Miniconda\condabin\conda.bat activate base - C:\Miniconda\condabin\conda.bat install pytest - pytest - - - From f28cacc9b640276ec8696426afb1adb638f1cfd1 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 10:35:58 -0600 Subject: [PATCH 14/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index da8d406..0f4ca06 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -23,6 +23,9 @@ jobs: auto-update-conda: true activate-environment: test-env python-version: ${{ matrix.python-version }} + - name: Activate environment + run: | + conda activate test-env - name: Display environment details run: | conda info From 4741db9bd086e05e14926d576933979a1cbf4574 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 10:37:34 -0600 Subject: [PATCH 15/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 0f4ca06..1fe7e46 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -25,6 +25,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Activate environment run: | + conda init conda activate test-env - name: Display environment details run: | From 96b86901a9c02518b81f8526a57a679efa75c9f0 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 10:40:31 -0600 Subject: [PATCH 16/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 1fe7e46..e9163b6 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -20,13 +20,13 @@ jobs: - uses: actions/checkout@v3 - uses: conda-incubator/setup-miniconda@v3 with: + python-version: ${{ matrix.python-version }} auto-update-conda: true activate-environment: test-env - python-version: ${{ matrix.python-version }} + auto-activate-base: false - name: Activate environment run: | - conda init - conda activate test-env + source activate test-env - name: Display environment details run: | conda info From f46b67998f6831ecaf3cbfc616d7efc7b8901062 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 10:44:13 -0600 Subject: [PATCH 17/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index e9163b6..0994356 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -18,15 +18,13 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: conda-incubator/setup-miniconda@v3 + - name: Set up conda environment + uses: conda-incubator/setup-miniconda@v3 with: python-version: ${{ matrix.python-version }} auto-update-conda: true activate-environment: test-env auto-activate-base: false - - name: Activate environment - run: | - source activate test-env - name: Display environment details run: | conda info From 74bec7495ecaf71c7e506b3b874298803cf01e04 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 10:51:36 -0600 Subject: [PATCH 18/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 0994356..78ff20c 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -10,6 +10,9 @@ on: jobs: build: runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash -el {0} strategy: fail-fast: false matrix: From b19f452c248119d45fbb7da61eb01376623cf2f4 Mon Sep 17 00:00:00 2001 From: Brendt Wohlberg Date: Mon, 29 Apr 2024 10:58:03 -0600 Subject: [PATCH 19/19] Attempt to fix workflow --- .github/workflows/pytest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 78ff20c..0e4fbe2 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -34,8 +34,9 @@ jobs: - name: Install dependencies run: | conda install -c conda-forge pytest pytest-cov + conda install -c conda-forge pyfftw python -m pip install --upgrade pip - pip install pytest-cov setuptools + pip install setuptools pip install -r requirements.txt pip install -e . - name: Unit tests