Skip to content

Commit b22134a

Browse files
authored
Merge pull request #244 from Computer-Aided-Validation-Laboratory/dev
v2026.2.0
2 parents 54ad5d1 + 39a162a commit b22134a

83 files changed

Lines changed: 2091 additions & 370 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/tests.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Run tests
2-
32
on:
43
push:
54
branches: [main, dev]
@@ -14,6 +13,7 @@ jobs:
1413
fail-fast: false
1514
matrix:
1615
os: [ubuntu-latest, windows-latest, macos-14, macos-15-intel, macos-latest]
16+
env-type: [pip]
1717
include:
1818
- os: macos-14
1919
llvm: llvm@15
@@ -30,34 +30,33 @@ jobs:
3030
with:
3131
python-version: '3.11'
3232

33-
- name: set default compiler on macOS to GCC
33+
- name: Set default compiler on macOS to GCC
3434
if: startsWith(matrix.os, 'macos')
3535
run: |
3636
echo "CC=gcc-15" >> $GITHUB_ENV
3737
echo "CXX=g++-15" >> $GITHUB_ENV
3838
39-
- name: Install dependencies for ubuntu-latest
39+
- name: Install system dependencies (Ubuntu)
4040
if: matrix.os == 'ubuntu-latest'
4141
run: |
4242
sudo apt update
4343
sudo apt install -y libegl1 libgl1 libxext6 libx11-6
4444
45-
- name: Upgrade pip and install package
45+
- name: Install with pip
46+
if: matrix.env-type == 'pip'
4647
run: |
4748
python -m pip install --upgrade pip
4849
pip install -e . -v
50+
pip install pytest pytest-mock
4951
5052
- name: Smoke test
51-
run: |
52-
python -c "import pyvale"
53+
run: python -c "import pyvale"
5354

5455
- name: Run sensorsim and DIC tests
55-
run: |
56-
pip install pytest pytest-mock
57-
pytest -v tests/dic/. tests/sensorsim/.
56+
shell: bash -el {0}
57+
run: pytest -v tests/dic/. tests/sensorsim/. tests/strain/.
5858

5959
- name: Run blender tests (skip macOS ARM)
6060
if: ${{ !startsWith(matrix.os, 'macos') || contains(matrix.os, 'intel') }}
61-
run: |
62-
pip install pytest pytest-mock
63-
pytest -v tests/blender/.
61+
shell: bash -el {0}
62+
run: pytest -v tests/blender/.

.github/workflows/wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Build Wheels and upload (if new release) to PyPI
33
on:
44
workflow_dispatch:
55
push:
6-
branches: [main, dev]
6+
branches: [main]
77
pull_request:
8-
branches: [main, dev]
8+
branches: [main]
99
release:
1010
types:
1111
- published

docs/apidoc.sh

Lines changed: 80 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
set -e
1+
#!/usr/bin/env bash
2+
set -e
23
set -o pipefail
34

45
echo "=========================================="
@@ -11,23 +12,16 @@ error_exit() {
1112
exit 1
1213
}
1314

