Skip to content

Commit 260d61d

Browse files
authored
Merge pull request #674 from PyLops/dev
Release v2.5.0
2 parents 9964a04 + 80d9209 commit 260d61d

File tree

96 files changed

+4141
-1192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+4141
-1192
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PyLops
1+
name: PyLops Testing
22

33
on: [push, pull_request]
44

@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
platform: [ ubuntu-latest, macos-13 ]
10-
python-version: ["3.9", "3.10", "3.11"]
10+
python-version: ["3.10", ] # "3.11" temporarely removed due to issues with scikit-fmm
1111

1212
runs-on: ${{ matrix.platform }}
1313
steps:
@@ -30,6 +30,6 @@ jobs:
3030
run: |
3131
python -m setuptools_scm
3232
pip install .
33-
- name: Test with pytest
33+
- name: Tests with pytest
3434
run: |
3535
pytest

.github/workflows/buildcupy.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: PyLops Testing (CuPy)
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: self-hosted
8+
steps:
9+
- name: Check out source repository
10+
uses: actions/checkout@v4
11+
- name: Print checked code and check environments
12+
run: |
13+
ls -lah
14+
echo $(pwd)
15+
echo $(which python3)
16+
echo $(which pip3)
17+
- name: Set up Python environment and Install dependencies
18+
run: |
19+
python3 -m venv pylopsvenv
20+
source pylopsvenv/bin/activate
21+
echo $(which python3)
22+
echo $(which pip3)
23+
python3 -m pip install --upgrade pip setuptools
24+
pip install flake8 pytest setuptools-scm
25+
pip install -r requirements-dev-gpu.txt
26+
- name: Install pylops
27+
run: |
28+
source pylopsvenv/bin/activate
29+
python3 -m setuptools_scm
30+
pip install .
31+
- name: Tests with pytest
32+
run: |
33+
export CUPY_PYLOPS=1; export TEST_CUPY_PYLOPS=1;
34+
source pylopsvenv/bin/activate
35+
pytest

.github/workflows/codacy-coverage-reporter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
platform: [ ubuntu-latest, ]
12-
python-version: ["3.9", ]
12+
python-version: ["3.10", ]
1313

1414
runs-on: ${{ matrix.platform }}
1515
steps:

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
11
Changelog
22
=========
33

4+
# 2.5.0
5+
* Added `cuda` engine to `pylops.waveeqprocessing.Kirchhoff`
6+
operator
7+
* Added `Opbasis` and `optimal_coeff` to
8+
`pylops.optimization.cls_sparsity.OMP`
9+
* Added `solver` to the input parameters of the `_oneshot`
10+
internal methods of `pylops.waveeqprocessing.AcousticWave2D`
11+
to avoid recreating it for every shot
12+
* Added `kwargs_fft` to `pylops.signalprocessing.FFT`,
13+
`pylops.signalprocessing.FFT2D`, and
14+
`pylops.signalprocessing.FFTND`
15+
* Fix bug in `pylops.waveeqprocessing.MDD` when using
16+
CuPy arrays for `G` and `d` with `twosided=True` and `add_negative=True`
17+
* Fix bug in `pylops.signalprocessing.FourierRadon3D`
18+
in the default choice of `num_threads_per_blocks`
19+
* Fix bug in `pylops.signalprocessing.Convolve1D`
20+
in the definition of `pad` and `padd` when applying the
21+
operator to a CuPy array
22+
* Fix bug in `pylops.optimization.cls_sparsity.OMP` avoiding
23+
passing `explicit` in the creation of `_ColumnLinearOperator`
24+
* Fix bug in `pylops.optimization.cls_sparsity.OMP` callback
25+
method as `cols` was not passed not allowing ``x`` to be
26+
properly reconstructed
27+
* Fix bug in `pylops.waveeqprocessing.SeismicInterpolation`
28+
in calculation of `sampling` when not passed
29+
430
# 2.4.0
531
* Added `pylops.signalprocessing.FourierRadon2d` and
632
`pylops.signalprocessing.FourierRadon3d` operators

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ that the both old and new tests pass successfully:
6363
make tests
6464
```
6565
66+
If you have access to a GPU, it is advised also that old and new tests run with the CuPy
67+
backend pass successfully:
68+
```
69+
make tests_gpu
70+
```
71+
6672
4. Run flake8 to check the quality of your code:
6773
```
6874
make lint

