Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardization of combinations tests #151

Merged
merged 50 commits into from
Dec 8, 2024
Merged

Standardization of combinations tests #151

merged 50 commits into from
Dec 8, 2024

Conversation

mikeingold
Copy link
Collaborator

@mikeingold mikeingold commented Dec 4, 2024

Changes

  • Standardized combinations tests by wrapping testable items in a data structure and passing them to a test suite.
    • Reduces boilerplate and subtle variations between @testitems.
    • Added Unitful integrands to several tests that were using simple scalars.
    • Added commented-out test infrastructure for upcoming AutoEnzyme in add AD (Enzyme) support via EnzymeExt #129.
    • Re-organized to have @testsnippets hosted in the source file where they're used.

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (301bcff) to head (9c05943).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #151   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines          165       165           
=========================================
  Hits           165       165           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Dec 4, 2024

Benchmark Results

main 9c05943... main/9c05943dee1c4b...
Differentials/Differential 0.24 ± 0.0011 μs 0.24 ± 0.0011 μs 1
Differentials/Jacobian 0.205 ± 0.001 μs 0.205 ± 0.0001 μs 1
Integrals/Segment/Scalar GaussKronrod 1.2 ± 0.0081 μs 1.21 ± 0.006 μs 0.994
Integrals/Segment/Scalar GaussLegendre 4.12 ± 0.01 μs 4.11 ± 0.0086 μs 1
Integrals/Segment/Scalar HAdaptiveCubature 1.45 ± 0.15 μs 1.45 ± 0.16 μs 0.999
Integrals/Segment/Vector GaussKronrod 3.39 ± 0.051 μs 3.43 ± 0.058 μs 0.988
Integrals/Segment/Vector GaussLegendre 19.7 ± 0.4 μs 19.9 ± 0.43 μs 0.992
Integrals/Segment/Vector HAdaptiveCubature 4.21 ± 0.072 μs 4.38 ± 0.081 μs 0.963
Integrals/Sphere/Scalar GaussKronrod 0.0816 ± 0.00091 ms 0.0816 ± 0.00093 ms 1
Integrals/Sphere/Scalar GaussLegendre 2.26 ± 0.0096 ms 2.25 ± 0.01 ms 1
Integrals/Sphere/Scalar HAdaptiveCubature 0.0578 ± 0.00017 ms 0.0578 ± 0.00017 ms 1
Integrals/Sphere/Vector GaussKronrod 0.115 ± 0.00078 ms 0.115 ± 0.00084 ms 1
Integrals/Sphere/Vector GaussLegendre 3.61 ± 0.064 ms 3.6 ± 0.058 ms 1
Integrals/Sphere/Vector HAdaptiveCubature 0.108 ± 0.0011 ms 0.108 ± 0.0011 ms 1
Rules/GaussLegendre 21.4 ± 0.71 μs 21.4 ± 0.71 μs 0.999
Specializations/Scalar GaussLegendre/BezierCurve 0.245 ± 0.0017 ms 0.247 ± 0.00038 ms 0.993
Specializations/Scalar GaussLegendre/Line 8.47 ± 0.14 μs 8.52 ± 0.14 μs 0.994
Specializations/Scalar GaussLegendre/Plane 0.895 ± 0.0078 ms 0.895 ± 0.008 ms 1
Specializations/Scalar GaussLegendre/Ray 7.38 ± 0.058 μs 7.4 ± 0.043 μs 0.997
Specializations/Scalar GaussLegendre/Rope 0.129 ± 0.00026 ms 0.13 ± 0.00044 ms 0.992
Specializations/Scalar GaussLegendre/Tetrahedron 0.279 ± 0.00095 s 0.279 ± 0.0011 s 1
Specializations/Scalar GaussLegendre/Triangle 0.73 ± 0.0042 ms 0.73 ± 0.0037 ms 1
time_to_load 1.48 ± 0.0035 s 1.5 ± 0.012 s 0.985

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

@mikeingold mikeingold changed the title WIP: Test system overhaul Unification of combinations tests Dec 6, 2024
@mikeingold mikeingold changed the title Unification of combinations tests Standardization of combinations tests Dec 6, 2024
@mikeingold mikeingold marked this pull request as ready for review December 6, 2024 16:34
test/combinations.jl Outdated Show resolved Hide resolved
test/combinations.jl Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Member

@JoshuaLampert JoshuaLampert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! This looks really nice. I left some suggestions below, but this is on a good way.

test/combinations.jl Outdated Show resolved Hide resolved
test/combinations.jl Outdated Show resolved Hide resolved
test/combinations.jl Outdated Show resolved Hide resolved
test/combinations.jl Show resolved Hide resolved
test/combinations.jl Outdated Show resolved Hide resolved
Copy link
Member

@JoshuaLampert JoshuaLampert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

test/combinations.jl Show resolved Hide resolved
@mikeingold mikeingold merged commit c7c0a47 into main Dec 8, 2024
12 checks passed
@mikeingold mikeingold deleted the tests branch December 8, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants