Skip to content

Commit 97992be

Browse files
authored
Merge pull request #716 from PyLops/dev
v2.6.0
2 parents 260d61d + b53fec8 commit 97992be

169 files changed

Lines changed: 8459 additions & 2543 deletions

File tree

Some content is hidden

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

.github/workflows/build-mkl.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: PyLops Testing with Intel oneAPI Math Kernel Library(oneMKL)
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
platform: [ubuntu-latest]
10+
python-version: ["3.10", "3.11", "3.12", "3.13"]
11+
12+
runs-on: ${{ matrix.platform }}
13+
defaults:
14+
run:
15+
shell: bash -l {0}
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Get history and tags for SCM versioning to work
19+
run: |
20+
git fetch --prune --unshallow
21+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
22+
- uses: conda-incubator/setup-miniconda@v3.2.0
23+
with:
24+
use-mamba: true
25+
channels: https://software.repos.intel.com/python/conda, conda-forge
26+
conda-remove-defaults: true
27+
python-version: ${{ matrix.python-version }}
28+
activate-environment: mkl-test-env
29+
- name: Install dependencies
30+
run: |
31+
conda install -y pyfftw
32+
pip install -r requirements-intel-mkl.txt
33+
pip install -r requirements-dev.txt
34+
pip install -r requirements-torch.txt
35+
- name: Install pylops
36+
run: |
37+
python -m setuptools_scm
38+
pip install .
39+
- name: Tests with pytest
40+
run: |
41+
pytest

.github/workflows/build.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
build:
77
strategy:
88
matrix:
9-
platform: [ ubuntu-latest, macos-13 ]
10-
python-version: ["3.10", ] # "3.11" temporarely removed due to issues with scikit-fmm
9+
platform: [ ubuntu-latest, macos-latest ]
10+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1111

1212
runs-on: ${{ matrix.platform }}
1313
steps:
@@ -24,7 +24,14 @@ jobs:
2424
run: |
2525
python -m pip install --upgrade pip setuptools
2626
pip install flake8 pytest
27-
pip install -r requirements-dev.txt
27+
28+
if [[ "${{ matrix.platform }}" == ubuntu* ]]; then
29+
pip install -r requirements-dev.txt
30+
pip install -r requirements-pyfftw.txt
31+
else
32+
pip install -r requirements-dev-arm.txt
33+
pip install -r requirements-pyfftw.txt
34+
fi
2835
pip install -r requirements-torch.txt
2936
- name: Install pylops
3037
run: |

.github/workflows/buildcupy.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ jobs:
88
steps:
99
- name: Check out source repository
1010
uses: actions/checkout@v4
11-
- name: Print checked code and check environments
11+
- name: Set up Python environment and Install dependencies and pylops
1212
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 .
13+
python3 -m venv .venv-pylops
14+
# write install scripts
15+
cat << 'EOF' > pylops_tests.sh
16+
#!/bin/bash
17+
PYTHON=.venv-pylops/bin/python3
18+
PIP=.venv-pylops/bin/pip
19+
ls $PYTHON
20+
ls $PIP
21+
$PIP install
22+
$PIP install --upgrade pip setuptools
23+
$PIP install install flake8 pytest setuptools-scm
24+
$PIP install -r requirements-dev-gpu.txt
25+
$PIP install cupy-cuda12x
26+
$PYTHON -m setuptools_scm
27+
$PIP install .
28+
EOF
29+
srun --account=yuxilab -n 1 -N 1 --gres=gpu:L40S:1 bash pylops_tests.sh
3130
- name: Tests with pytest
3231
run: |
33-
export CUPY_PYLOPS=1; export TEST_CUPY_PYLOPS=1;
34-
source pylopsvenv/bin/activate
35-
pytest
32+
export CUPY_PYLOPS=1; export TEST_CUPY_PYLOPS=1;
33+
export PYTEST=.venv-pylops/bin/pytest
34+
srun --account=yuxilab -n 1 -N 1 --gres=gpu:L40S:1 $PYTEST
35+
echo "done!"

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

Lines changed: 2 additions & 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.10", ]
12+
python-version: ["3.11", ]
1313

1414
runs-on: ${{ matrix.platform }}
1515
steps:
@@ -27,6 +27,7 @@ jobs:
2727
python -m pip install --upgrade pip
2828
pip install flake8 pytest
2929
pip install -r requirements-dev.txt
30+
pip install -r requirements-pyfftw.txt
3031
pip install -r requirements-torch.txt
3132
- name: Install pylops
3233
run: |

.github/workflows/flake8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set up Python environment
1515
uses: actions/setup-python@v5
1616
with:
17-
python-version: "3.8"
17+
python-version: "3.11"
1818
- name: flake8 Lint
1919
uses: py-actions/flake8@v2
2020
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ docs/build
3333
docs/source/api/generated
3434
docs/source/gallery
3535
docs/source/tutorials
36+
docs/source/sg_execution_times.rst
3637

