Skip to content

Commit 5156bbe

Browse files
authored
Merge pull request #749 from PyLops/dev
Prepare for v2.7.0
2 parents 97992be + ebe4e15 commit 5156bbe

226 files changed

Lines changed: 19310 additions & 3810 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.

.coveragerc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
[run]
22
branch = True
33
source = pylops
4+
omit =
5+
pylops/basicoperators/_*.py
6+
pylops/signalprocessing/_*.py
7+
pylops/utils/_*.py
8+
pylops/waveeqprocessing/_*.py

.github/workflows/build-mkl.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
11
name: PyLops Testing with Intel oneAPI Math Kernel Library(oneMKL)
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- main
9+
- dev
410

511
jobs:
612
build:
713
strategy:
814
matrix:
915
platform: [ubuntu-latest]
10-
python-version: ["3.10", "3.11", "3.12", "3.13"]
16+
python-version: ["3.11", "3.12", "3.13"]
1117

1218
runs-on: ${{ matrix.platform }}
1319
defaults:
1420
run:
1521
shell: bash -l {0}
1622
steps:
17-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v6
1824
- name: Get history and tags for SCM versioning to work
1925
run: |
2026
git fetch --prune --unshallow
2127
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
22-
- uses: conda-incubator/setup-miniconda@v3.2.0
28+
- uses: conda-incubator/setup-miniconda@v4
2329
with:
30+
# Pinned to a specific version, see https://github.com/conda-incubator/setup-miniconda/issues/501
31+
miniconda-version: "py312_26.1.1-1"
2432
use-mamba: true
2533
channels: https://software.repos.intel.com/python/conda, conda-forge
2634
conda-remove-defaults: true
@@ -34,7 +42,6 @@ jobs:
3442
pip install -r requirements-torch.txt
3543
- name: Install pylops
3644
run: |
37-
python -m setuptools_scm
3845
pip install .
3946
- name: Tests with pytest
4047
run: |

.github/workflows/build.yaml

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: PyLops Testing
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- main
9+
- dev
410

511
jobs:
612
build:
@@ -10,33 +16,17 @@ jobs:
1016
python-version: ["3.10", "3.11", "3.12", "3.13"]
1117

1218
runs-on: ${{ matrix.platform }}
13-
steps:
14-
- uses: actions/checkout@v4
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/*
19-
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v5
21-
with:
22-
python-version: ${{ matrix.python-version }}
23-
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip setuptools
26-
pip install flake8 pytest
2719

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
35-
pip install -r requirements-torch.txt
36-
- name: Install pylops
37-
run: |
38-
python -m setuptools_scm
39-
pip install .
40-
- name: Tests with pytest
41-
run: |
42-
pytest
20+
steps:
21+
- name: Check out source repository
22+
uses: actions/checkout@v6
23+
with:
24+
fetch-depth: 0
25+
- name: Install uv with Python ${{ matrix.python-version }}
26+
uses: astral-sh/setup-uv@v6
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies and pylops
30+
run: uv sync --locked --extra advanced --extra stat --extra deep --all-groups
31+
- name: Test with pytest
32+
run: uv run pytest --color=yes pytests/

.github/workflows/buildcupy.yaml

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
11
name: PyLops Testing (CuPy)
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- main
9+
- dev
410

511
jobs:
612
build:
713
runs-on: self-hosted
814
steps:
915
- name: Check out source repository
10-
uses: actions/checkout@v4
11-
- name: Set up Python environment and Install dependencies and pylops
16+
uses: actions/checkout@v6
17+
with:
18+
fetch-depth: 0
19+
- name: Install uv with Python 3.11
20+
uses: astral-sh/setup-uv@v6
21+
with:
22+
python-version: 3.11
23+
- name: Install dependencies and pylops
1224
run: |
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
30-
- name: Tests with pytest
25+
srun --account=yuxilab -n 1 -N 1 --gres=gpu:L40S:1 bash -c '
26+
uv sync --locked --extra advanced \
27+
--extra stat --extra gpu-cu12 \
28+
--extra deep-cu128 --all-groups
29+
'
30+
echo "done!"
31+
- name: Test with pytest
3132
run: |
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
33+
srun --account=yuxilab -n 1 -N 1 --gres=gpu:L40S:1 bash -c '
34+
export CUPY_PYLOPS=1
35+
export TEST_CUPY_PYLOPS=1
36+
uv run pytest --color=yes pytests/
37+
'
3538
echo "done!"

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

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,38 @@
22
# For more information see: https://github.com/codacy/codacy-coverage-reporter-action
33
name: PyLops-coverage
44

5-
on: [push, pull_request_target]
5+
on:
6+
pull_request:
7+
push:
8+
branches: [dev]
69

710
jobs:
811
build:
9-
strategy:
10-
matrix:
11-
platform: [ ubuntu-latest, ]
12-
python-version: ["3.11", ]
13-
14-
runs-on: ${{ matrix.platform }}
12+
runs-on: ubuntu-latest
1513
steps:
16-
- uses: actions/checkout@v4
17-
- name: Get history and tags for SCM versioning to work
18-
run: |
19-
git fetch --prune --unshallow
20-
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
21-
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v5
23-
with:
24-
python-version: ${{ matrix.python-version }}
25-
- name: Install dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
pip install flake8 pytest
29-
pip install -r requirements-dev.txt
30-
pip install -r requirements-pyfftw.txt
31-
pip install -r requirements-torch.txt
32-
- name: Install pylops
33-
run: |
34-
pip install .
35-
pip install coverage
36-
- name: Code coverage with coverage
37-
run: |
38-
coverage run -m pytest
39-
coverage xml
40-
- name: Run codacy-coverage-reporter
41-
uses: codacy/codacy-coverage-reporter-action@v1
42-
with:
43-
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
44-
coverage-reports: coverage.xml
14+
- name: Check out source repository
15+
uses: actions/checkout@v6
16+
with:
17+
fetch-depth: 0
18+
- name: Install uv with Python
19+
uses: astral-sh/setup-uv@v6
20+
with:
21+
python-version: "3.11"
22+
- name: Install dependencies and pylops
23+
run: uv sync --locked --extra advanced --extra stat --extra deep --all-groups
24+
- name: Coverage with pytest
25+
run: |
26+
uv run coverage run -m pytest
27+
uv run coverage xml
28+
uv run coverage html
29+
- name: Upload HTML coverage report
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: coverage-html
33+
path: htmlcov/
34+
- name: Run codacy-coverage-reporter
35+
if: github.event_name == 'push'
36+
uses: codacy/codacy-coverage-reporter-action@v1
37+
with:
38+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
39+
coverage-reports: coverage.xml

.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

.github/workflows/ruff.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This workflow runs Ruff on the PR
2+
# For more information see: https://github.com/marketplace/actions/ruff-action
3+
name: PyLops-ruff
4+
5+
on: [push, pull_request]
6+
7+
jobs:
8+
ruff-lint:
9+
runs-on: ubuntu-latest
10+
name: Lint
11+
steps:
12+
- name: Check out source repository
13+
uses: actions/checkout@v6
14+
with:
15+
fetch-depth: 0
16+
- name: Lint with ruff
17+
uses: astral-sh/ruff-action@v3
18+
with:
19+
src: "./pylops"

.gitignore

Lines changed: 4 additions & 1 deletion
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 #
@@ -50,3 +50,6 @@ ASV
5050
.asv/
5151
asv.conf.json
5252
benchmarks/
53+
54+
# Virtual Environments
55+
.venv**

0 commit comments

Comments
 (0)