Skip to content

Commit ebe4e15

Browse files
authored
Merge pull request #746 from mrava87/build-releaseprocess
Build: switch from setuptools to hatchling
2 parents a12fe4f + 7583934 commit ebe4e15

13 files changed

Lines changed: 2934 additions & 2086 deletions

.github/workflows/build-mkl.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ jobs:
4242
pip install -r requirements-torch.txt
4343
- name: Install pylops
4444
run: |
45-
python -m setuptools_scm
4645
pip install .
4746
- name: Tests with pytest
4847
run: |

.github/workflows/deploy.yaml

Lines changed: 56 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,67 @@
1-
# This workflow uploads PyLops on PyPI using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
1+
# This workflow uploads PyLops on PyPI when a release is created
2+
# For more information see: https://github.com/python-attrs/attrs/blob/main/.github/workflows/pypi-package.yml
33
name: PyLops-deploy
44

55
on:
6+
push:
7+
tags: ["*"]
68
release:
7-
types: [published]
9+
types:
10+
- published
11+
workflow_dispatch:
812

913
jobs:
10-
deploy:
14+
build-package:
15+
name: Build & verify package
1116
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Check out source repository
20+
uses: actions/checkout@v6
21+
with:
22+
fetch-depth: 0
23+
- name: Build and inspect package
24+
uses: hynek/build-and-inspect-python-package@v2
25+
26+
release-test-pypi:
27+
name: Publish in-dev package to test.pypi.org
28+
if: github.repository_owner == 'PyLops' && github.ref_type == 'tag'
29+
runs-on: ubuntu-latest
30+
needs: build-package
31+
permissions:
32+
contents: read
33+
id-token: write
34+
1235
steps:
13-
- uses: actions/checkout@v2
14-
- name: Set up Python
15-
uses: actions/setup-python@v2
36+
- name: Download package
37+
uses: actions/download-artifact@v8
1638
with:
17-
python-version: '3.x'
18-
- name: Install dependencies
19-
run: |
20-
python -m pip install --upgrade pip
21-
pip install build
22-
- name: Build package
23-
run: python -m build
24-
- name: Publish package
39+
name: Packages
40+
path: dist
41+
42+
- name: Upload package to Test PyPI
43+
uses: pypa/gh-action-pypi-publish@release/v1
44+
with:
45+
attestations: true
46+
repository-url: https://test.pypi.org/legacy/
47+
48+
release-pypi:
49+
name: Publish released package to pypi.org
50+
if: github.repository_owner == 'PyLops' && github.event.action == 'published'
51+
runs-on: ubuntu-latest
52+
needs: build-package
53+
permissions:
54+
contents: read
55+
id-token: write
56+
57+
steps:
58+
- name: Download package
59+
uses: actions/download-artifact@v8
60+
with:
61+
name: Packages
62+
path: dist
63+
64+
- name: Upload package to PyPI
2565
uses: pypa/gh-action-pypi-publish@release/v1
2666
with:
27-
user: __token__
28-
password: ${{ secrets.PYPI_API_TOKEN }}
67+
attestations: true

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pylops.egg-info/
1919
.eggs/
2020
__pycache__
2121

22-
# setuptools_scm generated #
22+
# hatchling generated #
2323
pylops/version.py
2424

2525
# Development #
@@ -52,4 +52,4 @@ asv.conf.json
5252
benchmarks/
5353

5454
# Virtual Environments
55-
.venv**
55+
.venv**

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ Changelog
55
* Added cubic spline interpolation operator via
66
`pylops.signalprocessing.interpspline.InterpCubicSpline` (also interfaceable via
77
`pylops.signalprocessing.interp.Interp(..., kind="cubic_spline"`)
8+
* Added `pylops.medical.MRI2D` operator
9+
* Added `pylops.basicoperators.SmoothingND` operator
10+
* Added 3d extension to `pylops.utils.signalprocessing.pwd_slope_estimate`
11+
* Fixed unwanted upcasting in `pylops.avo.AVOLinearModelling`,
12+
`pylops.Laplacian`, `pylops.signalprocessing.Bilinear`,
13+
`pylops.signalprocessing.Interp`, `pylops.signalprocessing.NonStationaryFilters2D`,
14+
`pylops.signalprocessing.Seislet`, `pylops.signalprocessing.Sliding1D`,
15+
`pylops.signalprocessing.Sliding2D`, `pylops.signalprocessing.Sliding3D`,
16+
`pylops.basicoperators.Smoothing1D`, `pylops.basicoperators.Smoothing2D`,
17+
and `pylops.waveeqprocessing.Marchenko`
18+
* Improved typing annotations across all operators (and enforced use of
19+
Literal for parameters with multiple options)
820