3738
# Pylint #
3839
pylint_plot.py

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ version: 2
77

88
# Set the version of Python and other tools you might need
99
build:
10-
os: ubuntu-20.04
10+
os: ubuntu-24.04
1111
tools:
12-
python: "3.9"
12+
python: "3.12"
1313

1414
# Build documentation in the docs/ directory with Sphinx
1515
sphinx:

CHANGELOG.md

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
11
Changelog
22
=========
33

4+
# 2.6.0
5+
* Added `pylops.medical` module and `pylops.medical.CT2D` operator
6+
* Added `pylops.utils.signalprocessing.pwd_slope_estimate` and
7+
`pylops.signalprocessing.PWSprayer2D` and `pylops.signalprocessing.PWSmoother2D`
8+
operators
9+
* Added support for multithreading to `pylops.basicoperators.Block`,
10+
`pylops.basicoperators.BlockDiag`, `pylops.basicoperators.HStack`, and
11+
`pylops.basicoperators.VStack` (and ``parallel_kind`` parameter)
12+
* Added `kwargs_fft` to `pylops.waveeqprocessing.BlendingContinuous`,
13+
`pylops.waveeqprocessing.BlendingGroup`, and
14+
`pylops.waveeqprocessing.BlendingHalf`
15+
* Added ``nttot`` to `pylops.waveeqprocessing.BlendingContinuous`
16+
* Added ``fftengine`` to `pylops.waveeqprocessing.PhaseShift`
17+
* Added ``mkl_fft`` engine to `pylops.signalprocessing.FFT`,
18+
`pylops.signalprocessing.FFT2D`, and `pylops.signalprocessing.FFTND`
19+
* Added JAX backend to `pylops.signalprocessing.ChirpRadon2D` and
20+
`pylops.signalprocessing.ChirpRadon3D` operators.
21+
* Added `pylops.optimization.callback.CostNanInfCallback`,
22+
`pylops.optimization.callback.CostToDataCallback`, and
23+
`pylops.optimization.callback.CostToInitialCallback` callbacks, and
24+
and ``rtol`` and ``rtol1`` parameters in all solvers
25+
* Optimized internal handling of `pylops.basicoperators.Zero` operators in
26+
`pylops.basicoperators.BlockDiag`, `pylops.basicoperators.HStack`, and
27+
`pylops.basicoperators.VStack`
28+
* Homogenize error/warning/info messages across the library by switching to
29+
``logging/warning``
30+
* Fixed initialization of ``r`` and ``rw`` in `pylops.optimization.cls_sparsity.IRLS`
31+
* Fixed `pylops.optimization.cls_sparsity._halfthreshold` for complex valued CuPy arrays
32+
* Fixed initialization of ``decay`` in sparse solvers to correctly solve complex-valued
33+
problems
34+
* Fixed bug when calling ``__pow__`` of a linear operator with CuPy arrays
35+
* Fixed dtype handling in `pylops.optimization.cls_sparsity.ISTA` and
36+
`pylops.optimization.cls_sparsity.FISTA`
37+
438
# 2.5.0
539
* Added `cuda` engine to `pylops.waveeqprocessing.Kirchhoff`
640
operator
@@ -12,19 +46,19 @@ Changelog
1246
* Added `kwargs_fft` to `pylops.signalprocessing.FFT`,
1347
`pylops.signalprocessing.FFT2D`, and
1448
`pylops.signalprocessing.FFTND`
15-
* Fix bug in `pylops.waveeqprocessing.MDD` when using
49+
* Fixed bug in `pylops.waveeqprocessing.MDD` when using
1650
CuPy arrays for `G` and `d` with `twosided=True` and `add_negative=True`
17-
* Fix bug in `pylops.signalprocessing.FourierRadon3D`
51+
* Fixed bug in `pylops.signalprocessing.FourierRadon3D`
1852
in the default choice of `num_threads_per_blocks`
19-
* Fix bug in `pylops.signalprocessing.Convolve1D`
53+
* Fixed bug in `pylops.signalprocessing.Convolve1D`
2054
in the definition of `pad` and `padd` when applying the
2155
operator to a CuPy array
22-
* Fix bug in `pylops.optimization.cls_sparsity.OMP` avoiding
56+
* Fixed bug in `pylops.optimization.cls_sparsity.OMP` avoiding
2357
passing `explicit` in the creation of `_ColumnLinearOperator`
24-
* Fix bug in `pylops.optimization.cls_sparsity.OMP` callback
58+
* Fixed bug in `pylops.optimization.cls_sparsity.OMP` callback
2559
method as `cols` was not passed not allowing ``x`` to be
2660
properly reconstructed
27-
* Fix bug in `pylops.waveeqprocessing.SeismicInterpolation`
61+
* Fixed bug in `pylops.waveeqprocessing.SeismicInterpolation`
2862
in calculation of `sampling` when not passed
2963

