usethis icon indicating copy to clipboard operation
usethis copied to clipboard

Add use author

Open avalcarcel9 opened this issue 4 years ago • 11 comments

I talked with @jennybc at useR! about adding functionality to easily add or adapt authors in the Authors@R field in the description. Essentially the same functionality and use as use_package(). I think expert users add their information to the .Rprofile but more novice developers still add manually and often miss the field in use_description(). This could be useful for adding an author after package development as well.

I've never contributed to a tidyverse package so I'm not sure of your conventions. I tried to look up a few similar functions in the package and mimic those styles. I am happy to adapt the function or documentation to match your conventions, in the event of bugs, or to add functionality. Additionally, I did not provide tests for the new function. If you'd like to incorporate the use_author() function/feature I'm again happy to add tests or more documentation.

Possible TODOs: TODO allow generic authors input like desc_set_authors(authors, file = ".", normalize = FALSE) for multiple author input TODO create addin to prompt for author information TODO create a snippet with author information for DESCRIPTION TODO add tests TODO check if the author input has partial overlap with one already listed and ask user if they would like to add the person as a new author or replace the existing author

avalcarcel9 avatar Jul 11 '19 14:07 avalcarcel9

Bug in line 89 (sorry). role must be a string in the desc::desc_add_author function. I can fix and re-pull if you're interested in incorporating.

avalcarcel9 avatar Jul 11 '19 14:07 avalcarcel9

Thanks so much @jennybc ! I'll take a look at all of this and start working on incorporating the changes this week.

avalcarcel9 avatar Jul 22 '19 15:07 avalcarcel9

@jennybc This version seems to be working fine. I made sure to fetch and merge updates between my old branch and the current devel usethis on gh. Some checks on travis are failing for the R devel version but they seem to be unrelated to this content. I tried to rigorously test out the function manually myself by assessing different test cases and prompting errors. I eventually made as many of these real tests so hopefully most major bugs are out but a grad student only has so much time in the day.

Looking forward to your feedback and I hope its ready to merge!

avalcarcel9 avatar Aug 16 '19 00:08 avalcarcel9

Hey @avalcarcel9 , it is a helpful feature, any update here?

GitHunter0 avatar Nov 01 '20 20:11 GitHunter0

@GitHunter0 no updates! I was waiting to hear back about next steps to get this incorporated into the package.

avalcarcel9 avatar Nov 01 '20 22:11 avalcarcel9

It is a pity, @avalcarcel9 , so let's wait for @jennybc

GitHunter0 avatar Nov 02 '20 02:11 GitHunter0

I took a look recently and decided it needs work before it can be merged. For starters, copy editing of the docs and code restyling. And, much more vaguely, editing to be more consistent with existing code base.

jennybc avatar Nov 02 '20 15:11 jennybc

@jennybc is there anything I can do to help with the edits and todos or does the remaining work need to be done with someone on your team? As a sort of independent contributor I'm not sure what you mean exactly by these comments and would need some more specific TODOs to help out. But I'm still more than happy to help in any way I can!

avalcarcel9 avatar Nov 02 '20 18:11 avalcarcel9

The contributing guide for this repo contains good information, such as re: code style:

https://github.com/r-lib/usethis/blob/master/.github/CONTRIBUTING.md

You could also read the documentation carefully and copy edit it. I think there are some missing words / typos in places.

jennybc avatar Nov 02 '20 18:11 jennybc

Also the tests use a helper that has since been renamed to create_local_package().

You generally need to merge in current main development from master of the main repo.

All of this is stuff I can do, but this is why finishing the PR isn't a quick and easy process.

jennybc avatar Nov 02 '20 18:11 jennybc

@jennybc I completely understand the process takes a long time to rigorously validate and check. I started this process while in grad school and have since moved onto a new job during this crazy time. I'd still love the opportunity to help and as time permits would love to help out with these last tasks to get the code and functionality ready to integrate. That being said, I'm not sure when that time will pop up with my new responsibilities during this crazy time. So if you get to this and I haven't contributed feel free to finish it off. If not, hopefully at some point (soon-ish) I can go through the documentation for contributing, make the changes, and re-push changes. So sorry I can't help more immediately.

avalcarcel9 avatar Nov 05 '20 23:11 avalcarcel9

I refactored this a lot since various things have changed considerably since this story arc first started!

jennybc avatar Apr 21 '23 01:04 jennybc