-
Notifications
You must be signed in to change notification settings - Fork 5
More unit test improvements #73
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #73 +/- ##
==========================================
+ Coverage 83.85% 90.93% +7.08%
==========================================
Files 7 7
Lines 353 353
==========================================
+ Hits 296 321 +25
+ Misses 57 32 -25 ☔ View full report in Codecov by Sentry. |
@JoshuaLampert do you have time for a review? |
Not right now, but tomorrow I should find a couple of minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good to me. I left some minor comments and questions below.
I see a lot of commits in the PR, which indicates to me that you don't run the tests locally (?). While that's of course totally fine, it might still be more convenient and probably faster to run the tests during development locally, such that CI doesn't need to be triggered each time again to get some response. To make this more convenient we could think about integrating tests with TestItems.jl and TestItemRunner.jl, which can be used to run only certain test items locally individually without needing to run the whole test workflow (this assumes you develop within VSCode). This makes the development of tests much easier and faster. Meshes.jl integrated this recently and I also played around with it recently. I really like the workflow and can recommend it. If you agree that this is also worth implementing in MeshIntegrals.jl, I can also set up a PR for that. Now that I finished writing this, I just saw you also mention TestItems.jl in #67 😅
Co-authored-by: Joshua Lampert <[email protected]>
Co-authored-by: Joshua Lampert <[email protected]>
I try not to dev this way, but I've been away from my workstation a lot lately and had to push these commits from GitHub's browser file editor 😅.
I'm definitely interested in implementing TestItems.jl soon but was planning to get all of the tests updated first. At some point earlier this year I came up with a scheme for trying to generate One of the things I am conflicted about conceptually, though, is how to manage true test coverage this way. For example, pretty much any individual call of the form |
I've noticed periodic issues where the macOS CI alone will error and it's usually something odd not related to the actual package, so I was about to re-run the failing test, but I noticed that this one has a really odd error being thrown seemingly out of Meshes. This function (inside another function in which at this line in Meshes.jl for some reason generates an error trying to convert to an Edit: just pinged Julio on Zulip |
I've seen this error already before in a completely different context here (also only on Mac): |
I see, but I think having TestItems.jl running might make the development of the new tests more convenient. Thus, I would think implementing TestItems.jl first and updating the remaining tests after that might be worth considering (assuming, of course, that you use your workstation in future PRs again because otherwise TestItems.jl doesn't make anything more convenient 😅). |
Interesting. I wonder if this is some obscure bug in Base. Looks like your example triggers here. |
That was just the order-of-events I was planning to work personally. If you're up for implementing TestItems once this PR is merged, I'm all for it. |
I think all reviews have now been addressed. Let me know if I'm missing anything. |
Yes, might be. |
LGTM! |
* Add new tests for Segment * Bump patch version * Add test verbose and showtimings * Complete TODO action * Add tests for alternate FP types * Fix typo and add more alt FP test coverage * Fix typo * Bugfix * Bugfix - missing N for Gauss-Legendre rules * Bugfix - missing unit exponents * Mark type tests broken, named f32, increase GL rule N * Fix typo * Reduce N for GL rules, add looser atol's for F32 results * Tweak tolerances * Split tests into new set [skip ci] * Implement new tests for Rope * Bugfix * Math correction * Add new tests for Ring * Bugfixes * Bugfix * Remove Ring from old tests * Bugfix * Reorganize alt FP tests * Fix atol value, abstract testset with a loop * Remove unnecessary begin * Abstract FP type, split aliases into separate set * Update types * Add BigFloat tests * Conditional broken statement * Enhance integral docstring, add sub-FP64 warning * Improved argument explanation * Drop an explicit showtimings * Remove redundant showtimings * Add a type-dependent atol * Add note about BigFloat --------- Co-authored-by: Joshua Lampert <[email protected]>
Complete
Ring
,Rope
,Segment
FP
isFloat32
orBigFloat
, discovered issues leading to:Float32
(loosened testatol
parameter)Float32
results are promoted toFloat64
FP
not working forFloat32
#74Future Work (Other PR's)
FP
should be akwarg
, i.e.integral(f, geometry, settings; FP=BigFloat)