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

Update code as per Julia's community guidelines #590

Merged
merged 25 commits into from
Mar 30, 2020

Conversation

eulerkochy
Copy link
Member

@eulerkochy eulerkochy commented Mar 7, 2020

Multiline functions should use return for returning values.
PR is trivial enough.
I'll go through each of the files and try to spot if some part of the code violates standard. Gonna take a while. Bare through that period.

List of checked files.

  • src/heaps
  • robin_dict.jl

Multiline functions should use `return` for values.
PR is trivial enough.
@codecov
Copy link

codecov bot commented Mar 7, 2020

Codecov Report

Merging #590 into master will increase coverage by 0.01%.
The diff coverage is 98.4%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #590      +/-   ##
==========================================
+ Coverage   95.01%   95.03%   +0.01%     
==========================================
  Files          33       33              
  Lines        2831     2820      -11     
==========================================
- Hits         2690     2680      -10     
+ Misses        141      140       -1
Impacted Files Coverage Δ
src/heaps/binary_heap.jl 100% <100%> (ø) ⬆️
src/heaps.jl 100% <100%> (ø) ⬆️
src/mutable_list.jl 99.32% <100%> (+0.65%) ⬆️
src/priorityqueue.jl 98.67% <100%> (ø) ⬆️
src/disjoint_set.jl 98.57% <100%> (ø) ⬆️
src/queue.jl 100% <100%> (ø) ⬆️
src/deque.jl 98.59% <100%> (ø) ⬆️
src/accumulator.jl 93.75% <100%> (ø) ⬆️
src/sorted_multi_dict.jl 92.92% <100%> (ø) ⬆️
src/heaps/minmax_heap.jl 100% <100%> (ø) ⬆️
... and 14 more

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 d321175...3e26db8. Read the comment docs.

@oxinabox
Copy link
Member

Looks great.
Is it ready to merge, or do you want to finish going through othter files?

@eulerkochy
Copy link
Member Author

eulerkochy commented Mar 11, 2020 via email

@eulerkochy
Copy link
Member Author

@oxinabox I guess this PR is now ready! Have a look at it.

Now, since I read and understood through the entirity of the codebase(only the src, not the tests and benchmarks), here are few of my observations:

  • code can be made more terse in some places. If it wasn't begging to be done, I haven't changed it in this PR, because I guess it was outside its scope.
  • two files, int_set.jl and trie.jl are poorly documented in terms of docstrings.
  • I absolutely loved the documentation of sorted_dict.jl and sorted_multi_dict.jl. What's so special about it? The docstrings are written in a nice way and most importantly, explicitly mention asymptotic complexity of the operations, something which is missing in the entire codebase. As a data structures repo, I feel this is quintessential and got to be present. Opinion?

@oxinabox
Copy link
Member

I absolutely loved the documentation of sorted_dict.jl and sorted_multi_dict.jl. What's so special about it?

Different parts of this package have come from different places at different times.
For example the priority queue and minheap stuff was written by Jeff back in Julia 0.1 days, and used to be part of the language itself.

The Sorted* types were written by @StephenVavasis

src/accumulator.jl Outdated Show resolved Hide resolved
src/circular_buffer.jl Show resolved Hide resolved
@oxinabox
Copy link
Member

Just a few minor things.
Fix them and then it is good to merge.


I have invited you as a collaborator to the repository (via making you a member of the org).
you'll need to accept your invite and (if you haven't already) setup 2FA.
Few things:

  • Don't merge your own PRs without review. (Exception if just bumping version number to tag release.)
  • Follow the Continuous Delivery pattern and tag a release after every PR that has a functional change. Unless the project.toml version is suffixed with -DEV. Try and avoid making breaking releases. (thats what setting -DEV is for, bundling a collection of breaking changes)

Co-Authored-By: Lyndon White <oxinabox@ucc.asn.au>
src/accumulator.jl Outdated Show resolved Hide resolved
eulerkochy and others added 2 commits March 14, 2020 00:32
Co-Authored-By: Lyndon White <oxinabox@ucc.asn.au>
@eulerkochy eulerkochy merged commit a4246e7 into JuliaCollections:master Mar 30, 2020
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.

2 participants