Improve code quality and testing coverage#38
Conversation
42154ca to
e336bfa
Compare
- Refactor tests to @testitem/@testmodule with tags for parallel-ready execution - Break down large test files into per-operator @testitem blocks - Refactor subpackages (FFTWOperators, NFFTOperators, DSPOperators, WaveletOperators) to @testitem - Complete JET coverage: all public API in all packages (IDFT, IRDFT, MIMOFilt, Axt_mul_Bx, Ax_mul_Bxt, MyLinOp) - Fix MyLinOp: parameterize function fields with F/G<:Function (eliminates runtime dispatch) - Fix Aqua persistent_tasks: broken=true for infrastructure-constrained environments - Fix import issues in subpackage JET tests (AbstractOperators missing) - 2777 tests pass, 5 broken (infrastructure), 0 failed
e336bfa to
6a5bca5
Compare
6a5bca5 to
f677d84
Compare
f677d84 to
ffecdd5
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #38 +/- ##
==========================================
+ Coverage 87.60% 89.28% +1.67%
==========================================
Files 45 45
Lines 3026 3267 +241
==========================================
+ Hits 2651 2917 +266
+ Misses 375 350 -25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @nantonel and @lostella, this PR is ready to review. It's relatively large, sorry for that, and I especially regret having changed the formatting. On the other hand, if you look at the commits, I think it is mostly straightforward to understand what's changed and why. What do you think of the suggested changes? This PR is primarily preparatory work for my next PR that adds GPU support (coming soon!). Nothing is essential for that from the suggested changes in this PR, so just let me know if you don't like any of them. |
|
@hakkelt thanks, taking a look. Also, thank you for pointing out copilot usage, and wrapping it up with a good summary nevertheless! |
|
@hakkelt maybe one question: any specific reason for splitting operators into different packages, but now moving their tests back together to the root test folder? |
|
|
||
| [targets] | ||
| test = ["Aqua", "Random", "RecursiveArrayTools", "Test"] | ||
| test = ["Aqua", "JET", "Random", "RecursiveArrayTools", "Test", "TestItemRunner", "TestItems"] |
There was a problem hiding this comment.
Are these needed in this package?
There was a problem hiding this comment.
No, they are no longer needed, thanks! I removed them.
Oh, yes, that's a solution for a problem I spent quite some time with. So the problem was the shared Therefore, I could choose from the following options:
Maybe I could extend the "Custom Operators" page in the documentation with a "Subpackages" section that explains why one would want to create a subpackage and how to test subpackages. |
348c244 to
1f99e1d
Compare
1f99e1d to
57562d0
Compare
|
Well, that was strange: I pushed a single commit that removed the stale test dependencies from WaveletOperators (b34ee83), and then many JET tests failed. My guess is that the latest JET version was previously blocked, an older version was used by the tests, and the latest version is stricter. I don't think it is related to the changes in WaveletOperators' Project.toml, but it is rather caused by an independent event (e.g., one of the dependencies got a new version that no longer blocks the latest JET version). Anyway, I fixed the failures. Some of them were real correctness issues (the test coverage still has room for improvement...), others were type instability issues. @lostella: Just let me know if you like any changes to this PR or if further explanation would be helpful. |
|
@hakkelt looks good! Feel free to merge |
|
Great, thanks for the review! |
|
@lostella: Actually, one more question: Is "squash and merge" a good strategy for this PR? It touches almost all files with over 8000 lines changed... |
|
@hakkelt I don’t know, what could the problem with squashing be? The alternative is (I guess) to just enforce rebase-and-merge, assuming the commits are meaningful |
|
@hakkelt enabled rebase-and-merge |
|
Thanks. For large PRs, like this one, rebase-and-merge is better. |
This PR enhances code quality through formatting and refactoring:
mul!functions and added calls tocheckfunction fromsrc/utils.jlinstead to enforce constraints. This function checks storage type (e.g throws error for GPU arrays), element type, and shape of both input and output. For example,becomes
Test Items Framework has the following advantages over the standard Test package:
I used GitHub Copilot heavily, so I also added agent instructions and skill files that helped with the work.