3064
# 2.4.0
@@ -33,7 +67,7 @@ Changelog
3367
* Added `pylops.PyTensorOperator` operator
3468
* Added `pylops.ToCupy` operator
3569
* Added `pylops.utils.seismicevents.parabolic3d` method
36-
* Fix bug in `pylops.Restriction` when passing iava as cupy array
70+
* Fixed bug in `pylops.Restriction` when passing iava as cupy array
3771

3872
# 2.3.1
3973
* Fixed bug in `pylops.utils.backend` (see [Issue #606](https://github.com/PyLops/pylops/issues/606))
@@ -336,7 +370,7 @@ To aid users in navigating the breaking changes, we provide the following docume
336370
* Added ``pylops.LinearOperator.asoperator`` method to
337371
``pylops.LinearOperator``
338372
* Added ``pylops.utils.signalprocessing.slope_estimate`` function
339-
* Fix bug in ``pylops.signalprocessing.Radon2D`` and
373+
* Fixed bug in ``pylops.signalprocessing.Radon2D`` and
340374
``pylops.signalprocessing.Radon3D`` when ``onthefly=True`` returning the
341375
same result as when ``onthefly=False``
342376

@@ -348,7 +382,7 @@ To aid users in navigating the breaking changes, we provide the following docume
348382
* Added ``pylops.waveeqprocessing.PressureToVelocity``,
349383
``pylops.waveeqprocessing.UpDownComposition3Doperator``, and
350384
``pylops.waveeqprocessing.PhaseShift`` operators
351-
* Fix bug in ``pylops.basicoperators.Kronecker``
385+
* Fixed bug in ``pylops.basicoperators.Kronecker``
352386
(see [Issue #125](https://github.com/PyLops/pylops/issues/125))
353387

354388
# 1.7.0

Makefile

Lines changed: 15 additions & 5 deletions
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 dev-install_gpu install_conda dev-install_conda dev-install_conda_arm tests tests_cpu_ongpu tests_gpu doc docupdate servedoc lint typeannot coverage
4+
.PHONY: install dev-install dev-install_intel_mkl dev-install_gpu install_conda dev-install_conda dev-install_conda_intel_mkl dev-install_conda_arm tests tests_cpu_ongpu tests_gpu doc docupdate servedoc lint typeannot coverage
55

66
pipcheck:
77
ifndef PIP
@@ -22,6 +22,13 @@ install:
2222
dev-install:
2323
make pipcheck
2424
$(PIP) install -r requirements-dev.txt &&\
25+
$(PIP) install -r requirements-pyfftw.txt &&\
26+
$(PIP) install -r requirements-torch.txt && $(PIP) install -e .
27+
28+
dev-install_intel_mkl:
29+
make pipcheck
30+
$(PIP) install -r requirements-intel-mkl.txt &&\
31+
$(PIP) install -r requirements-dev.txt &&\
2532
$(PIP) install -r requirements-torch.txt && $(PIP) install -e .
2633

2734
dev-install_gpu:
@@ -30,16 +37,19 @@ dev-install_gpu:
3037
$(PIP) install -e .
3138

3239
install_conda:
33-
conda env create -f environment.yml && conda activate pylops && pip install .
40+
conda env create -f environment.yml && source ${CONDA_PREFIX}/etc/profile.d/conda.sh && conda activate pylops && pip install .
3441

3542
dev-install_conda:
36-
conda env create -f environment-dev.yml && conda activate pylops && pip install -e .
43+
conda env create -f environment-dev.yml && source ${CONDA_PREFIX}/etc/profile.d/conda.sh && conda activate pylops && pip install -e .
44+
45+
dev-install_conda_intel_mkl:
46+
conda env create -f environment-dev-intel-mkl.yml && source ${CONDA_PREFIX}/etc/profile.d/conda.sh && conda activate pylops && pip install -e .
3747

3848
dev-install_conda_arm:
39-
conda env create -f environment-dev-arm.yml && conda activate pylops && pip install -e .
49+
conda env create -f environment-dev-arm.yml && source ${CONDA_PREFIX}/etc/profile.d/conda.sh && conda activate pylops && pip install -e .
4050

4151
dev-install_conda_gpu:
42-
conda env create -f environment-dev-gpu.yml && conda activate pylops_gpu && pip install -e .
52+
conda env create -f environment-dev-gpu.yml && source ${CONDA_PREFIX}/etc/profile.d/conda.sh && conda activate pylops_gpu && pip install -e .
4353

4454
tests:
4555
# Run tests with CPU

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,5 @@ A list of video tutorials to learn more about PyLops:
152152
* Alex Rakowski, alex-rakowski
153153
* David Sollberger, solldavid
154154
* Gustavo Coelho, guaacoelho
155+
* Shaowen Wang, GeophyAI
156+
* Francesco Brandolin, FB-I

0 commit comments

Comments
 (0)