Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ce81e45
build: added support for uv
mrava87 Jan 31, 2026
77646d5
minor: fix problem in build_uv
mrava87 Jan 31, 2026
1416ada
doc: updated documentation theme
mrava87 Jan 31, 2026
932dd4e
ci: added py3.13 to GAs
mrava87 Jan 31, 2026
d6ea3b4
ci: added py3.14 to GAs
mrava87 Jan 31, 2026
c9ecd65
doc: added uv commands to installation doc
mrava87 Jan 31, 2026
a30f409
doc: move rtd to use uv
mrava87 Jan 31, 2026
aec8287
build: update uv.lock with simplified generation
mrava87 Feb 1, 2026
47676e2
build: finalized uv.lock
mrava87 Feb 1, 2026
24526c4
build: migrate content of setup.cfg to pyproject.toml
mrava87 Feb 1, 2026
0fd5b50
build: switch to using ruff
mrava87 Feb 1, 2026
6cb36dc
minor: fix ruff GA
mrava87 Feb 1, 2026
36a1cd8
minor: one more fix of ruff GA
mrava87 Feb 1, 2026
c2d485a
minor: simplify args in ruff GA
mrava87 Feb 1, 2026
91d323a
minor: added src to ruff in pyproject.toml
mrava87 Feb 1, 2026
5350667
minor: add src in ruff GA
mrava87 Feb 1, 2026
fb68cb4
minor: rm python install in ruff GA
mrava87 Feb 1, 2026
aa65106
minor: remove flake8 GA
mrava87 Feb 1, 2026
744e4ba
doc: switch from flake8 to ruff in doc
mrava87 Feb 1, 2026
e3675ff
minor: improve ruff ignores
mrava87 Feb 1, 2026
bf57a44
minor: change name of test GA
mrava87 Feb 1, 2026
ea9defb
minor: change name of deploy GA
mrava87 Feb 2, 2026
25c0e6e
minor: resolve all mypy errors
mrava87 Feb 2, 2026
826bf82
ci: added mypy GA to CI
mrava87 Feb 2, 2026
fe39aa3
build: added support for coverage
mrava87 Feb 6, 2026
801f86e
ci: added github action for coverage
mrava87 Feb 6, 2026
fa17a35
minor: make coverage GA safe
mrava87 Feb 6, 2026
20b237d
minor: fix command in coverage GA
mrava87 Feb 6, 2026
6936615
minor: one more fix in coverage GA
mrava87 Feb 6, 2026
a34c95d
minor: upload coverage.html as artifact in GA
mrava87 Feb 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 22 additions & 24 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
name: PyProx
name: PyProximal-testing

on: [push, pull_request]
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
- dev

jobs:
build:
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest ]
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi
- name: Install pyproximal
run: |
python -m setuptools_scm
pip install .
- name: Test with pytest
run: |
pytest
- uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Install uv with Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and pyproximal
run: uv sync --locked --all-extras --all-groups
- name: Test with pytest
run: uv run pytest --color=yes pytests/
52 changes: 52 additions & 0 deletions .github/workflows/codacy-coverage-reporter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow uploads PyProximal coverage analysis on Codacy
# For more information see: https://github.com/codacy/codacy-coverage-reporter-action
name: PyProximal-coverage

on:
pull_request:
push:
branches: [main]

jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest]
python-version: ["3.11"]

runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v4

- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Install uv with Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies and pyproximal
run: uv sync --locked --all-extras --all-groups

- name: Coverage with pytest
run: |
uv run coverage run -m pytest
uv run coverage xml
uv run coverage html

- name: Upload HTML coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: htmlcov/

- name: Run codacy-coverage-reporter
if: github.event_name == 'push'
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow uploads PyProx on PyPI using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: PyProx-deploy
name: PyProximal-deploy

on:
release:
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/flake8.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow runs MyPy on the PR
name: PyProximal-mypy

on: [push, pull_request]

jobs:
mypy:
runs-on: ubuntu-latest
name: MyPy
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Install uv with Python
uses: astral-sh/setup-uv@v6
with:
python-version: "3.11"
enable-cache: true
- name: Install dependencies and pyproximal
run: uv sync --locked --all-extras --all-groups
- name: Run Mypy
run: |
uv run mypy pyproximal/
17 changes: 17 additions & 0 deletions .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This workflow runs Ruff on the PR
# For more information see: https://github.com/marketplace/actions/ruff-action
name: PyProximal-ruff

on: [push, pull_request]

jobs:
ruff-lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: ruff Lint
uses: astral-sh/ruff-action@v3
with:
src: "./pyproximal"
39 changes: 21 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,29 @@ repos:
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: check-toml
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict

