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

Orcid #70

Merged
merged 24 commits into from
Sep 27, 2018
Merged

Orcid #70

merged 24 commits into from
Sep 27, 2018

Conversation

maelle
Copy link
Contributor

@maelle maelle commented Sep 25, 2018

Cf #63

desc.Rproj Outdated Show resolved Hide resolved
person(given = "Maëlle",
family = "Salmon",
role = "ctb",
comment = c(ORCID = "0000-0002-2815-0399")))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not adding my ORCID would be weird 😹

@codecov-io
Copy link

codecov-io commented Sep 25, 2018

Codecov Report

Merging #70 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #70      +/-   ##
==========================================
+ Coverage   98.77%   98.82%   +0.05%     
==========================================
  Files          18       18              
  Lines        1065     1111      +46     
==========================================
+ Hits         1052     1098      +46     
  Misses         13       13
Impacted Files Coverage Δ
R/description.R 97.6% <100%> (+0.09%) ⬆️
R/authors-at-r.R 98.78% <100%> (+0.34%) ⬆️

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 9013f7d...6d5caa4. Read the comment docs.

R/authors-at-r.R Outdated
orig,
w,
"comment",
c(comment, ORCID = orcid)
Copy link
Member

Choose a reason for hiding this comment

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

So, what happens if there is already an orcid there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. Do you agree that the old one should get replaced by the new one if that's the case?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I do. It would be nice to have a test case for this as well. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll also add a test for this.

R/authors-at-r.R Outdated Show resolved Hide resolved
R/authors-at-r.R Outdated Show resolved Hide resolved
R/description.R Outdated Show resolved Hide resolved
desc.Rproj Outdated Show resolved Hide resolved
* add_me now can use the `ORCID_ID` environment variable.

* The comment field can now be a named character vector. (@maelle, #69; @gvegayon, #65)

Copy link
Member

Choose a reason for hiding this comment

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

Can you pls rewrite this more in the style of http://style.tidyverse.org/news.html#before-release

New add_orcid() method and desc_add_orcid() functions...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried :-)

@gaborcsardi
Copy link
Member

Thanks! Looks great in general, just had a few questions, and some small requests.

@maelle
Copy link
Contributor Author

maelle commented Sep 27, 2018

Thanks, will make the changes. I was also wondering whether/how to add checks that the ORCIDs are unique i.e. that the DESCRIPTION doesn't feature several authors with the same ORCID. At which step could this be checked? Are there any other similar checks already (e.g. that there's at least one maintainer) <- I could probably go read more code to answer that question.

@gaborcsardi
Copy link
Member

No author checks currently. R CMD check checks for the single maintainer, maybe R CMD build as well, because it creates the Maintainer field. Not a big priority for us, I would say. Nevertheless the placeholder is here:

check_field.DescriptionAuthorsAtR <- function(x, warn = FALSE, ...) {

@maelle
Copy link
Contributor Author

maelle commented Sep 27, 2018

Ok! But does it make sense for add_orcid to error if the arguments provided return more than one author since it'd mean one adds the same ORCID to several authors?

@gaborcsardi
Copy link
Member

Yes, I think that would make sense indeed. Good catch!

@maelle
Copy link
Contributor Author

maelle commented Sep 27, 2018

I'm also going to add a mocking test for ORCID_ID.

@maelle
Copy link
Contributor Author

maelle commented Sep 27, 2018

Thanks for the feedback, I've made quite a few edits! The checks have passed, and I won't add more changes before your next review @gaborcsardi 😸

One more thing I've been wondering is whether the order of elements in comment should be consistent across authors, i.e. should e.g. ORCID always be the first element if there are several elements in comment. Really a detail though!

@gaborcsardi
Copy link
Member

One more thing I've been wondering is whether the order of elements in comment should be consistent across authors, i.e. should e.g. ORCID always be the first element if there are several elements in comment.

I don't think it matters.

Thanks!

@gaborcsardi
Copy link
Member

Looks really good, thanks much!

@gaborcsardi gaborcsardi merged commit 0ae0017 into r-lib:master Sep 27, 2018
@maelle maelle mentioned this pull request Sep 27, 2018
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