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

Unify error= keyword #170

Merged
merged 11 commits into from
Oct 21, 2023
Merged

Unify error= keyword #170

merged 11 commits into from
Oct 21, 2023

Conversation

kellertuer
Copy link
Member

@kellertuer kellertuer commented Oct 13, 2023

This resolves #135.

@kellertuer
Copy link
Member Author

But there seem to be a few dispatches through the decorators that are quite tricky still.

@kellertuer
Copy link
Member Author

kellertuer commented Oct 13, 2023

One thing missing as well is that :info and :warn were previously only used on DomainErrors, now that they here also end up being used for ManifoldDomainErrors, the string generation fails. This I have to take a look at what best to do.

edit: For now there is a fix, but still info/warn basically only work for ErrorExceptions that have a val and a msg field. This could be improved.

@kellertuer kellertuer added Ready-for-Review A label for pull requests that are feature-ready breaking labels Oct 13, 2023
@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #170 (4704c8a) into master (2d1ac2b) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #170      +/-   ##
==========================================
- Coverage   99.96%   99.96%   -0.01%     
==========================================
  Files          26       26              
  Lines        3065     3063       -2     
==========================================
- Hits         3064     3062       -2     
  Misses          1        1              
Files Coverage Δ
src/ManifoldsBase.jl 99.58% <100.00%> (-0.42%) ⬇️
src/ValidationManifold.jl 100.00% <100.00%> (ø)
src/decorator_trait.jl 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@kellertuer
Copy link
Member Author

kellertuer commented Oct 13, 2023

In principle this PR is finished – Docs are updated, even the tutorial (but the push to Documenter 1.0 comes from another PR, the tutorial is updated here already)

@kellertuer kellertuer added this to the 0.15.0 milestone Oct 13, 2023
# Conflicts:
#	NEWS.md
#	docs/Project.toml
#	tutorials/Project.toml
@kellertuer
Copy link
Member Author

I just had to adapt 2 tests from the other PRs, merged the NEWS – there we only have to enter the date when we merge/register 0.15

Co-authored-by: Mateusz Baran <[email protected]>
@mateuszbaran
Copy link
Member

Do we adapt tests like @test_throws DomainError is_vector(M, q, YN, true) to @test_throws DomainError is_vector(M, q, YN; error=:error) or something else?

@kellertuer
Copy link
Member Author

Yes. I wrote that in detail in the NEWS.md, to unify all signatures I had to switch 2 positionals.

@mateuszbaran
Copy link
Member

I see, sorry -- I forgot to read NEWS.md.

@mateuszbaran
Copy link
Member

The CI issue is really werid...

@kellertuer
Copy link
Member Author

Yes. It worked on the comment before so maybe let's wait a bit or check whether they did something to that package? (I am on mobile currently).

@mateuszbaran
Copy link
Member

I've tried tracking it and I suspect JuliaRegistries/General#93498 is the issue.

@mateuszbaran
Copy link
Member

I've mostly updated Manifolds.jl. Could you take a look why a wrong exception type is throws in centered_matrices.jl, fixed_rank.jl and probability_simplex.jl?

@kellertuer
Copy link
Member Author

Not today, maybe tomorrow before my lecture, otherwise only early evening (travelling to Oslo in the afternoon)

@mateuszbaran
Copy link
Member

No problem, it can wait.

@kellertuer
Copy link
Member Author

I checked them and adapted the tests – indeed they now show “X error caused by Y error” which even looks nicer than the ManifoldDomainErrors (that we still have in other places where they fit better).

@mateuszbaran
Copy link
Member

Thanks!

@mateuszbaran mateuszbaran merged commit 3fbf075 into master Oct 21, 2023
13 of 14 checks passed
@kellertuer kellertuer deleted the kellertuer/unify-error-args branch November 25, 2023 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Ready-for-Review A label for pull requests that are feature-ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change function signature of is_ functions to be consistent with isapprox.
2 participants