- repo: https://github.com/psf/black
rev: 25.1.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.14
hooks:
- id: black
args: # arguments to configure black
- --line-length=88
- id: ruff-check
args: [ --fix ]
- id: ruff-format

- repo: https://github.com/pycqa/isort
rev: 6.0.1
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.28
hooks:
- id: isort
name: isort (python)
args:
[
"--profile",
"black",
"--skip",
"__init__.py",
"--filter-files",
"--line-length=88",
]
- id: uv-lock

- repo: https://github.com/abravalheri/validate-pyproject
rev: "v0.23"
hooks:
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]
26 changes: 14 additions & 12 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Declare the Python requirements required to build your docs
python:
install:
- requirements: requirements-doc.txt
- method: pip
path: .
# Set the version of environment using UV
build:
os: ubuntu-24.04
tools:
python: "3.13"
jobs:
pre_create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
create_environment:
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
install:
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --locked --all-extras --all-groups
15 changes: 11 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,21 @@ Ready to contribute?
```
make tests
```
or
```
make tests_uv
```

4. Run flake8 to check the quality of your code:
4. Run ruff to check the quality of your code:
```
make lint
```
Note that PyLops does not enforce full compliance with flake8, rather this is used as a
guideline and will also be run as part of our CI.
Make sure to limit to a minimum flake8 warnings before making a PR.
or
```
make lint_uv
```

Note that PyProximal enforces full compliance with ruff and it will also be run as part of our CI.

5. Update the docs
```
Expand Down
50 changes: 48 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
PIP := $(shell command -v pip3 2> /dev/null || command which pip 2> /dev/null)
PYTHON := $(shell command -v python3 2> /dev/null || command which python 2> /dev/null)
UV := $(shell command -v uv 2> /dev/null || command which uv 2> /dev/null)

.PHONY: install dev-install install_conda dev-install_conda tests doc docupdate servedoc lint typeannot
.PHONY: install dev-install install_conda dev-install_conda
.PHONY: tests tests_uv doc doc_uv docupdate docupdate_uv servedoc
.PHONY: lint lint_uv typeannot typeannot_uv coverage, coverage_uv

pipcheck:
ifndef PIP
Expand All @@ -15,6 +18,12 @@ ifndef PYTHON
endif
@echo Using python: $(PYTHON)

uvcheck:
ifndef UV
$(error "Ensure uv is in your PATH")
endif
@echo Using uv: $(UV)

install:
make pipcheck
$(PIP) install -r requirements.txt && $(PIP) install .
Expand All @@ -36,19 +45,56 @@ tests:
make pythoncheck
pytest

tests_uv:
make uvcheck
$(UV) run pytest

doc:
cd docs && rm -rf source/api/generated && rm -rf source/gallery &&\
rm -rf source/tutorials && rm -rf source/examples &&\
rm -rf build && make html && cd ..

doc_uv:
make uvcheck
cd docs && rm -rf source/api/generated && rm -rf source/gallery &&\
rm -rf source/tutorials && rm -rf source/examples &&\
rm -rf build && $(UV) run make html && cd ..

docupdate:
cd docs && make html && cd ..

docupdate_uv:
make uvcheck
cd docs && $(UV) run make html && cd ..

servedoc:
make pythoncheck
$(PYTHON) -m http.server --directory docs/build/html/

servedoc_uv:
make uvcheck
$(UV) run python -m http.server --directory docs/build/html/

lint:
flake8 docs/source examples/ pyproximal/ pytests/ tutorials/
ruff check docs/source examples/ pyproximal/ pytests/ tutorials/

lint_uv:
make uvcheck
$(UV) run ruff check docs/source examples/ pyproximal/ pytests/ tutorials/

typeannot:
mypy pyproximal/

typeannot_uv:
make uvcheck
$(UV) run mypy pyproximal/

coverage:
coverage run -m pytest && coverage xml && coverage html && $(PYTHON) -m http.server --directory htmlcov/

coverage_uv:
make uvcheck
$(UV) run coverage run -m pytest &&\
$(UV) run coverage xml &&\
$(UV) run coverage html &&\
$(UV) run python -m http.server --directory htmlcov/
4 changes: 2 additions & 2 deletions docs/source/adding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

.. _numpydoc-docstring: https://numpydoc.readthedocs.io/en/latest/

|:paintbrush:| Implementing new operators
#########################################

Implementing new operators
==========================
Users are welcome to create new operators and add them to the PyProximal library.

In this tutorial, we will go through the key steps in the definition of an operator, using the
Expand Down
4 changes: 2 additions & 2 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _api:

PyProximal API
==============
|:wrench:| PyProximal API
=========================

The Application Programming Interface (API) of PyProximal is composed of 3 elements:

Expand Down
Loading