Skip to content

Commit e9a6b16

Browse files
committed
Merge branch 'master' into 460-element-equality
2 parents 9a3f2f3 + 3014998 commit e9a6b16

201 files changed

Lines changed: 9348 additions & 2876 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/codespell.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Spell Check
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
spellcheck:
11+
name: Spell Check
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.10'
20+
21+
- name: Install codespell
22+
run: pip install codespell
23+
24+
- name: Run codespell
25+
run: codespell --config .codespellrc

.github/workflows/pytest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
strategy:
7575
matrix:
7676
os: [ "windows-latest", "ubuntu-latest" , "macos-latest"]
77-
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
77+
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
7878
runs-on: ${{matrix.os}}
7979
steps:
8080
- uses: actions/checkout@v4

.github/workflows/ruff.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ jobs:
66
continue-on-error: true
77
steps:
88
- uses: actions/checkout@v3
9-
- uses: chartboost/ruff-action@v1
9+
- uses: astral-sh/ruff-action@v1

.github/workflows/run-examples.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Run K-Wave Examples
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 1' # Every Monday at 00:00 UTC
6+
workflow_dispatch: # Manual trigger
7+
8+
jobs:
9+
discover-examples:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
example_paths: ${{ steps.find-examples.outputs.examples }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
- id: find-examples
16+
run: |
17+
# Find all Python files in examples subdirectories
18+
EXAMPLES=$(find examples -name "*.py" -not -path "*/\.*" | jq -R -s -c 'split("\n")[:-1]')
19+
echo "examples=$EXAMPLES" >> "$GITHUB_OUTPUT"
20+
21+
run-examples:
22+
needs: discover-examples
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 60 # 1 hour timeout per example
25+
strategy:
26+
fail-fast: false # Continue running other examples even if one fails
27+
matrix:
28+
example: ${{ fromJson(needs.discover-examples.outputs.example_paths) }}
29+
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
34+
- name: Install system dependencies
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install -y ffmpeg
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: '3.10' # Matches requires-python from pyproject.toml
43+
cache: 'pip'
44+
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install --upgrade pip
48+
# Install the package with example dependencies
49+
pip install -e ".[example]"
50+
51+
- name: Run example
52+
env:
53+
KWAVE_FORCE_CPU: 1
54+
run: |
55+
echo "Running example: ${{ matrix.example }}"
56+
python "${{ matrix.example }}"

.github/workflows/test_example.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
matrix:
99
os: [ "windows-latest", "ubuntu-latest" , "macos-latest"]
10-
python-version: [ "3.9", "3.10", "3.11", "3.12"]
10+
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
1111
runs-on: ${{matrix.os}}
1212
steps:
1313
- uses: actions/checkout@v4
@@ -23,7 +23,7 @@ jobs:
2323
run: |
2424
python3 examples/us_bmode_linear_transducer/us_bmode_linear_transducer.py
2525
- name: Upload example results
26-
uses: actions/upload-artifact@v3
26+
uses: actions/upload-artifact@v4
2727
with:
2828
name: example_bmode_reconstruction_results_${{ matrix.os }}_${{ matrix.python-version }}
2929
path: ${{ github.workspace }}/example_bmode.png

.github/workflows/test_optional_dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ "windows-latest", "ubuntu-latest" , "macos-latest"]
16-
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
16+
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
1717
extra_requirements: [ "test", "examples", "docs", "dev", "all" ]
1818
runs-on: ${{matrix.os}}
1919
steps:

.github/workflows/test_pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
1111
- uses: actions/setup-python@v5
1212
with:
13-
python-version: '3.9'
13+
python-version: '3.10'
1414
cache: 'pip'
1515
- name: Build and Commit
1616
uses: waltsims/pages@pyproject.toml-support

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
# Virtual environments
66
.venv/
7+
venv/
78

89
# Compiled files
910
*.pyc

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ repos:
1717
args: [ --fix ]
1818
# Run the formatter.
1919
- id: ruff-format
20+
- repo: https://github.com/codespell-project/codespell
21+
rev: v2.2.6
22+
hooks:
23+
- id: codespell
24+
additional_dependencies:
25+
- tomli
26+
args: [--write-changes]
2027
# - repo: https://github.com/pre-commit/pre-commit-hooks
2128
# rev: v4.5.0 # Use the ref you want to point at
2229
# hooks:

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
build:
44
os: ubuntu-22.04
55
tools:
6-
python: "3.9"
6+
python: "3.11"
77
sphinx:
88
configuration: docs/conf.py
99
python:

0 commit comments

Comments
 (0)