diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3f80a2ed..9218e2e4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,10 +12,10 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-14, macos-26] + os: [ubuntu-latest, windows-latest, macos-15, macos-26] env-type: [pip] include: - - os: macos-14 + - os: macos-15 llvm: llvm@15 - os: macos-26 llvm: llvm@20 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e4ff0fd2..9a18ae66 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -15,11 +15,11 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-14, macos-26] + os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-15, macos-26] include: - - os: macos-14 + - os: macos-15 llvm: llvm@15 - macos_deployment_target: "14.0" + macos_deployment_target: "15.0" - os: macos-26 llvm: llvm@20 macos_deployment_target: "26.0" diff --git a/.github/workflows/wheels_testpypi.yml b/.github/workflows/wheels_testpypi.yml index 9ebfbaba..47abcf8d 100644 --- a/.github/workflows/wheels_testpypi.yml +++ b/.github/workflows/wheels_testpypi.yml @@ -9,9 +9,9 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-14, macos-26] + os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-15, macos-26] include: - - os: macos-14 + - os: macos-15 llvm: llvm@15 - os: macos-26 llvm: llvm@20 diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..fa9bde7a --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,24 @@ +# Agent Instructions — PyVale + +PyVale is a Python-first scientific engineering library for sensor simulation, digital image correlation, camera rendering, experimental design, and validation/UQ. Keep changes correct, fast, and simple for users. + +## Read first + +- [Developer guide](dev/README.md), then relevant project documentation under `dev/` and `docs/`. +- [CAVL Python style guide](https://github.com/Computer-Aided-Validation-Laboratory/styleguides/blob/main/guides/python_style_guide.md) — including its Cython section. +- [CAVL Performance Oriented Software guide](https://github.com/Computer-Aided-Validation-Laboratory/styleguides/blob/main/guides/performance_oriented_software_guide.md) — especially for numerical and compiled code. +- [CAVL C++ style guide](https://github.com/Computer-Aided-Validation-Laboratory/styleguides/blob/main/guides/cpp_style_guide.md) — for C/C++ code. +- [CAVL Zig style guide](https://github.com/Computer-Aided-Validation-Laboratory/styleguides/blob/main/guides/zig_style_guide.md) — when touching Zig code. + +## PyVale-specific rules + +1. **Python-first API.** Keep user-facing configuration and workflows in clear, typed Python; use compiled code for measured or clearly identified performance-critical work. +2. **Scientific meaning matters.** Preserve physical units, coordinate conventions, array shapes and axes, and numerical assumptions. Never silently change their interpretation. +3. **Explicit native boundaries.** Keep Python/native interfaces narrow, with explicit ownership, lifetime, layout and dtype requirements. Follow `dev/README.md` on C ABI and build tooling. +4. **Avoid unnecessary data movement.** Design NumPy arrays and native buffers to minimise allocations, conversions, copies and Python calls inside intensive loops. +5. **Performance is designed in.** Consider computational complexity, data locality, vectorisation and parallelism early; benchmark representative workloads before claiming speedups. +6. **Validate at boundaries.** Reject invalid or ambiguous inputs clearly, and avoid redundant checks inside validated numerical kernels. +7. **Prefer straightforward implementations.** Avoid speculative abstractions, inheritance, extra dependencies and tiny single-use helpers that obscure the algorithm. +8. **API evolution**: Pyvale is a young, evolving project. Do not preserve public APIs at the expense of a cleaner, more consistent design. Breaking changes are acceptable and encouraged when justified. Avoid backwards-compatibility shims, deprecated aliases, and legacy code paths. Update all affected call sites, tests, examples, and documentation. +9. **Verify numerics.** Add focused tests for changes, including analytic/reference comparisons, regression cases and appropriate tolerances; run the relevant existing tests. +10. **Keep documentation aligned.** Update applicable `dev/`, user documentation and examples when changing interfaces, conventions or numerical behaviour; report tests and benchmarks actually run. diff --git a/README.md b/README.md index 120c90a4..269f356a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@
-
+
diff --git a/pyproject.toml b/pyproject.toml
index 1f9a62a3..b468c7e6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -5,7 +5,7 @@ build-backend = "scikit_build_core.build"
[project]
name = "pyvale"
-version = "2026.9.5"
+version = "2026.10.0"
description = "Your virtual engineering lab: An all-in-one package for simulation-driven experimental design."
authors = [
{ name = "scepticalrabbit et al.", email = "thescepticalrabbit@gmail.com" },
@@ -20,7 +20,7 @@ dependencies = [
"matplotlib>=3.8",
"pyvista>=0.43.3",
"vtk>=9.5.2",
- "netCDF4>=1.6.5",
+ "netCDF4==1.7.5",
"sympy>=1.13.0",
"PyQT6>=6.7.1",
"imageio>=2.36.1",
@@ -29,7 +29,7 @@ dependencies = [
"pyqtgraph>=0.13.7",
"opencv-python>=4.13.0.92",
"pandas>=2.3.1",
- "riley-raster>=2026.9.2",
+ "riley-raster==2026.10.1",
]
[project.optional-dependencies]
diff --git a/src/pyvale/dic/_dicchecks.py b/src/pyvale/dic/_dicchecks.py
index 2bd2be4f..11fdab3f 100644
--- a/src/pyvale/dic/_dicchecks.py
+++ b/src/pyvale/dic/_dicchecks.py
@@ -87,9 +87,17 @@ def _multiwindow_init(subset_size: int,
f"{multiwindow_search_area[i]} at index {i}")
overlap = [x * (1.0-multiwindow_overlap) for x in multiwindow_subset_size]
+ configured_overlap = list(map(int, overlap))
overlap.append(subset_step)
overlap = list(map(int,overlap))
+ # Avoid running the same final FFT level twice when size and overlap are identical
+ if (multiwindow_subset_size and
+ multiwindow_subset_size[-1] == subset_size and
+ multiwindow_search_area[-1] == subset_size and
+ configured_overlap[-1] == subset_step):
+ return configured_overlap, multiwindow_subset_size, multiwindow_search_area
+
multiwindow_subset_size.append(subset_size)
multiwindow_search_area.append(subset_size)
@@ -245,7 +253,9 @@ def _check_thresholds(threshold: float,
raise ValueError("Optimizer precision must be a float strictly "
"between 0 and 1.")
-def _check_subsets(subset_size: int, subset_step: int) -> None:
+def _check_subsets(subset_size: int,
+ subset_step: int,
+ method: str | None = None) -> None:
"""
Parameters
@@ -254,6 +264,9 @@ def _check_subsets(subset_size: int, subset_step: int) -> None:
Threshold for the Levenberg optimization method.
subset_step : int
Threshold for the brute-force optimization method.
+ method : str, optional
+ Scan method. Even subset sizes are supported by the FFT-only
+ ``MULTIWINDOW`` method, but remain disallowed for the other methods.
Raises
------
@@ -262,8 +275,8 @@ def _check_subsets(subset_size: int, subset_step: int) -> None:
"""
- # Enforce scalar types for non-FFT methods
- if subset_size % 2 == 0:
+ # The FFT-only multiwindow path handles even-sized subsets explicitly.
+ if subset_size % 2 == 0 and method != "MULTIWINDOW":
raise ValueError("subset_size must be an odd number.")
# check if subset_step is larger than the subset_size
diff --git a/src/pyvale/dic/dic2d.py b/src/pyvale/dic/dic2d.py
index eb9da30d..383731d1 100644
--- a/src/pyvale/dic/dic2d.py
+++ b/src/pyvale/dic/dic2d.py
@@ -232,7 +232,7 @@ def calculate_2d(reference: np.ndarray | str | Path,
dicchecks._check_thresholds(threshold, precision)
common_util.check_output_directory(str(output_basepath), output_prefix, print_level)
- dicchecks._check_subsets(subset_size, subset_step)
+ dicchecks._check_subsets(subset_size, subset_step, method_enum.value)
updated_seeds = dicchecks._check_and_update_rg_seed(seed, roi_mask, method_enum.value, w, h, subset_size, subset_step)
num_params = dicchecks._check_shape_function(shape_function_enum)
diff --git a/src/pyvale/dic/dic3d.py b/src/pyvale/dic/dic3d.py
index 762ea576..9b82a9c2 100644
--- a/src/pyvale/dic/dic3d.py
+++ b/src/pyvale/dic/dic3d.py
@@ -130,7 +130,9 @@ def calculate_3d(reference: list[np.ndarray] | list[str] | list[Path],
the existing flat format ``[x0, y0, x1, y1, ...]`` or tuple format
``[(x0, y0), (x1, y1), ...]``. If the method is not RG, this will be ignored.
subset_size : int, optional
- Size of the square subset window in pixels (default: 21).
+ Size of the square subset window in pixels (default: 21). Must be odd
+ except for the FFT-only ``"MULTIWINDOW"`` method, which also supports
+ even sizes.
subset_step : int, optional
Step size between subset centers in pixels (default: 10).
correlation_criteria : str, optional
@@ -323,7 +325,7 @@ def calculate_3d(reference: list[np.ndarray] | list[str] | list[Path],
# checks on the config
dicchecks._check_thresholds(threshold, precision)
common_util.check_output_directory(str(output_basepath), output_prefix, print_level)
- dicchecks._check_subsets(subset_size, subset_step)
+ dicchecks._check_subsets(subset_size, subset_step, method_enum.value)
updated_seeds = dicchecks._check_and_update_rg_seed(seed, roi_mask, method_enum.value, w0, h0, subset_size, subset_step)
num_params = dicchecks._check_shape_function(shape_function_enum)
diff --git a/src/pyvale/examples/render3d/ex1a_riley_quickstart.py b/src/pyvale/examples/render3d/ex1a_riley_quickstart.py
index b4fa740d..9efdad70 100644
--- a/src/pyvale/examples/render3d/ex1a_riley_quickstart.py
+++ b/src/pyvale/examples/render3d/ex1a_riley_quickstart.py
@@ -61,6 +61,7 @@
rot_world=Rotation.identity(),
roi_cent_world=np.zeros(3),
focal_length=1.0,
+ subsample=4,
)
camera = render.cam_frame_mesh(camera, mesh, fov_scale=1.0)
@@ -69,9 +70,12 @@
# 3. Build renderer backend
# -------------------------------
-config = riley.create_raster_config(1, save_strategy=riley.SaveStrategy.both)
+config = riley.RasterConfig(
+ parallel=1,
+ save_strategy=riley.SaveStrategy.both,
+ image_save_mode=riley.ImageSaveMode.grey,
+)
config.report = riley.ReportMode.bench
-config.image_save_mode = riley.ImageSaveMode.grey
config.save_scaling = riley.ScaleStrategy.none
output_dir = Path.cwd() / "pyvale-output" / "render3d_ex1a_riley_quickstart"
diff --git a/src/pyvale/examples/render3d/ex1b_riley_sphere200.py b/src/pyvale/examples/render3d/ex1b_riley_sphere200.py
index 5fed025d..6e9286f6 100644
--- a/src/pyvale/examples/render3d/ex1b_riley_sphere200.py
+++ b/src/pyvale/examples/render3d/ex1b_riley_sphere200.py
@@ -77,7 +77,7 @@
rot_world=rotation,
roi_cent_world=np.zeros(3),
focal_length=focal_length,
- subsample=2,
+ subsample=4,
)
camera = render.cam_frame_mesh(camera, mesh, fov_scale=1.0)
@@ -86,10 +86,11 @@
# 3. Configure and build the renderer
# ------------------------------------------------------------
-config = riley.create_raster_config(
- num_frames=1,
- total_threads=4,
+config = riley.RasterConfig(
+ parallel=4,
save_strategy=riley.SaveStrategy.disk,
+ image_save_mode=riley.ImageSaveMode.grey,
+ save_scaling=riley.ScaleStrategy.auto,
)
output_dir = Path.cwd() / "pyvale-output" / "render3d_ex1b_riley_sphere200"
diff --git a/src/pyvale/examples/render3d/ex1c_riley_rabbits.py b/src/pyvale/examples/render3d/ex1c_riley_rabbits.py
index 6c810a1b..a3129a53 100644
--- a/src/pyvale/examples/render3d/ex1c_riley_rabbits.py
+++ b/src/pyvale/examples/render3d/ex1c_riley_rabbits.py
@@ -137,7 +137,7 @@ def load_rabbit(
rot_world=Rotation.identity(),
roi_cent_world=np.zeros(3),
focal_length=focal_length,
- subsample=2,
+ subsample=4,
)
camera = render.cam_frame_scene(camera, meshes, fov_scale=1.01)
@@ -146,9 +146,8 @@ def load_rabbit(
# 3. Configure and build the renderer
# ------------------------------------------------------------
-config = riley.create_raster_config(
- num_frames=1,
- total_threads=4,
+config = riley.RasterConfig(
+ parallel=4,
save_strategy=riley.SaveStrategy.disk,
)
config.background_value = 127.5
diff --git a/src/pyvale/examples/render3d/ex1d_riley_dicuq.py b/src/pyvale/examples/render3d/ex1d_riley_dicuq.py
index 41ef9b96..d0728584 100644
--- a/src/pyvale/examples/render3d/ex1d_riley_dicuq.py
+++ b/src/pyvale/examples/render3d/ex1d_riley_dicuq.py
@@ -103,12 +103,12 @@
rot_world=rot_world_0,
roi_cent_world=roi_centre,
focal_length=focal_length,
- sub_sample=2,
- distortion_model=distortion_model,
- distortion_k1=-0.2,
- distortion_k2=0.1,
- distortion_p1=0.0001,
- distortion_p2=-0.0001,
+ sub_sample=4,
+ distort_model=distortion_model,
+ distort_k1=-0.2,
+ distort_k2=0.1,
+ distort_p1=0.0001,
+ distort_p2=-0.0001,
)
camera_1 = copy.deepcopy(camera_0)
@@ -119,9 +119,8 @@
# 3. Configure and build the renderer
# ------------------------------------------------------------
-config = riley.create_raster_config(
- num_frames=mesh.displacements.shape[0],
- total_threads=8,
+config = riley.RasterConfig(
+ parallel=4,
save_strategy=riley.SaveStrategy.disk,
)
config.background_value = 128.0
diff --git a/src/pyvale/examples/render3d/ex1e_riley_dic_from_exodus.py b/src/pyvale/examples/render3d/ex1e_riley_dic_from_exodus.py
index 733377e2..b70fcfb5 100644
--- a/src/pyvale/examples/render3d/ex1e_riley_dic_from_exodus.py
+++ b/src/pyvale/examples/render3d/ex1e_riley_dic_from_exodus.py
@@ -111,12 +111,12 @@
rot_world=rot_world_0,
roi_cent_world=roi_centre,
focal_length=focal_length,
- sub_sample=2,
- distortion_model=distortion_model,
- distortion_k1=-0.2,
- distortion_k2=0.1,
- distortion_p1=0.0001,
- distortion_p2=-0.0001,
+ sub_sample=4,
+ distort_model=distortion_model,
+ distort_k1=-0.2,
+ distort_k2=0.1,
+ distort_p1=0.0001,
+ distort_p2=-0.0001,
)
camera_1 = copy.deepcopy(camera_0)
@@ -129,9 +129,8 @@
# 3. Configure and build the renderer
# ------------------------------------------------------------
-config = riley.create_raster_config(
- num_frames=surface_mesh.displacements.shape[0],
- total_threads=8,
+config = riley.RasterConfig(
+ parallel=4,
save_strategy=riley.SaveStrategy.disk,
)
diff --git a/src/pyvale/examples/render3d/ex1f_riley_stereocal.py b/src/pyvale/examples/render3d/ex1f_riley_stereocal.py
index 40691932..b69969eb 100644
--- a/src/pyvale/examples/render3d/ex1f_riley_stereocal.py
+++ b/src/pyvale/examples/render3d/ex1f_riley_stereocal.py
@@ -98,13 +98,13 @@
rot_world=rot_world_0,
roi_cent_world=roi_cent,
focal_length=focal_length,
- sub_sample=2,
- distortion_model=distortion_model,
- distortion_k1=-0.2,
- distortion_k2=0.1,
- distortion_k3=0.0,
- distortion_p1=0.0001,
- distortion_p2=-0.0001,
+ sub_sample=4,
+ distort_model=distortion_model,
+ distort_k1=-0.2,
+ distort_k2=0.1,
+ distort_k3=0.0,
+ distort_p1=0.0001,
+ distort_p2=-0.0001,
)
camera_1 = copy.deepcopy(camera_0)
@@ -126,10 +126,10 @@
# 5. Configure and build the renderer
# ------------------------------------------------------------
-config = riley.create_raster_config(
- num_frames=mesh.displacements.shape[0],
- total_threads=4,
+config = riley.RasterConfig(
+ parallel=4,
save_strategy=riley.SaveStrategy.disk,
+ save_scaling=riley.ScaleStrategy.auto,
)
config.background_value = 128.0
diff --git a/src/pyvale/examples/render3d/ex1g_riley_psf.py b/src/pyvale/examples/render3d/ex1g_riley_psf.py
index e25580f6..e73950aa 100644
--- a/src/pyvale/examples/render3d/ex1g_riley_psf.py
+++ b/src/pyvale/examples/render3d/ex1g_riley_psf.py
@@ -79,12 +79,11 @@
scene = render.Scene3D(meshes=[mesh], cameras=[camera])
for buffer_mode in buffer_modes:
- config = riley.create_raster_config(
- num_frames=1,
- total_threads=4,
+ config = riley.RasterConfig(
+ parallel=4,
save_strategy=riley.SaveStrategy.disk,
)
-
+
config.buffer_mode = buffer_mode
output_dir = output_root / buffer_mode.name
renderer = render.Riley(config, output_dir)
diff --git a/src/pyvale/examples/render3d/ex1h_riley_feature_zoo.py b/src/pyvale/examples/render3d/ex1h_riley_feature_zoo.py
index be2455e0..05d2d8a0 100644
--- a/src/pyvale/examples/render3d/ex1h_riley_feature_zoo.py
+++ b/src/pyvale/examples/render3d/ex1h_riley_feature_zoo.py
@@ -202,11 +202,11 @@ def build_cameras(meshes: list[riley.Mesh]) -> list[riley.Camera]:
cam.sub_sample = sub_sample
if optics in ("distortion", "both", "ring"):
- cam.distortion_model = 1
- cam.distortion_k1 = -0.12
- cam.distortion_k2 = 0.035
- cam.distortion_p1 = 0.0002
- cam.distortion_p2 = -0.0001
+ cam.distort_model = 1
+ cam.distort_k1 = -0.12
+ cam.distort_k2 = 0.035
+ cam.distort_p1 = 0.0002
+ cam.distort_p2 = -0.0001
if optics in ("psf", "both"):
cam.psf_type = riley.PsfType.gaussian
@@ -300,9 +300,8 @@ def render_case(channels: int, bits: int) -> None:
native_meshes = [render.to_riley_mesh(mesh) for mesh in meshes]
cameras = build_cameras(native_meshes)
case_name = f"{'mono' if channels == 1 else 'rgb'}-u{bits}"
- config = riley.create_raster_config(
- num_frames=len(FRAME_INDICES),
- total_threads=4,
+ config = riley.RasterConfig(
+ parallel=4,
save_strategy=riley.SaveStrategy.disk,
)
config.image_save_mode = (
diff --git a/src/pyvale/examples/renderuvs/tools.py b/src/pyvale/examples/renderuvs/tools.py
index 4d9a7916..05d19641 100644
--- a/src/pyvale/examples/renderuvs/tools.py
+++ b/src/pyvale/examples/renderuvs/tools.py
@@ -19,9 +19,8 @@ def render_uv_example(
) -> render.RenderResult:
"""Render one prepared textured mesh and camera for the UV examples."""
- config = riley.create_raster_config(
- num_frames=1,
- total_threads=4,
+ config = riley.RasterConfig(
+ parallel=4,
save_strategy=riley.SaveStrategy.disk,
)
config.background_value = 128.0
diff --git a/src/pyvale/render/dicexamples.py b/src/pyvale/render/dicexamples.py
index 7f8077de..c684c300 100644
--- a/src/pyvale/render/dicexamples.py
+++ b/src/pyvale/render/dicexamples.py
@@ -201,8 +201,9 @@ def _render_case(
)
)
- config = riley.create_raster_config(
- num_frames=num_frames, total_threads=8, save_strategy=riley.SaveStrategy.disk
+ config = riley.RasterConfig(
+ parallel=8,
+ save_strategy=riley.SaveStrategy.disk,
)
config.background_value = 128.0
config.tile_size_max = 128
diff --git a/src/pyvale/verif/renderconformance.py b/src/pyvale/verif/renderconformance.py
index 2986cd1f..cfe70006 100644
--- a/src/pyvale/verif/renderconformance.py
+++ b/src/pyvale/verif/renderconformance.py
@@ -223,9 +223,8 @@ def _render_riley(
scaling_type=riley.ScaleStrategy.none,
),
)
- config = riley.create_raster_config(
- 2,
- total_threads=1,
+ config = riley.RasterConfig(
+ parallel=1,
save_strategy=riley.SaveStrategy.memory,
)
config.background_value = 0.15
diff --git a/src/pyvale/verif/renderverif.py b/src/pyvale/verif/renderverif.py
index 931bd5a2..81bb40f6 100644
--- a/src/pyvale/verif/renderverif.py
+++ b/src/pyvale/verif/renderverif.py
@@ -159,8 +159,9 @@ def render_triangle(output_dir: Path) -> np.ndarray:
def riley_memory_config() -> riley.RasterConfig:
"""Return a single-frame Riley raster configuration kept in memory."""
- return riley.create_raster_config(
- 1, save_strategy=riley.SaveStrategy.memory,
+ return riley.RasterConfig(
+ parallel=1,
+ save_strategy=riley.SaveStrategy.memory,
)
diff --git a/tests/dic/test_dic.py b/tests/dic/test_dic.py
index 4070a6f1..8a261287 100644
--- a/tests/dic/test_dic.py
+++ b/tests/dic/test_dic.py
@@ -479,8 +479,8 @@ def test_2d_multiwindow_fft_large(dic_temp_dir: Path) -> None:
deformed=def_large,
roi_mask=roi_rigid.mask,
seed=seed,
- subset_size=31,
- subset_step=15,
+ subset_size=32,
+ subset_step=16,
max_displacement=100,
correlation_criteria="ZNSSD",
shape_function="RIGID",
diff --git a/tests/examples/test_dic_examples.py b/tests/examples/test_dic_examples.py
index 90c7110e..847d0577 100644
--- a/tests/examples/test_dic_examples.py
+++ b/tests/examples/test_dic_examples.py
@@ -11,16 +11,18 @@
from collections.abc import Callable
from pathlib import Path
-import numpy as np
import pytest
_DIC_EXAMPLES = (
- pytest.param("dic/ex05_dic_challenge.py", "pyvale-output"),
+ pytest.param("dic/ex04_dic_challenge.py", "pyvale-output/dic_ex04"),
pytest.param(
- "dic/ex07_incremental.py",
- "pyvale-output/incremental",
+ "dic/ex06_incremental.py",
+ "pyvale-output/dic_ex06",
marks=pytest.mark.example_slow,
),
+ pytest.param("dic/ex08_stereo.py", "pyvale-output/dic_ex08"),
+ pytest.param("dic/ex09_stereo_platehole.py", "pyvale-output/dic_ex09"),
+ pytest.param("dic/ex10_dic_chal.py", "pyvale-output/dic_ex10"),
)
@@ -30,17 +32,17 @@ def test_plate_with_hole_examples(run_example: Callable[..., Path]) -> None:
"""The strain example runs against DIC output from the preceding example."""
work_dir = run_example(
"dic/ex02_plate_with_hole.py",
- ("pyvale-output/ex02",),
+ ("pyvale-output/dic_ex02",),
timeout=300.0,
)
run_example(
"dic/ex03_plate_with_hole_strain.py",
- ("pyvale-output/ex03",),
+ ("pyvale-output/dic_ex03",),
timeout=300.0,
)
- assert (work_dir / "pyvale-output/ex03").is_dir()
+ assert (work_dir / "pyvale-output/dic_ex03").is_dir()
@pytest.mark.example
@@ -52,31 +54,3 @@ def test_dic_example(
) -> None:
"""Each supported standalone DIC gallery example runs successfully."""
run_example(example, (output,), timeout=300.0)
-
-
-@pytest.mark.example
-@pytest.mark.example_module("dic")
-def test_render_to_dic_example(run_example: Callable[..., Path]) -> None:
- """The Riley render produces an accurate analytic DIC displacement."""
- work_dir = run_example(
- "dic/ex04_render_to_dic.py",
- (
- "pyvale-output/dic_ex04_render_to_dic/"
- "dic_ex04_render_to_dic.png",
- ),
- timeout=300.0,
- )
-
- dic_dir = (
- work_dir
- / "pyvale-output"
- / "dic_ex04_render_to_dic"
- / "dic"
- )
- result_files = sorted(dic_dir.glob("render_to_dic_*.csv"))
- assert len(result_files) == 1
-
- result = np.loadtxt(result_files[0], delimiter=",", skiprows=1)
- assert np.all(result[:, 5].astype(bool))
- np.testing.assert_allclose(result[:, 2], 0.5, atol=0.05)
- np.testing.assert_allclose(result[:, 3], 0.5, atol=0.05)
diff --git a/tests/render/gold_riley/rabbits.npy b/tests/render/gold_riley/rabbits.npy
index 3a9dd6cc..33340359 100644
Binary files a/tests/render/gold_riley/rabbits.npy and b/tests/render/gold_riley/rabbits.npy differ
diff --git a/tests/render/test_riley_integration.py b/tests/render/test_riley_integration.py
index 20bcfa58..a921249d 100644
--- a/tests/render/test_riley_integration.py
+++ b/tests/render/test_riley_integration.py
@@ -59,8 +59,9 @@ def test_riley_returns_canonical_image_layout() -> None:
roi_cent_world=np.zeros(3),
focal_length=1.0,
)
- config = riley.create_raster_config(
- 1, save_strategy=riley.SaveStrategy.memory
+ config = riley.RasterConfig(
+ parallel=1,
+ save_strategy=riley.SaveStrategy.memory,
)
result = render.Riley(config).render(render.Scene3D([mesh], [camera]))
assert result.images is not None
@@ -100,9 +101,8 @@ def test_common_mesh_matches_native_riley_mesh() -> None:
)
def render_mesh(mesh: object) -> np.ndarray:
- config = riley.create_raster_config(
- 1,
- total_threads=1,
+ config = riley.RasterConfig(
+ parallel=1,
save_strategy=riley.SaveStrategy.memory,
)
result = render.Riley(config).render(render.Scene3D([mesh], [camera]))
diff --git a/tests/riley/test_pydemo_parity.py b/tests/riley/test_pydemo_parity.py
index 99f95f0b..d76ee805 100644
--- a/tests/riley/test_pydemo_parity.py
+++ b/tests/riley/test_pydemo_parity.py
@@ -34,51 +34,44 @@
id="quickstart",
),
pytest.param(
- "demo1_sphere200",
+ "demo1_sphere",
"ex1b_riley_sphere200.py",
- "out_riley_py/demo1_sphere200",
+ "out_riley_py/demo1_sphere",
"pyvale-output/render3d_ex1b_riley_sphere200",
- id="sphere200",
+ id="sphere",
),
pytest.param(
- "demo3_rabbits",
+ "demo2a_rabbits_mono",
"ex1c_riley_rabbits.py",
- "out_riley_py/demo3_rabbits",
+ "out_riley_py/demo2a_rabbits_mono",
"pyvale-output/render3d_ex1c_riley_rabbits",
- id="rabbits",
+ id="rabbits-mono",
),
pytest.param(
- "demo6_dicuq",
+ "demo3_dicuq",
"ex1d_riley_dicuq.py",
- "out_riley_py/demo6_dicuq",
+ "out_riley_py/demo3_dicuq",
"pyvale-output/render3d_ex1d_riley_dicuq",
id="dicuq",
),
pytest.param(
- "demo7_dic_from_exodus",
+ "demo3_dicuq_from_exodus",
"ex1e_riley_dic_from_exodus.py",
- "out_riley_py/demo7_dic_from_exodus",
+ "out_riley_py/demo3_dicuq_from_exodus",
"pyvale-output/render3d_ex1e_riley_dic_from_exodus",
id="dicuq-from-exodus",
),
pytest.param(
- "demo8_stereocal",
+ "demo4_stereocal",
"ex1f_riley_stereocal.py",
- "out_riley_py/demo8_stereocal",
+ "out_riley_py/demo4_stereocal",
"pyvale-output/render3d_ex1f_riley_stereocal",
id="stereocal",
),
pytest.param(
- "demo2_psf",
- "ex1g_riley_psf.py",
- "out_riley_py/demo2_psf",
- "pyvale-output/render3d_ex1g_riley_psf",
- id="psf",
- ),
- pytest.param(
- "demo9_feature_zoo",
+ "demo6_featurezoo",
"ex1h_riley_feature_zoo.py",
- "out_riley_py/demo9_feature_zoo",
+ "out_riley_py/demo6_featurezoo",
"pyvale-output/render3d_ex1h_riley_feature_zoo",
id="feature-zoo",
),