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

Updated docstrings #48

Merged
merged 21 commits into from
Apr 20, 2022
Merged

Updated docstrings #48

merged 21 commits into from
Apr 20, 2022

Conversation

ceferisbarov
Copy link
Contributor

Updated docstrings for:

  • Rename
  • Replace
  • Coalesce
  • Coerce
  • Identity

src/transforms/coalesce.jl Outdated Show resolved Hide resolved
src/transforms/coerce.jl Outdated Show resolved Hide resolved
src/transforms/identity.jl Outdated Show resolved Hide resolved
src/transforms/identity.jl Outdated Show resolved Hide resolved
src/transforms/rename.jl Outdated Show resolved Hide resolved
src/transforms/rename.jl Outdated Show resolved Hide resolved
src/transforms/replace.jl Outdated Show resolved Hide resolved
src/transforms/replace.jl Outdated Show resolved Hide resolved
ceferisbarov and others added 3 commits April 19, 2022 16:54
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
Co-authored-by: Júlio Hoffimann <julio.hoffimann@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Apr 19, 2022

Codecov Report

Merging #48 (25d27d0) into master (edd4c24) will decrease coverage by 0.01%.
The diff coverage is n/a.

❗ Current head 25d27d0 differs from pull request most recent head 7c32d8d. Consider uploading reports for the commit 7c32d8d to get more accurate results

@@            Coverage Diff             @@
##           master      #48      +/-   ##
==========================================
- Coverage   92.85%   92.84%   -0.02%     
==========================================
  Files          19       19              
  Lines         462      461       -1     
==========================================
- Hits          429      428       -1     
  Misses         33       33              
Impacted Files Coverage Δ
src/transforms/coalesce.jl 100.00% <ø> (ø)
src/transforms/coerce.jl 93.33% <ø> (ø)
src/transforms/identity.jl 75.00% <ø> (ø)
src/transforms/rename.jl 100.00% <ø> (ø)
src/transforms/replace.jl 100.00% <ø> (ø)
src/colspec.jl 100.00% <0.00%> (ø)
src/transforms/filter.jl 98.00% <0.00%> (ø)
src/transforms/select.jl 91.30% <0.00%> (ø)

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 edd4c24...7c32d8d. Read the comment docs.

# Examples

```julia
T = Rename(Dict(:a => :x, :c => :y))
Copy link
Member

Choose a reason for hiding this comment

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

Good catch @eliascarv , I think we should omit it. Advanced users can always read the source. Agree?

@eliascarv
Copy link
Member

eliascarv commented Apr 19, 2022

T = Rename(Dict(:a => :x, :c => :y))

@juliohm, I think the Rename(dict) method is part of the internal API, should we expose this to the user?

src/transforms/rename.jl Outdated Show resolved Hide resolved
@juliohm
Copy link
Member

juliohm commented Apr 19, 2022

I was thinking that maybe we should erase the T = ... in front of every example. It doesn't help to name a variable in this context. Can you remove all occurrences of T in the docstrings @ceferisbarov ? Feel free to request a new review when the PR is ready for review again.

@eliascarv
Copy link
Member

I agree, I will remove from the docstrings I made in the next PR.

Co-authored-by: Elias Carvalho <73039601+eliascarv@users.noreply.github.com>
@ceferisbarov
Copy link
Contributor Author

So do we completely remove the docstring for Rename, or should we still leave some sort of comment explaining its behavior?

@juliohm @eliascarv

@juliohm
Copy link
Member

juliohm commented Apr 20, 2022

I don't understand your question @ceferisbarov , why would we remove the docstring of Rename?

src/transforms/coerce.jl Outdated Show resolved Hide resolved
src/transforms/identity.jl Outdated Show resolved Hide resolved
src/transforms/rename.jl Outdated Show resolved Hide resolved
src/transforms/replace.jl Outdated Show resolved Hide resolved
src/transforms/identity.jl Outdated Show resolved Hide resolved
src/transforms/rename.jl Outdated Show resolved Hide resolved
src/transforms/replace.jl Outdated Show resolved Hide resolved
@juliohm
Copy link
Member

juliohm commented Apr 20, 2022

I did the commits myself because apparently some of my previous suggestions were ignored. I removed all ## Notes sections because they were not helpful. You add a note to a docstring when it adds new information that the user may not be aware ahead of time. For example, saying that the Identity transform preserves the schema is not very useful. Everyone knows that already and will just spend more time reading the docstring ## Notes.

src/transforms/identity.jl Outdated Show resolved Hide resolved
src/transforms/coalesce.jl Outdated Show resolved Hide resolved
juliohm and others added 2 commits April 20, 2022 08:58
Co-authored-by: Elias Carvalho <73039601+eliascarv@users.noreply.github.com>
@juliohm juliohm merged commit fba2350 into JuliaML:master Apr 20, 2022
@ceferisbarov
Copy link
Contributor Author

@juliohm I hadn't ignored the suggestions. I was going to make those changes in my computer and commit. Sorry for the confusion.

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.

None yet

4 participants