Tidy up engine tests #72

Merged
glen merged 2 commits from Vectornaut/dyna3:engine-test-cleanup into main 2025-03-12 21:54:57 +00:00
Member

The branch to be merged does the remaining tasks from issue #64, which are listed below.

zero_loss_test

  • Drop the redundant type hint in the definition of a.

tangent_test_three_spheres

  • Get the dimension from the expected basis, rather than putting it in by hand.

tangent_test_kaleidocycle

  • Factor out the realization code, in the same style as realize_irisawa_hexlet.
  • Rename the irisawa submodule to examples.

frozen_entry_test

  • Move up into the section for simpler tests, between zero_loss_test and irisawa_hexlet_test.
The branch to be merged does the remaining tasks from issue #64, which are listed below. ### `zero_loss_test` - Drop the redundant type hint in the definition of `a`. ### `tangent_test_three_spheres` - Get the dimension from the expected basis, rather than putting it in by hand. ### `tangent_test_kaleidocycle` - Factor out the realization code, in the same style as `realize_irisawa_hexlet`. - Rename the `irisawa` submodule to `examples`. ### `frozen_entry_test` - Move up into the section for simpler tests, between `zero_loss_test` and `irisawa_hexlet_test`.
Vectornaut added 2 commits 2025-03-11 08:04:30 +00:00
The other tidying is:
- Dropping a redundant type hint.
- Finding an expected dimension instead of hard-coding it.
This parallels what we did for the Irisawa hexlet realization. The
kaleidocycle tangent test comes out slightly weaker, because we no
longer confirm that the realized configuration matches the initial
guess. However, we still confirm that the configuration history only has
one entry, which is equivalent as long as the configuration history
starts with the initial guess and is updated after every optimization
step.
glen approved these changes 2025-03-12 21:52:54 +00:00
glen left a comment
Owner

Refactoring looks reasonably straightforward; cargo test succeeds; trunk build and trunk serve succeed; ./run-examples succeeds. Merging.

Refactoring looks reasonably straightforward; `cargo test` succeeds; `trunk build` and `trunk serve` succeed; `./run-examples` succeeds. Merging.
glen merged commit 2c4fd39c1f into main 2025-03-12 21:54:57 +00:00
glen referenced this pull request from a commit 2025-03-12 21:54:58 +00:00
Author
Member

Awesome! By the way, I'm pretty sure trunk serve calls trunk build, so there's no need to call the latter separately. The continuous integration system calls only calls trunk build because I can't think of any additional problems that could be detected by trying to start the server afterward.

Awesome! By the way, I'm pretty sure `trunk serve` calls `trunk build`, so there's no need to call the latter separately. The continuous integration system calls only calls `trunk build` because I can't think of any additional problems that could be detected by trying to start the server afterward.
Sign in to join this conversation.
No description provided.