Skip to content

Commit 73af25c

Browse files
authored
Merge pull request #499 from PyLops/dev
Merge for v2.1.0
2 parents a0b69b8 + a8ae275 commit 73af25c

File tree

95 files changed

+4827
-934
lines changed

Some content is hidden

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

95 files changed

+4827
-934
lines changed

.github/workflows/build.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ on: [push, pull_request]
44

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

12+
runs-on: ${{ matrix.platform }}
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v2
16+
uses: actions/setup-python@v4
1717
with:
1818
python-version: ${{ matrix.python-version }}
1919
- name: Install dependencies
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow uploads PyLops coverage analysis on Codacy
2+
# For more information see: https://github.com/codacy/codacy-coverage-reporter-action
3+
name: PyLops-coverage
4+
5+
on: [push, pull_request_target]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: 3.9
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install flake8 pytest coverage
21+
if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi
22+
- name: Install pylops
23+
run: |
24+
pip install .
25+
- name: Code coverage with coverage
26+
run: |
27+
coverage run -m pytest
28+
coverage xml
29+
- name: Run codacy-coverage-reporter
30+
uses: codacy/codacy-coverage-reporter-action@v1
31+
with:
32+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
33+
coverage-reports: coverage.xml

.github/workflows/flake8.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
name: Lint
1111
steps:
1212
- name: Check out source repository
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414
- name: Set up Python environment
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v4
1616
with:
1717
python-version: "3.8"
1818
- name: flake8 Lint

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# 2.1.0
2+
* Added `pylops.signalprocessing.DCT`, `pylops.signalprocessing.NonStationaryConvolve1D`,
3+
`pylops.signalprocessing.NonStationaryConvolve2D`, `pylops.signalprocessing.NonStationaryFilters1D`, and
4+
`pylops.signalprocessing.NonStationaryFilters2D` operators
5+
* Added `pylops.waveeqprocessing.BlendingContinuous`, `pylops.waveeqprocessing.BlendingGroup`, and
6+
`pylops.waveeqprocessing.BlendingHalf` operators
7+
* Added `kind='datamodel'` to `pylops.optimization.cls_sparsity.IRLS`
8+
* Improved inner working of `pylops.waveeqprocessing.Kirchhoff` operator significantly
9+
reducing the memory usage related to storing traveltime, angle, and amplitude tables.
10+
* Improved handling of `haxes` in `pylops.signalprocessing.Radon2D` and `pylops.signalprocessing.Radon3D` operators
11+
* Added possibility to feed ND-arrays to `pylops.TorchOperator`
12+
* Removed `pylops.LinearOperator` inheritance and added `__call__` method to `pylops.TorchOperator`
13+
* Removed `scipy.sparse.linalg.LinearOperator` and added `abc.ABC` inheritance to `pylops.LinearOperator`
14+
* All operators are now classes of `pylops.LinearOperator` type
15+
116
# 2.0.0
217
PyLops has undergone significant changes in this release, including new ``LinearOperator``s, more features, new examples and bugfixes.
318
To aid users in navigating the breaking changes, we provide the following document [MIGRATION_V1_V2.md](https://github.com/PyLops/pylops/blob/dev/MIGRATION_V1_V2.md).

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,14 @@ doc:
4040
docupdate:
4141
cd docs && make html && cd ..
4242

43+
servedoc:
44+
$(PYTHON) -m http.server --directory docs/build/html/
45+
4346
lint:
4447
flake8 docs/ examples/ pylops/ pytests/ tutorials/
4548

4649
typeannot:
4750
mypy pylops/
51+
52+
coverage:
53+
coverage run -m pytest && coverage xml && coverage html && $(PYTHON) -m http.server --directory htmlcov/

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,8 @@ A list of video tutorials to learn more about PyLops:
142142
* Alan Richardson, ar4
143143
* BurningKarl, BurningKarl
144144
* Nick Luiken, NickLuiken
145+
* BurningKarl, BurningKarl
146+
* Muhammad Izzatullah, izzatum
147+
* Juan Daniel Romero, jdromerom
148+
* Aniket Singh Rawat, dikwickley
149+
* Rohan Babbar, rohanbabbar04

docs/source/_static/css/custom.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@import 'theme.css';
2+
3+
.sphx-glr-multi-img {
4+
max-width: 100%;
5+
}

docs/source/_templates/breadcrumbs.html

Lines changed: 0 additions & 34 deletions
This file was deleted.

docs/source/adding.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,19 @@ which will be used as *parent* class for any of our operators:
2323
2424
from pylops import LinearOperator
2525
26-
This class is a child of the
27-
:py:class:`scipy.sparse.linalg.LinearOperator` class itself which implements the same methods of its parent class
28-
as well as an additional method for quick inversion: such method can be easily accessed by using ``\`` between the
29-
operator and the data (e.g., ``A \ y``).
26+
This class was originally defined as a child of the :py:class:`scipy.sparse.linalg.LinearOperator`, implementing
27+
the same methods of its parent class as well as additional methods for quick inversion (e.g., ``A \ y``),
28+
eigenvalues computation, conversion to dense matrices, etc. From version ``v2.1`` onwards, our linear operator
29+
class has become stand-alone; however, by keeping the same naming structure of the original scipy class, we still
30+
allow inter-operability with scipy-native linear operators and solvers.
3031

3132
After that we define our new object:
3233

3334
.. code-block:: python
3435
3536
class Diagonal(LinearOperator):
3637
37-
followed by a `numpydoc docstring <https://numpydoc.readthedocs.io/en/latest/format.html/>`_
38+
followed by a `numpydoc docstring <https://numpydoc.readthedocs.io/en/latest/format.html>`__
3839
(starting with ``r"""`` and ending with ``"""``) containing the documentation of the operator. Such docstring should
3940
contain at least a short description of the operator, a ``Parameters`` section with a detailed description of the
4041
input parameters and a ``Notes`` section providing a mathematical explanation of the operator. Take a look at
@@ -172,7 +173,7 @@ adheres to the guidelines of PyLops:
172173

173174
- the new class contains at least ``__init__``, ``_matvec`` and ``_matvec`` methods.
174175

175-
- the new class (or function) has a `numpydoc docstring <https://numpydoc.readthedocs.io/>`_ documenting
176+
- the new class (or function) has a `numpydoc docstring <https://numpydoc.readthedocs.io/>`__ documenting
176177
at least the input ``Parameters`` and with a ``Notes`` section providing a mathematical explanation of the operator
177178

178179
- a new test has been added to an existing ``test_*.py`` file within the ``pytests`` folder. The test should verify

0 commit comments

Comments
 (0)