14-
# Generate the python API documentation
15+
# Python API documentation
1516
sphinx-apidoc -f -o ./source --separate ../src/pyvale/ ../src/pyvale/data/* ../src/pyvale/examples/* || error_exit "sphinx-apidoc failed"
1617

1718
# Remove autogenerated TOC file
1819
rm -f source/modules.rst || error_exit "Failed to remove modules.rst"
1920

20-
# Generate the C++ API documentation
21-
( cd ./source && doxygen Doxyfile ) || error_exit "doxygen generation failed"
22-
2321
echo "Updating generated RST files..."
2422

25-
# Change title for dataset file
26-
# sed -i '0,/pyvale.dataset/s/pyvale.dataset/pyvale.dataset/' source/pyvale.dataset.rst || error_exit "Failed to update dataset title"
27-
# sed -i '0,/dataset.dataset/s/dataset.dataset/pyvale.dataset/' source/pyvale.dataset.dataset.rst || error_exit "Failed to update dataset title"
28-
2923
# Modules to process
30-
modules=("dic" "blender" "mooseherder" "sensorsim" "verif" "dataset")
24+
modules=("dic" "blender" "mooseherder" "sensorsim" "verif" "dataset" "strain")
3125

3226
for mod in "${modules[@]}"; do
3327
rst="source/pyvale.${mod}.rst"
@@ -59,3 +53,79 @@ rm -f ./source/pyvale.dic.dic2dcpp.rst || error_exit "Failed to remove dic2dcpp.
5953

6054
echo "PYTHON API DOCUMENTATION GENERATED SUCCESSFULLY!"
6155

56+
# ------------------------------------------------------------------
57+
# Generate C++ API documentation
58+
# ------------------------------------------------------------------
59+
echo "=========================================="
60+
echo " GENERATING C++ API DOCUMENTATION..."
61+
echo "=========================================="
62+
63+
# Run Doxygen (optional, if you still want it)
64+
( cd ./source && doxygen Doxyfile ) || error_exit "doxygen generation failed"
65+
66+
# Create RST files for each C++ header
67+
for mod in "${modules[@]}"; do
68+
src_dir="../src/pyvale/${mod}/cpp"
69+
out_dir="source/cpp/${mod}"
70+
71+
mkdir -p "$out_dir"
72+
73+
for file in "$src_dir"/*.hpp; do
74+
[ -e "$file" ] || continue
75+
76+
filename=$(basename "$file")
77+
base="${filename%.hpp}"
78+
rst_file="${out_dir}/${base}.rst"
79+
80+
echo "Generating $rst_file"
81+
82+
cat > "$rst_file" <<EOF
83+
${filename}
84+
==================
85+
86+
.. doxygenfile:: ${filename}
87+
:project: pyvale
88+
:path: ${src_dir}
89+
EOF
90+
done
91+
done
92+
93+
# ------------------------------------------------------------------
94+
# Generate module-level index RST files for C++ headers
95+
# ------------------------------------------------------------------
96+
for mod in "${modules[@]}"; do
97+
out_dir="source/cpp/${mod}"
98+
index_file="source/cpp/cpp_${mod}.rst"
99+
100+
headers=""
101+
for f in "$out_dir"/*.rst; do
102+
[ -e "$f" ] || continue # skip if no files
103+
headers="$headers $(basename "$f")"
104+
done
105+
106+
# Skip if no headers found
107+
[ -z "$headers" ] && continue
108+
109+
# Sort headers alphabetically
110+
headers=$(echo $headers | tr ' ' '\n' | sort)
111+
112+
echo "Generating module index $index_file"
113+
114+
{
115+
echo "${mod}"
116+
echo "=================="
117+
echo ""
118+
echo ".. toctree::"
119+
echo " :caption: C++ Source Files"
120+
echo " :maxdepth: 1"
121+
echo ""
122+
for h in $headers; do
123+
echo " ${mod}/${h}"
124+
done
125+
} > "$index_file"
126+
done
127+
128+
129+
130+
echo "C++ RST FILES GENERATED SUCCESSFULLY!"
131+

docs/requirements.txt

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,35 @@
1-
# --- Core Sphinx Builder ---
1+
# Core Stuff
22
sphinx
3-
babel # For language support/i18n
4-
docutils # For RST parsing (fundamental)
5-
imagesize # For image dimension handling
6-
pygments # For code highlighting
7-
snowballstemmer # For search indexing (used by epub3 builder)
3+
babel
4+
docutils
5+
imagesize
6+
pygments
7+
snowballstemmer
8+
breathe
89

9-
# --- Theme and Parser ---
10+
# Theme
1011
furo
1112
alabaster
1213
myst-parser
1314

14-
# --- Sphinx Extensions (Directly Listed in conf.py) ---
15+
# nice formatting stuff
1516
sphinx-codeautolink
1617
sphinx-copybutton
17-
breathe # For C++ documentation integration
18-
sphinx-gallery # For example gallery generation
18+
sphinx-gallery
19+
sphinx-design
20+
sphinx-autodoc-typehints
21+
ipywidgets
22+
matplotlib
23+
pillow
1924

20-
# --- Extension Dependencies ---
21-
sphinx-autodoc-typehints # You use 'autodoc' which benefits from this
22-
ipywidgets # Often required by sphinx-gallery examples (e.g., matplotlib output)
23-
matplotlib # Required for plotting in sphinx-gallery examples
24-
pillow # Required for various image/gallery operations
25-
26-
# --- Specific sphinxcontrib Extensions (Explicitly added to resolve previous errors) ---
27-
sphinxcontrib-applehelp # Needed if the epub3 builder triggers it (which is common)
25+
sphinxcontrib-applehelp
2826
sphinxcontrib-devhelp
2927
sphinxcontrib-htmlhelp
3028
sphinxcontrib-jsmath
31-
sphinxcontrib-qthelp # Added proactively for completeness
29+
sphinxcontrib-qthelp
3230
sphinxcontrib-serializinghtml
3331

34-
# --- Your Project Dependencies (From your original list) ---
32+
# other random stuff
3533
certifi
3634
idna
3735
jinja2

docs/source/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ WARN_LOGFILE =
943943
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
944944
# Note: If this tag is empty the current directory is searched.
945945

946-
INPUT = ../../src/pyvale/dic/cpp
946+
INPUT = ../../src/pyvale/dic/cpp ../../src/pyvale/strain/cpp
947947

948948
# This tag can be used to specify the character encoding of the source files
949949
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

docs/source/_static/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99
color: #0066cc !important; /* Monokai-style cyan */
1010
}
1111