Makefile

100755100644
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PIP := $(shell command -v pip3 2> /dev/null || command which pip 2> /dev/null)
22
PYTHON := $(shell command -v python3 2> /dev/null || command which python 2> /dev/null)
33

4-
.PHONY: install dev-install install_conda dev-install_conda tests doc docupdate servedoc lint typeannot coverage
4+
.PHONY: install dev-install dev-install_gpu install_conda dev-install_conda dev-install_conda_arm tests tests_cpu_ongpu tests_gpu doc docupdate servedoc lint typeannot coverage
55

66
pipcheck:
77
ifndef PIP
@@ -24,6 +24,11 @@ dev-install:
2424
$(PIP) install -r requirements-dev.txt &&\
2525
$(PIP) install -r requirements-torch.txt && $(PIP) install -e .
2626

27+
dev-install_gpu:
28+
make pipcheck
29+
$(PIP) install -r requirements-dev-gpu.txt &&\
30+
$(PIP) install -e .
31+
2732
install_conda:
2833
conda env create -f environment.yml && conda activate pylops && pip install .
2934

@@ -33,10 +38,24 @@ dev-install_conda:
3338
dev-install_conda_arm:
3439
conda env create -f environment-dev-arm.yml && conda activate pylops && pip install -e .
3540

41+
dev-install_conda_gpu:
42+
conda env create -f environment-dev-gpu.yml && conda activate pylops_gpu && pip install -e .
43+
3644
tests:
45+
# Run tests with CPU
3746
make pythoncheck
3847
pytest
3948

49+
tests_cpu_ongpu:
50+
# Run tests with CPU on a system with GPU (and CuPy installed)
51+
make pythoncheck
52+
export CUPY_PYLOPS=0 && export TEST_CUPY_PYLOPS=0 && pytest
53+
54+
tests_gpu:
55+
# Run tests with GPU (requires CuPy to be installed)
56+
make pythoncheck
57+
export TEST_CUPY_PYLOPS=1 && pytest
58+
4059
doc:
4160
cd docs && rm -rf source/api/generated && rm -rf source/gallery &&\
4261
rm -rf source/tutorials && rm -rf build && make html && cd ..

azure-pipelines.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,26 @@ jobs:
1818
# displayName: 'Windows'
1919
#
2020
# pool:
21-
# vmImage: 'windows-2019'
21+
# vmImage: 'windows-2025'
2222
#
2323
# variables:
2424
# NUMBA_NUM_THREADS: 1
2525
#
2626
# steps:
2727
# - task: UsePythonVersion@0
2828
# inputs:
29-
# versionSpec: '3.9'
29+
# versionSpec: '3.10'
3030
# architecture: 'x64'
3131
#
3232
# - script: |
3333
# python -m pip install --upgrade pip setuptools wheel django
3434
# pip install -r requirements-dev.txt
35+
# pip install -r requirements-torch.txt
3536
# pip install .
3637
# displayName: 'Install prerequisites and library'
3738
#
3839
# - script: |
39-
# python setup.py test
40+
# pytest
4041
# condition: succeededOrFailed()
4142
# displayName: 'Run tests'
4243

@@ -55,7 +56,7 @@ jobs:
5556
steps:
5657
- task: UsePythonVersion@0
5758
inputs:
58-
versionSpec: '3.9'
59+
versionSpec: '3.10'
5960
architecture: 'x64'
6061

6162
- script: |
@@ -85,7 +86,7 @@ jobs:
8586
steps:
8687
- task: UsePythonVersion@0
8788
inputs:
88-
versionSpec: '3.9'
89+
versionSpec: '3.10'
8990
architecture: 'x64'
9091

9192
- script: |

docs/source/changelog.rst

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

6+
Version 2.5.0
7+
-------------
8+
9+
*Released on: 21/06/2025*
10+
11+
* Added `cuda` engine to :py:class:`pylops.waveeqprocessing.Kirchhoff`
12+
operator
13+
* Added `Opbasis` and `optimal_coeff` to
14+
:py:class:`pylops.optimization.cls_sparsity.OMP`
15+
* Added `solver` to the input parameters of the `_oneshot`
16+
internal methods of :py:class:`pylops.waveeqprocessing.AcousticWave2D`
17+
to avoid recreating it for every shot
18+
* Added `kwargs_fft` to `pylops.signalprocessing.FFT`,
19+
:py:class:`pylops.signalprocessing.FFT2D`, and
20+
:py:class:`pylops.signalprocessing.FFTND`
21+
* Fix bug in :py:func:`pylops.waveeqprocessing.MDD` when using
22+
CuPy arrays for `G` and `d` with `twosided=True` and `add_negative=True`
23+
* Fix bug in :py:class:`pylops.signalprocessing.FourierRadon3D`
24+
in the default choice of `num_threads_per_blocks`
25+
* Fix bug in :py:class:`pylops.signalprocessing.Convolve1D`
26+
in the definition of `pad` and `padd` when applying the
27+
operator to a CuPy array
28+
* Fix bug in :py:class:`pylops.optimization.cls_sparsity.OMP` avoiding
29+
passing `explicit` in the creation of `_ColumnLinearOperator`
30+
* Fix bug in :py:class:`pylops.optimization.cls_sparsity.OMP` callback
31+
method as `cols` was not passed not allowing ``x`` to be
32+
properly reconstructed
33+
* Fix bug in :py:func:`pylops.waveeqprocessing.SeismicInterpolation`
34+
in calculation of `sampling` when not passed
35+
36+
637
Version 2.4.0
738
-------------
839

@@ -189,7 +220,7 @@ Version 1.18.0
189220
* Extended :py:func:`pylops.Laplacian` to N-dimensional arrays
190221
* Added `forward` kind to :py:class:`pylops.SecondDerivative` and
191222
:py:func:`pylops.Laplacian`
192-
* Added `chirp-sliding` kind to :py:class:`pylops.waveeqprocessing.seismicinterpolation.SeismicInterpolation`
223+
* Added `chirp-sliding` kind to :py:func:`pylops.waveeqprocessing.SeismicInterpolation`
193224
* Fixed bug due to the new internal structure of `LinearOperator` submodule introduced in `scipy1.8.0`
194225

195226

@@ -389,7 +420,7 @@ Version 1.9.1
389420
:py:class:`pylops.signalprocessing.FFT2D` to ensure that the type of the input
390421
vector is retained when applying forward and adjoint.
391422
* Added ``dtype`` parameter to the ``FFT`` calls in the definition of the
392-
:py:class:`pylops.waveeqprocessing.MDD` operation. This ensure that the type
423+
:py:func:`pylops.waveeqprocessing.MDD` operation. This ensure that the type
393424
of the real part of ``G`` input is enforced to the output vectors of the
394425
forward and adjoint operations.
395426

docs/source/contributing.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ that the both old and new tests pass successfully:
7575
7676
>> make tests
7777
78+
If you have access to a GPU, it is advised also that old and new tests run with the CuPy
79+
backend pass successfully:
80+
81+
.. code-block:: bash
82+
83+
>> make tests_gpu
84+
7885
4. Run flake8 to check the quality of your code:
7986

8087
.. code-block:: bash

docs/source/gpu.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@ be also wrapped into a :class:`pylops.JaxOperator`.
3232
See below for a comphrensive list of supported operators and additional functionalities for both the
3333
``cupy`` and ``jax`` backends.
3434

35+
Install dependencies
36+
--------------------
37+
GPU-enabled development environments can created using ``conda``
38+
39+
.. code-block:: bash
40+
41+
>> make dev-install_conda_gpu
42+
43+
or ``pip``
44+
45+
.. code-block:: bash
46+
47+
>> make dev-install_gpu
48+
3549
3650
Examples
3751
--------

0 commit comments

Comments
 (0)