921
# 2.6.0
1022
* Added `pylops.medical` module and `pylops.medical.CT2D` operator

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,37 @@ It is inspired by the iconic MATLAB [Spot – A Linear-Operator Toolbox](http://
2020

2121

2222
## Installation
23-
To get the most out of PyLops straight out of the box, we recommend `conda` to install PyLops:
23+
To get the most out of PyLops straight out of the box, we recommend using
24+
the PyPI distribution via `uv`:
25+
2426
```bash
25-
conda install -c conda-forge pylops
27+
uv pip install pylops
2628
```
27-
You can also install with `pip`:
29+
30+
or directly via `pip`:
31+
2832
```bash
2933
pip install pylops
3034
```
3135

36+
#### From Conda
37+
You can also install PyLops via `conda`:
38+
39+
```bash
40+
conda install -c conda-forge pylops
41+
```
42+
43+
#### From Github
44+
Finally, you can also directly install from the main branch (although this is not recommended) via `uv`:
45+
46+
```bash
47+
uv add git+https://github.com/PyLops/pylops.git --branch main
48+
```
49+
or via `pip`:
50+
```bash
51+
pip install git+https://git@github.com/PyLops/pylops.git@main
52+
```
53+
3254
See the docs ([Installation](https://pylops.readthedocs.io/en/stable/installation.html)) for more information about dependencies and performance.
3355

3456
## Why PyLops?

docs/source/changelog.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@
44
############################
55

66

7+
Version 2.7.0
8+
-------------
9+
10+
*Released on: 17/05/2026*
11+
12+
* Added cubic spline interpolation operator via
13+
:py:class:`pylops.signalprocessing.InterpCubicSpline` (also interfaceable via
14+
:py:class:`pylops.signalprocessing.Interp` with `kind="cubic_spline"`)
15+
* Added :py:class:`pylops.medical.MRI2D` operator
16+
* Added :py:class:`pylops.SmoothingND` operator
17+
* Added 3d extension to :py:func:`pylops.utils.signalprocessing.pwd_slope_estimate`
18+
* Fixed unwanted upcasting in :py:class:`pylops.avo.avo.AVOLinearModelling`,
19+
:py:class:`pylops.Laplacian`, :py:class:`pylops.signalprocessing.Bilinear`,
20+
:py:class:`pylops.signalprocessing.Interp`, :py:class:`pylops.signalprocessing.NonStationaryFilters2D`,
21+
:py:class:`pylops.signalprocessing.Seislet`, :py:class:`pylops.signalprocessing.Sliding1D`,
22+
:py:class:`pylops.signalprocessing.Sliding2D`, :py:class:`pylops.signalprocessing.Sliding3D`,
23+
:py:class:`pylops.Smoothing1D`, :py:class:`pylops.Smoothing2D`,
24+
and :py:class:`pylops.waveeqprocessing.Marchenko`
25+
* Improved typing annotations across all operators (and enforced use of
26+
Literal for parameters with multiple options)
27+
728
Version 2.6.0
829
-------------
930

environment-dev-arm.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ dependencies:
3030
- spgl1
3131
- jax
3232
- pytest-runner
33-
- setuptools_scm
3433
- shibuya
3534
- sphinx-design
3635
- sphinx-gallery

environment-dev-gpu.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ dependencies:
2323
- pip:
2424
- torch
2525
- pytest-runner
26-
- setuptools_scm
2726
- shibuya
2827
- sphinx-design
2928
- sphinx-gallery

environment-dev-intel-mkl.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ dependencies:
3333
- spgl1
3434
- jax
3535
- pytest-runner
36-
- setuptools_scm
3736
- shibuya
3837
- sphinx-design
3938
- sphinx-gallery

environment-dev.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ dependencies:
3131
- spgl1
3232
- jax
3333
- pytest-runner
34-
- setuptools_scm
3534
- shibuya
3635
- sphinx-design
3736
- sphinx-gallery

0 commit comments

Comments
 (0)