12+
.code-scroll {
13+
max-height: 400px;
14+
overflow: auto;
15+
}

docs/source/_static/hrdic.png

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../images/hrdic.png

docs/source/api_cpp.rst

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@ Detailed C++ API
22
=================
33

44

5-
Digital Image Correlation
6-
-------------------------
7-
8-
95
.. toctree::
106
:maxdepth: 1
11-
:caption: C++ Header Files
7+
:caption: Modules
128

13-
cpp/dicbruteforce
14-
cpp/dicfourier
15-
cpp/dicinterpolator
16-
cpp/dicmain
17-
cpp/dicoptimizer
18-
cpp/dicrg
19-
cpp/dicscanmethod
20-
cpp/dicsmooth
21-
cpp/dicstrain
22-
cpp/dicutil
9+
./cpp/cpp_dic.rst
10+
./cpp/cpp_strain.rst

docs/source/api_py.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Detailed Python API
1010
pyvale.sensorsim
1111
pyvale.blender
1212
pyvale.dic
13+
pyvale.strain
1314
pyvale.mooseherder
1415
pyvale.verif
1516
pyvale.dataset

docs/source/cite.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,28 @@ Citing Pyvale
44
If Pyvale has contributed to your research or work please acknowledge the
55
project in your academic puplications using the following citation:
66

7+
.. tab-set::
78

9+
.. tab-item:: APA
10+
11+
Hirst, J., Sibson, L., Tayeb, A., Poole, B., Sampson, M., Bielajewa, W., ... & Fletcher, L. (2026).
12+
PYVALE: A Fast, Scalable, Open-Source 2D Digital Image Correlation (DIC) Engine
13+
Capable of Handling Gigapixel Images.
14+
*arXiv preprint arXiv:2601.12941*.
15+
16+
.. tab-item:: MLA
17+
18+
Hirst, Joel, et al. "PYVALE: A Fast, Scalable, Open-Source 2D Digital Image Correlation
19+
(DIC) Engine Capable of Handling Gigapixel Images."
20+
*arXiv preprint arXiv:2601.12941* (2026).
21+
22+
.. tab-item:: Bibtex
23+
24+
.. code-block::
25+
26+
@article{pyvale2026,
27+
title={PYVALE: A Fast, Scalable, Open-Source 2D Digital Image Correlation (DIC) Engine Capable of Handling Gigapixel Images},
28+
author={Hirst, Joel and Sibson, Lorna and Tayeb, Adel and Poole, Ben and Sampson, Megan and Bielajewa, Wiera and Atkinson, Michael and Marsh, Alex and Spencer, Rory and Hamill, Rob and others},
29+
journal={arXiv preprint arXiv:2601.12941},
30+
year={2026}
31+
}

0 commit comments

Comments
 (0)