Skip to content

Commit

Permalink
fix(tests): :-(
Browse files Browse the repository at this point in the history
  • Loading branch information
jeertmans committed May 14, 2024
1 parent 3e6ea03 commit 689feb2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions differt2d/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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],
Expand All @@ -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, :]
Expand Down

0 comments on commit 689feb2

Please sign in to comment.