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

extend documentation #26

Open
1 of 6 tasks
russHyde opened this issue Jul 4, 2019 · 10 comments
Open
1 of 6 tasks

extend documentation #26

russHyde opened this issue Jul 4, 2019 · 10 comments
Labels
documentation Changes to README / Vignettes / manpages and suggeested blogposts

Comments

@russHyde
Copy link
Owner

russHyde commented Jul 4, 2019

  • - can the user disregard specific directories (eg, tests/)
  • - how to add to / modify the disregarded symbols
  • - network diagram of duplication in a project / package
  • - why were the default disregarded symbols selected?
  • - limitation: only looks at top-level blocks
  • - ? alternatives
@maelle
Copy link

maelle commented Nov 18, 2019

Thanks for the package!

I'd also like to know how you'd use the results to find the blocks to replace with a helper function. At the moment one would need to open files and navigate them by hand, correct?

@russHyde
Copy link
Owner Author

russHyde commented Nov 18, 2019

Thanks for your feedback, I wasn't sure if this was on anyone's radar.
You are correct, the only way to assess the found matches is by looking at the code blocks in the relevant files.
I'm planning to implement a way to highlight the code within duplicated regions for specific code-block-matches as part of v0.3.0; see #27 and #48

@maelle
Copy link

maelle commented Nov 18, 2019

Ok, thanks!

Do you have any example of a PR or commit where the diff is your using dupree results to reduce duplication? I.e. a diff that'd be "here I removed 100 lines by writing a helper function instead of the same code block repeated 10 times, thanks to dupree".

@russHyde
Copy link
Owner Author

I'm afraid I've only done that in some private repos so far. I have applied it to lintr and installr but haven't yet made PRs that are a direct result of applying dupree. (If you're interested I have a network diagram of the duplicates found in ~ June in lintr in this presentation: http://rpubs.com/russH/dupree-intro see p18) [but, lintr has undergone a pretty big overhaul since then]

@maelle
Copy link

maelle commented Nov 18, 2019

Ok, thanks.

For context I was thinking about mentioning dupree in a future blog post r-hub/blog#32 (I can't remember whether I saw dupree on Twitter via CRANberries, or via pkgsearch::cran_latest())

@russHyde
Copy link
Owner Author

russHyde commented Nov 18, 2019

Cool. I have a blogpost about it here: https://russ-hyde.rbind.io/post/dupree/ but all the formatting has gone weird and it's a bit out of date. I need to pull together some new examples for a newcastle satrdays abstract, so I'll try and write a Release blog post this week. You did retweet or like one of my tweets quite early on the day it was released: https://twitter.com/haematobot/status/1193605949858177024

... if there's anything I can do to help, just drop us a message

@maelle
Copy link

maelle commented Nov 18, 2019

Aaah yes so your tweet was how I found out about it!

Thanks for the links!

@maelle
Copy link

maelle commented Nov 18, 2019

Btw what got my attention was the package name. Why is it called so?

@russHyde
Copy link
Owner Author

Simply because it finds _dup_licates; and the name dupree had an R in it. Thanks, though :)

@maelle
Copy link

maelle commented Nov 18, 2019

ah ok, so no reference I was not understanding :-D Thank you for the explanation!

@russHyde russHyde added the documentation Changes to README / Vignettes / manpages and suggeested blogposts label Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Changes to README / Vignettes / manpages and suggeested blogposts
Projects
None yet
Development

No branches or pull requests

2 participants