JuliaDiff / ChainRulesTestUtils.jl

Utilities for testing custom AD primitives.
MIT License
50 stars 15 forks source link

Allow editing the testset name #273

Closed theogf closed 1 year ago

theogf commented 1 year ago

Solves #272

Add a keyword argument "testset_name" to test_scalar, test_frule and test_rrule to allow replacing the default name. It still stays an opt-in option and is mostly useful when f is anonymous and its naming is too large to be displayed correctly.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 57.14% and project coverage change: +0.14 :tada:

Comparison is base (6925da1) 93.51% compared to head (ca519c6) 93.65%.

:exclamation: Current head ca519c6 differs from pull request most recent head 2fd4943. Consider uploading reports for the commit 2fd4943 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #273 +/- ## ========================================== + Coverage 93.51% 93.65% +0.14% ========================================== Files 12 12 Lines 339 347 +8 ========================================== + Hits 317 325 +8 Misses 22 22 ``` | [Impacted Files](https://codecov.io/gh/JuliaDiff/ChainRulesTestUtils.jl/pull/273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff) | Coverage Δ | | |---|---|---| | [src/testers.jl](https://codecov.io/gh/JuliaDiff/ChainRulesTestUtils.jl/pull/273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL3Rlc3RlcnMuamw=) | `91.50% <57.14%> (+0.24%)` | :arrow_up: | | [src/output\_control.jl](https://codecov.io/gh/JuliaDiff/ChainRulesTestUtils.jl/pull/273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL291dHB1dF9jb250cm9sLmps) | `100.00% <0.00%> (ø)` | | | [src/ChainRulesTestUtils.jl](https://codecov.io/gh/JuliaDiff/ChainRulesTestUtils.jl/pull/273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL0NoYWluUnVsZXNUZXN0VXRpbHMuamw=) | `100.00% <0.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

gaurav-arya commented 1 year ago

Is this package meant to work on Julia 1.0? If so I think the isnothing check needs compat handling, see the broken tests on AbstractFFTs.jl

gaurav-arya commented 1 year ago

@devmotion is way ahead of me:)