Skip to content

Commit 6befcf4

Browse files
authored
Merge pull request #146 from PyLops/dev
Merge for v0.7.0
2 parents 30c4c80 + f6c378d commit 6befcf4

35 files changed

+842
-188
lines changed

.github/workflows/build.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,30 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
8-
runs-on: ubuntu-latest
97
strategy:
108
matrix:
11-
python-version: [3.8]
9+
platform: [ ubuntu-latest, macos-latest ]
10+
python-version: ["3.8", "3.9", "3.10"]
1211

12+
runs-on: ${{ matrix.platform }}
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
15+
- name: Get history and tags for SCM versioning to work
16+
run: |
17+
git fetch --prune --unshallow
18+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
1519
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v2
20+
uses: actions/setup-python@v4
1721
with:
1822
python-version: ${{ matrix.python-version }}
1923
- name: Install dependencies
2024
run: |
21-
python -m pip install --upgrade pip
25+
python -m pip install --upgrade pip setuptools
2226
pip install flake8 pytest
2327
if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi
2428
- name: Install pyproximal
2529
run: |
30+
python -m setuptools_scm
2631
pip install .
2732
- name: Test with pytest
2833
run: |

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ sphinx:
2121
python:
2222
install:
2323
- requirements: requirements-dev.txt
24-
- method: setuptools
24+
- method: pip
2525
path: .

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# 0.7.0
2+
3+
* Added ``pyproximal.proximal.RelaxedMumfordShah`` operator
4+
* Added cuda version to the proximal operator of ``pyproximal.proximal.Simplex``
5+
* Added bilinear update to ``pyproximal.optimization.primal.ProximalGradient``
6+
* Modified ``pyproximal.optimization.pnp.PlugAndPlay`` function signature to allow using any proximal solver of choice
7+
* Fixed print in ``pyproximal.optimization.primaldual.PrimalDual`` when using cupy arrays
8+
* Fixed ``pyproximal.utils.bilinear.LowRankFactorizedMatrix`` when ``n=m``
9+
110
# 0.6.0
211

312
:vertical_traffic_light: :vertical_traffic_light: This is the first release supporting PyLops v2.
@@ -14,7 +23,7 @@
1423
:vertical_traffic_light: :vertical_traffic_light:
1524

1625
* Added ``pyproximal.proximal.Log1`` operator
17-
* Allow ``radius`` parameter of ``pyproximal.optimization.primal.L0`` to be a function
26+
* Allow ``radius`` parameter of ``pyproximal.proximal.L0`` to be a function
1827
* Allow ``tau`` parameter of ``pyproximal.optimization.primal.HQS`` to be a vector
1928
and change over iterations
2029
* Added ``z0`` to ``pyproximal.optimization.primal.HQS``

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dev-install_conda:
3131

3232
tests:
3333
make pythoncheck
34-
$(PYTHON) setup.py test
34+
pytest
3535

3636
doc:
3737
cd docs && rm -rf source/api/generated && rm -rf source/gallery &&\

