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

Support size>length(input) #29

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Support size>length(input) #29

merged 1 commit into from
Mar 7, 2024

Conversation

carstenbauer
Copy link
Member

Currently there is in inconsistency between n and size because the former allows n>length(input) but the latter doesn't. This PR changes this.

With this PR:

julia> chunks(1:10; size=10) |> collect
1-element Vector{StepRange{Int64, Int64}}:
 1:1:10

julia> chunks(1:10; size=100) |> collect
1-element Vector{StepRange{Int64, Int64}}:
 1:1:10

julia> chunks(1:10; size=1000) |> collect
1-element Vector{StepRange{Int64, Int64}}:
 1:1:10

The PR is non-breaking because this error'ed before.

(cc @MasonProtter)

@carstenbauer carstenbauer requested a review from lmiq March 7, 2024 10:57
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.12%. Comparing base (8c7b63c) to head (7edce29).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
+ Coverage   94.14%   95.12%   +0.97%     
==========================================
  Files           2        2              
  Lines         222      205      -17     
==========================================
- Hits          209      195      -14     
+ Misses         13       10       -3     

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

@lmiq lmiq merged commit f65dce0 into main Mar 7, 2024
8 of 14 checks passed
@lmiq
Copy link
Collaborator

lmiq commented Mar 7, 2024

This should be v3.4.0, right?

(tests are failing on 1.11.0-alpha1, but that's not our fault).

@lmiq
Copy link
Collaborator

lmiq commented Mar 7, 2024

I mean, 2.4.0

@carstenbauer
Copy link
Member Author

Yes

@lmiq
Copy link
Collaborator

lmiq commented Mar 7, 2024

released as 2.4.0. Thanks.

@MasonProtter MasonProtter deleted the cb/sizegtlen branch March 7, 2024 12:33
@MasonProtter MasonProtter restored the cb/sizegtlen branch March 7, 2024 12:33
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.

3 participants