Repository navigation
Shorten two slow tests without changing the coverage - #1193
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1193 +/- ##
=======================================
Coverage 98.61% 98.61%
=======================================
Files 225 225
Lines 9376 9376
=======================================
Hits 9246 9246
Misses 130 130 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
`test_optimize` fitted the models of Alexander and of Miehe, Göktepe and Lulei, which took about 5 s each (Alexander's model stopped at the maximum number of evaluations without convergence). The fits with relative residuals use the model of Ogden instead, i.e. the array-valued material parameters are also fitted with relative residuals. The test takes about 2 s instead of 10 s. The example of `AnimationWriterPlugin` writes 5 instead of 11 frames, the rendering of a frame takes most of its time. The covered lines of the whole test suite are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adtzlr
force-pushed
the
tests-cheaper-optimize
branch
from
October 14, 2026 15:01
902531e to
c3ad085
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third PR of the series to speed up the tests (after #1191 and #1192). Two of the slowest items of the test suite cover no line which is not covered by other tests (checked by the coverage contexts of each test).
Changes
test_optimizeAnimationWriterPlugintest_optimize: most of the time was spent in two fits. The model of Alexander stopped at the maximum number of function evaluations without convergence (500 evaluations, 4.6 s) and the model of Miehe, Göktepe and Lulei needed 429 evaluations (4.9 s). Alexander is removed from the fits with absolute residuals. Miehe, Göktepe and Lulei is replaced by Ogden in the fits with relative residuals, i.e. the array-valued material parameters (mu,alpha) are now also fitted with relative residuals (0.4 s). Each fit takes less than a second.AnimationWriterPlugin: the rendering of a frame takes about 0.8 s. The example writes 5 instead of 11 frames (linsteps([0, 1, 0], num=2)instead ofnum=5).The covered lines of the whole test suite are unchanged (130 missed lines of 9386, the same lines before and after). ruff OK.
No change of the package.
🤖 Generated with Claude Code
Generated by Claude Code