README.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
# PyProximal
1+
![PyProximal](https://github.com/PyLops/pyproximal/blob/dev/docs/source/_static/pyproximal_b.png)
22

33
[![PyPI version](https://badge.fury.io/py/pyproximal.svg)](https://badge.fury.io/py/pyproximal)
44
[![Build Status](https://travis-ci.com/PyLops/pyproximal.svg?branch=main)](https://travis-ci.com/PyLops/pyproximal)
5-
[![AzureDevOps Status](https://dev.azure.com/matteoravasi/PyLops/_apis/build/status/PyLops.pyproximal?branchName=main)](https://dev.azure.com/matteoravasi/PyLops/_build/latest?definitionId=10&branchName=main)
5+
[![AzureDevOps Status](https://dev.azure.com/matteoravasi/PyLops/_apis/build/status%2FPyLops.pyproximal?branchName=refs%2Fpull%2F129%2Fmerge)](https://dev.azure.com/matteoravasi/PyLops/_build/latest?definitionId=10&branchName=refs%2Fpull%2F129%2Fmerge)
66
![GithubAction Status](https://github.com/PyLops/pyproximal/workflows/PyProx/badge.svg)
77
[![Documentation Status](https://readthedocs.org/projects/pyproximal/badge/?version=latest)](https://pyproximal.readthedocs.io/en/latest/?badge=latest)
88
[![OS-support](https://img.shields.io/badge/OS-linux,osx-850A8B.svg)](https://github.com/PyLops/pyproximal)
99
[![Slack Status](https://img.shields.io/badge/chat-slack-green.svg)](https://pylops.slack.com)
1010

1111

12+
1213
:vertical_traffic_light: :vertical_traffic_light: This library is under early development.
1314
Expect things to constantly change until version v1.0.0. :vertical_traffic_light: :vertical_traffic_light:
1415

@@ -75,11 +76,10 @@ xladmm, _ = LinearizedADMM(l2, l1, Dop, tau=tau, mu=mu,
7576
```
7677

7778
## Why another library for proximal algorithms?
78-
7979
Several other projects in the Python ecosystem provide implementations of proximal
8080
operators and/or algorithms, which present some clear overlap with this project.
8181

82-
A (possibly not exahustive) list of other projects is:
82+
A (possibly not exhaustive) list of other projects is:
8383

8484
* http://proximity-operator.net
8585
* https://github.com/ganguli-lab/proxalgs/blob/master/proxalgs/operators.py
@@ -110,39 +110,34 @@ This repository is organized as follows:
110110
* **tutorials**: set of python script tutorials to be embedded in documentation using sphinx-gallery
111111

112112
## Getting started
113-
114113
You need **Python 3.8 or greater**.
115114

116-
*Note: Versions prior to v0.3.0 work alsi with Python 3.6 or greater, however they
115+
*Note: Versions prior to v0.3.0 work also with Python 3.6 or greater, however they
117116
require scipy version to be lower than v1.8.0.*
118117

119-
120118
#### From PyPi
121-
122-
If you want to use PyProximal within your codes,
119+
you want to use PyProximal within your codes,
123120
install it in your Python environment by typing the following command in your terminal:
124121

122+
To get the most out of PyLops straight out of the box, we recommend `conda` to install PyLops:
123+
```bash
124+
conda install -c conda-forge pyproximal
125125
```
126-
pip install pyproximal
127-
```
128-
129-
Open a python terminal and type:
130126

127+
#### From PyPi
128+
You can also install pyproximal with `pip`:
129+
```bash
130+
pip install pylops
131131
```
132-
import pyproximal
133-
```
134-
135132

136133
#### From Github
137-
138-
You can also directly install from the master node (although this is not reccomended)
134+
Finally, you can also directly install from the main branch (although this is not recommended)
139135

140136
```
141137
pip install git+https://[email protected]/PyLops/pyproximal.git@main
142138
```
143139

144140
## Contributing
145-
146141
*Feel like contributing to the project? Adding new operators or tutorial?*
147142

148143
We advise using the [Anaconda Python distribution](https://www.anaconda.com/download)
@@ -151,7 +146,6 @@ the following instructions and read carefully the [CONTRIBUTING](CONTRIBUTING.md
151146
file before getting started.
152147

153148
### 1. Fork and clone the repository
154-
155149
Execute the following command in your terminal:
156150

157151
```

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
displayName: 'Install prerequisites and library'
6565
6666
- script: |
67-
python setup.py test
67+
pytest
6868
condition: succeededOrFailed()
6969
displayName: 'Run tests'
7070
@@ -93,7 +93,7 @@ jobs:
9393
displayName: 'Install prerequisites and library'
9494
9595
- script: |
96-
python setup.py test
96+
pytest
9797
condition: succeededOrFailed()
9898
displayName: 'Run tests'
9999

docs/source/_static/pyproximal.png

16.2 KB
Loading
17.1 KB
Loading

docs/source/api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Non-Convex
9292
Log1
9393
QuadraticEnvelopeCard
9494
QuadraticEnvelopeCardIndicator
95+
RelaxedMumfordShah
9596
SCAD
9697

9798

docs/source/changelog.rst

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
Changelog
44
=========
55

6+
Version 0.7.0
7+
--------------
8+
*Released on: 10/11/2023*
9+
10+
* Added :py:class:`pyproximal.proximal.RelaxedMumfordShah`` operator
11+
* Added cuda version to the proximal operator of :py:class:`pyproximal.proximal.Simplex`
12+
* Added bilinear update to :py:func:`pyproximal.optimization.primal.ProximalGradient`
13+
* Modified :py:func:`pyproximal.optimization.pnp.PlugAndPlay` function signature to allow using any proximal solver of choice
14+
* Fixed print in :py:func:`pyproximal.optimization.primaldual.PrimalDual` when using cupy arrays
15+
* Fixed :py:class:`pyproximal.utils.bilinear.LowRankFactorizedMatrix` when ``n=m``
16+
617
Version 0.6.0
718
--------------
819
*Released on: 18/03/2023*
@@ -23,19 +34,19 @@ Version 0.5.0
2334
|:vertical_traffic_light:| |:vertical_traffic_light:|
2435

2536
* Added :py:class:`pyproximal.proximal.Log1` operator
26-
* Allow ``radius`` parameter of :py:class:`pyproximal.optimization.primal.L0` to be a function
27-
* Allow ``tau`` parameter of :py:class:`pyproximal.optimization.primal.HQS` to be a vector
37+
* Allow ``radius`` parameter of :py:func:`pyproximal.optimization.primal.L0` to be a function
38+
* Allow ``tau`` parameter of :py:func:`pyproximal.optimization.primal.HQS` to be a vector
2839
and change over iterations
29-
* Added ``z0`` to :py:class:`pyproximal.optimization.primal.HQS`
40+
* Added ``z0`` to :py:func:`pyproximal.optimization.primal.HQS`
3041
* Added ``factorize`` option to ``densesolver`` of :py:class:`pyproximal.proximal.L2`
3142

3243
Version 0.4.0
3344
--------------
3445
*Released on: 05/06/2022*
3546

36-
* Added :py:class:`pyproximal.optimization.primal.ADMML2`,
37-
:py:class:`pyproximal.optimization.primal.HQS`,
38-
and :py:class:`pyproximal.optimization.pnp.PlugAndPlay` solvers
47+
* Added :py:func:`pyproximal.optimization.primal.ADMML2`,
48+
:py:func:`pyproximal.optimization.primal.HQS`,
49+
and :py:func:`pyproximal.optimization.pnp.PlugAndPlay` solvers
3950
* Added :py:class:`pyproximal.proximal.ETP`, :py:class:`pyproximal.proximal.Geman`,
4051
:py:class:`pyproximal.proximal.L0`, :py:class:`pyproximal.proximal.Log`,
4152
:py:class:`pyproximal.proximal.QuadraticEnvelopeCard`, :py:class:`pyproximal.proximal.SCAD`
@@ -47,8 +58,8 @@ Version 0.3.0
4758
--------------
4859
*Released on: 23/03/2022*
4960

50-
* Added :py:class:`pyproximal.optimization.palm.PALM` optimizer
51-
* Added ``callback`` to :py:class:`pyproximal.optimization.primal.ProximalPoint`
61+
* Added :py:func:`pyproximal.optimization.palm.PALM` optimizer
62+
* Added ``callback`` to :py:func:`pyproximal.optimization.primal.ProximalPoint`
5263
optimizer
5364
* Added :py:class:`pyproximal.utils.bilinear.BilinearOperator`
5465
and :py:class:`pyproximal.utils.bilinear.LowRankFactorizedMatrix`
@@ -67,11 +78,11 @@ Version 0.2.0
6778
* Added
6879
:py:class:`pyproximal.proximal.Nuclear`, and
6980
:py:class:`pyproximal.proximal.NuclearBall` operators
70-
* Added :py:class:`pyproximal.optimization.primal.TwIST` solver
81+
* Added :py:func:`pyproximal.optimization.primal.TwIST` solver
7182
* Added `acceleration` in
72-
:py:class:`pyproximal.optimization.primal.AcceleratedProximalGradient` solver
83+
:py:func:`pyproximal.optimization.primal.AcceleratedProximalGradient` solver
7384
* Added classes standard deviation in
74-
:py:class:`pyproximal.optimization.segmentation.Segment` solver
85+
:py:func:`pyproximal.optimization.segmentation.Segment` solver
7586
* Added `chain` method :py:class:`pyproximal.ProxOperator`
7687
* Fix :py:class:`pyproximal.proximal.Orthogonal` by introducing `alpha`
7788
in the proximal evaluation
@@ -81,7 +92,7 @@ Version 0.1.0
8192
--------------
8293
*Released on: 24/04/2021*
8394

84-
* Added :py:class:`pyproximal.optimization.sr3.SR3` solver
95+
* Added :py:func:`pyproximal.optimization.sr3.SR3` solver
8596
* Added :py:class:`pyproximal.projection.AffineSetProj` and
8697
:py:class:`pyproximal.AffineSet` operators
8798
* Fixed :py:class:`pyproximal.Huber` operator

0 commit comments

Comments
 (0)