From 689feb2223dc51aae8b39ab0e49cb6eb77ba4fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Eertmans?= Date: Tue, 14 May 2024 15:35:25 +0200 Subject: [PATCH] fix(tests): :-( --- .github/workflows/coverage.yml | 3 ++- .github/workflows/test.yml | 2 ++ differt2d/geometry.py | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 3087cd0..1d2823c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,15 +13,16 @@ jobs: - name: Setup Rye if: matrix.os != 'windows-latest' env: + RYE_TOOLCHAIN_VERSION: '3.11' RYE_INSTALL_OPTION: --yes run: | curl -sSf https://rye-up.com/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH - name: Configure Rye - shell: bash run: | rye config --set-bool behavior.use-uv=true + rye pin '3.11' - name: Install Differt2D run: rye sync diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9de6c7f..28b4944 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,6 +47,7 @@ jobs: - name: Setup Rye env: + RYE_TOOLCHAIN_VERSION: '3.11' RYE_INSTALL_OPTION: --yes run: | curl -sSf https://rye-up.com/get | bash @@ -55,6 +56,7 @@ jobs: - name: Configure Rye run: | rye config --set-bool behavior.use-uv=true + rye pin '3.11' - name: Install Differt2D run: rye sync diff --git a/differt2d/geometry.py b/differt2d/geometry.py index 22fd3dc..47a12b0 100644 --- a/differt2d/geometry.py +++ b/differt2d/geometry.py @@ -526,7 +526,7 @@ class RIS(Wall, eqx.Module): with respect to its normal, regardless of the incident vector. """ - phi: Float[Array, " "] = jnp.array(jnp.pi / 4) + phi: Float[Array, " "] = eqx.field(default_factory=jnp.array(jnp.pi / 4)) """The constant angle of reflection.""" @jax.jit @@ -664,7 +664,7 @@ def on_objects( return contains @partial(jax.jit, inline=True, static_argnames=("approx", "function")) - @jaxtyped(typechecker=typechecker) + @jaxtyped(typechecker=None) def intersects_with_objects( self, objects: Sequence[Interactable], @@ -689,7 +689,7 @@ def intersects_with_objects( :return: Whether this path intersects any of the objects, (). """ interacting_object_indices = [-1] + [i for i in path_candidate] + [-1] - intersects = false_value(approx=approx) + intersects = false_value(approx=approx) # TODO(fixme): wtf this is a NumPy array? for i in range(self.points.shape[0] - 1): ray_path = self.points[i : i + 2, :]