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

added ITF1788 tests #505

Merged
merged 2 commits into from
Feb 7, 2022
Merged

added ITF1788 tests #505

merged 2 commits into from
Feb 7, 2022

Conversation

lucaferranti
Copy link
Member

@lbenet , we met today with @Kolaru and agreed on some first step to get things going. This PR adds *all the ITF1788 tests, including the currently failing ones, which are marked as broken. This way we can keep track of what is currently working, what isn't and avoid regression while gradually adding #271

Kolaru will then strip 271 of everthing that is breaking or "controversial" so that the PR effectively restructures the package and can be easily merged. Next we can discuss what is to discuss and keep working through smaller independent PRs.

Regarding this PR:

  • it adds all ITF1788 tests, including the ones for reverse functions. IntervalContractors is added as test target, whether merging it to IA or not is left for further discussion
  • As suggested today by Kolaru, it uses @test_broken instead of @test_skip, as it makes it easier to see what has been fixed as one fixes tests
  • for the moment, it ignores warning issues. Errors caused by warnings were very few, so let us worry about those later.
  • some tests in libieeep1788_class.jl still use @test_skip because the code was failing to parse some strings

Btw, I also enabled wikis in the repository and created this one to track discussions and meetings etc. I think it's better to have long discussions and meeting minutes there, but let's see how it goes. If you don't like it, I can remove it.

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2022

Codecov Report

Merging #505 (159b0b6) into master (db9202c) will decrease coverage by 0.83%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #505      +/-   ##
==========================================
- Coverage   90.94%   90.10%   -0.84%     
==========================================
  Files          25       25              
  Lines        1789     1789              
==========================================
- Hits         1627     1612      -15     
- Misses        162      177      +15     
Impacted Files Coverage Δ
src/decorations/intervals.jl 74.46% <0.00%> (-10.64%) ⬇️
src/decorations/functions.jl 83.81% <0.00%> (-9.83%) ⬇️
src/intervals/rounding.jl 70.40% <0.00%> (-1.03%) ⬇️
src/intervals/functions.jl 96.06% <0.00%> (+4.49%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db9202c...159b0b6. Read the comment docs.

@lbenet
Copy link
Member

lbenet commented Jan 26, 2022

Regarding this PR:

  • it adds all ITF1788 tests, including the ones for reverse functions. IntervalContractors is added as test target, whether merging it to IA or not is left for further discussion

I find this as a very clever solution!

  • As suggested today by Kolaru, it uses @test_broken instead of @test_skip, as it makes it easier to see what has been fixed as one fixes tests

Good point!

  • for the moment, it ignores warning issues. Errors caused by warnings were very few, so let us worry about those later.

OK

  • some tests in libieeep1788_class.jl still use @test_skip because the code was failing to parse some strings

OK

@lucaferranti I'll try to review this PR in detail this afternoon... busy morning...

Copy link
Member

@lbenet lbenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left some comments, some of them for future development. The main message is: let's get JuliaIntervals/IntervalContractors.jl#48 merged, and then merge this one, after updating the rev tests.

test/test_ITF1788/fi_lib.jl Show resolved Hide resolved
test/test_ITF1788/fi_lib.jl Show resolved Hide resolved
test/test_ITF1788/ieee1788-exceptions.jl Show resolved Hide resolved
test/test_ITF1788/libieeep1788_mul_rev.jl Show resolved Hide resolved
test/test_ITF1788/libieeep1788_reduction.jl Show resolved Hide resolved
test/test_ITF1788/libieeep1788_rev.jl Show resolved Hide resolved
test/test_ITF1788/pow_rev.jl Show resolved Hide resolved
@@ -0,0 +1,162 @@
@testset "minimal_overlap_test" begin

@test_broken MISSING_overlap(emptyinterval(), emptyinterval()) === bothEmpty
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For #504, I'm coding the overlap function; my idea is to return a Symbol, such as :both_empty or :before. Does it make sense to change this file accordingly? (Sorry for the late request.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See bb4d665 in #504.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. I can change it, an alternative would be to implement the overlap states with @enum. Not sure which one is better 🤔

Btw, since the overlap is fairly independent by the rest of the work, I think it would make more sense to have it as a stand-alone PR to master, maybe continuing from #266 .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know about #266, and it LGTM. There are minor differences with respect to bb4d665 though, the major being that it returns Strings instead of a Symbol; I would favor the second one. (Your proposal with @enum may be even better, for performance if overlap is used in the actual code.)

If you think #266 is worth merging, go ahead; #271 (and $504) will have to incorporate it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look at #266 tomorrow or on Tuesday. If you think it's a nice idea I could try to build on top of that with @enum (if you haven't done it already)

@lucaferranti
Copy link
Member Author

lucaferranti commented Feb 6, 2022

@lbenet I've updated this PR with the updated tests for reverse functions. Let me know if you have other comments. I have also ported your comments about acot/acoth/accurate dot product to #465, so that we don't forget about them after this is merged

Copy link
Member

@lbenet lbenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks a lot!

@Kolaru
Copy link
Collaborator

Kolaru commented Feb 7, 2022

Everything looks good to me.

One remark: would it be feasible to add ITF1788.jl as test target too and just run the tests from this package without having to copy the files over here?

@lucaferranti
Copy link
Member Author

One remark: would it be feasible to add ITF1788.jl as test target too and just run the tests from this package without having to copy the files over here?

so far I've generated the tests directly into IA once I've fixed something, so that I don't have to copy paste. Some better automation might be cool but generating the tests on the PR could be a little heavy? Anyways, better documentation in ITF1788.jl is for sure needed, I'll update that tomorrow :D

@lucaferranti lucaferranti merged commit 96b9941 into master Feb 7, 2022
@lucaferranti lucaferranti deleted the lf-itf1788 branch February 7, 2022 20:35
@Kolaru
Copy link
Collaborator

Kolaru commented Feb 7, 2022

What I was thinking is that it feels like that kind of change would be better examinated by looking at the change in the generator. So it may make more sense to discuss them in ITF1788.jl and just consider here that we trust our beloved dependency ^^'

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.

4 participants