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

Add several updates for bitrot and QA improvements #31

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

jlapeyre
Copy link
Collaborator

@jlapeyre jlapeyre commented Oct 1, 2024

Updates for bitrot, add many tests, QA, and CI improvements

  • Try to fix badge links in README
  • Update CompatHelper.yml
  • Update Aqua test for newer Aqua API
  • Fix Aqua complaints in Project.toml
  • Restrict some input types to Integer
    These are always integers anyway
  • Fix JET complaint
    Seems to have a problem with log(::Complex) in general. Looks
    like a bug, if so. We don't really fix it, but rather skip it.
  • Don't test nightly on CI because it's broke with JET
  • Remove non-API function for input z == MathConstant.e
    The removed function has an underscore prefix and is not called at all by the
    API function lambertw.
    This non-API function returns 1::Int, which makes no sense. If you convert z to Float64,
    then 1.0::Float64 is returned, which is just as much exactly one as 1::Int.
    The API function intercepts the input ::MathConstant.e and converts it to float
  • Improve doc strings
    lambertw was is outdated
    Function for branchpoint is better documented.
  • Remove special case for argument ::AbstractIrrational
    I don't see that this code path was called by the API in any case.
    But curiously, codecov showed that this line was in fact covered by the test suite.
    The test suite in fact still passes, as expected, with this line removed.
  • Remove another obsolete code path for special inputs
  • Integers and Rationals are converted to floats at the API entry point.
    The removed non-API functions would add nothing if they were called. In any case, they are not.
  • Part of the code path for abs(z::Complex) <= one_t/convert(T, MathConstants.e) was not tested before.
    This commit adds a test
  • Add tests for uncovered code paths
  • Some paths for complex arguments were not tested. This adds tests
  • A redundant logic test was removed from code in one of these paths.
  • Test inverse functions
    I used finv(lambertw), but it was not tested. I tried promoting the
    idea, but didn't push hard and got no comments. There is now a package
    implementing this idea.
    In any case, this adds a test for the existing, unexported, function.
  • Remove unnecessary type parameter in signature
  • Simplify function signature
    I may have argued that the complicated one was slightly more performant.
    If it is, it is not significant.
  • Remove unused loop variable
  • Add tests for complex args to hit paths in branch point expansion
  • Remove unneccesary use of local
  • Remove another unused, and in any case, unneccesary code path
  • Test string(Omega())
  • Update codecov action
  • Remove commented out cruft
  • Rename unused loop var to underscore

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.39%. Comparing base (6b6e2c8) to head (f5f5645).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
+ Coverage   92.02%   99.39%   +7.36%     
==========================================
  Files           1        1              
  Lines         188      164      -24     
==========================================
- Hits          173      163      -10     
+ Misses         15        1      -14     

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

* Try to fix badge links in README
* Update CompatHelper.yml
* Update Aqua test for newer Aqua API
* Fix Aqua complaints in Project.toml
* Restrict some input types to `Integer`
  These are always integers anyway
* Fix JET complaint
  Seems to have a problem with `log(::Complex)` in general. Looks
  like a bug, if so. We don't really fix it, but rather skip it.
* Don't test nightly on CI because it's broke with JET
* Remove non-API function for input `z == MathConstant.e`
  The removed function has an underscore prefix and is not called at all by the
  API function `lambertw`.
  This non-API function returns 1::Int, which makes no sense. If you convert `z` to `Float64`,
  then `1.0::Float64` is returned, which is just as much exactly one as `1::Int`.
  The API function intercepts the input ::MathConstant.e and converts it to float
* Improve doc strings
  lambertw was is outdated
  Function for branchpoint is better documented.
* Remove special case for argument ::AbstractIrrational
  I don't see that this code path was called by the API in any case.
  But curiously, codecov showed that this line was in fact covered by the test suite.
  The test suite in fact still passes, as expected, with this line removed.
* Remove another obsolete code path for special inputs
* Integers and Rationals are converted to floats at the API entry point.
  The removed non-API functions would add nothing if they were called. In any case, they are not.
* Part of the code path for `abs(z::Complex) <= one_t/convert(T, MathConstants.e)` was not tested before.
  This commit adds a test
* Add tests for uncovered code paths
* Some paths for complex arguments were not tested. This adds tests
* A redundant logic test was removed from code in one of these paths.
* Test inverse functions
  I used `finv(lambertw)`, but it was not tested. I tried promoting the
  idea, but didn't push hard and got no comments. There is now a package
  implementing this idea.
  In any case, this adds a test for the existing, unexported, function.
* Remove unnecessary type parameter in signature
* Simplify function signature
  I may have argued that the complicated one was slightly more performant.
  If it is, it is not significant.
* Remove unused loop variable
* Add tests for complex args to hit paths in branch point expansion
* Remove unneccesary use of `local`
* Remove another unused, and in any case, unneccesary code path
* Test string(Omega())
* Update codecov action
* Remove commented out cruft
* Rename unused loop var to underscore
@jlapeyre jlapeyre merged commit b82574a into master Oct 2, 2024
11 checks passed
@jlapeyre jlapeyre deleted the updates-and-tests branch October 2, 2024 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant