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

Implement interval rounding #147

Merged
merged 10 commits into from
Oct 16, 2020
Merged

Implement interval rounding #147

merged 10 commits into from
Oct 16, 2020

Conversation

nicoleepp
Copy link
Contributor

@nicoleepp nicoleepp commented Oct 9, 2020

Supersedes #65

Closes #146

Still needs documentation additions but should be ready for initial review
Now has documentation

@nicoleepp nicoleepp requested a review from omus as a code owner October 9, 2020 18:00
test/interval.jl Outdated
@test_throws UndefKeywordError ceil(Interval(0.0, 1.0))

@test ceil(Interval(0.0, 1.0), on=LeftEndpoint) == Interval(0.0, 1.0)
@test ceil(Interval(0.5, 1.0), on=LeftEndpoint) == Interval(1.0, 1.5)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure on is the right keyword as it makes me think only the left would be changed. I'll think about a better name

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thinking about it more I think this is just my personal bias and on is probably correct

test/interval.jl Outdated Show resolved Hide resolved
src/interval.jl Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 9, 2020

Codecov Report

Merging #147 into master will increase coverage by 0.78%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
+ Coverage   75.76%   76.55%   +0.78%     
==========================================
  Files          11       11              
  Lines         491      516      +25     
==========================================
+ Hits          372      395      +23     
- Misses        119      121       +2     
Impacted Files Coverage Δ
src/endpoint.jl 94.59% <ø> (ø)
src/anchoredinterval.jl 96.59% <100.00%> (+0.53%) ⬆️
src/interval.jl 94.15% <100.00%> (-0.79%) ⬇️

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 c37cbb7...cfc2c13. Read the comment docs.

src/Intervals.jl Outdated Show resolved Hide resolved
src/interval.jl Show resolved Hide resolved
test/interval.jl Outdated
@test_throws UndefKeywordError ceil(Interval(0.0, 1.0))

@test ceil(Interval(0.0, 1.0), on=LeftEndpoint) == Interval(0.0, 1.0)
@test ceil(Interval(0.5, 1.0), on=LeftEndpoint) == Interval(1.0, 1.5)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thinking about it more I think this is just my personal bias and on is probably correct

Copy link
Member

@fchorney fchorney left a comment

Choose a reason for hiding this comment

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

This looks good to me.

Copy link
Member

@morris25 morris25 left a comment

Choose a reason for hiding this comment

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

LGTM

src/endpoint.jl Outdated Show resolved Hide resolved
Copy link
Member

@mattBrzezinski mattBrzezinski left a comment

Choose a reason for hiding this comment

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

LGTM, just had one question which might lead to a change.

test/interval.jl Outdated Show resolved Hide resolved
Copy link
Collaborator

@omus omus left a comment

Choose a reason for hiding this comment

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

Looks good. I think there could be some further iteration on the implementation but I'm good to proceed


See also: [`LeftEndpoint`](@ref)
"""
const RightEndpoint{T,B} = Endpoint{T, Right, B} where {T,B <: Bound}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wouldn't mind the docstrings being in a set PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nicoleepp nicoleepp merged commit 168565e into master Oct 16, 2020
@nicoleepp nicoleepp deleted the ne/rounding branch October 16, 2020 20:32
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.

Implement rounding for intervals
5 participants