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

addCreator: allow to specify name, rather than firstname and lastname #26

Closed
sje30 opened this issue Apr 14, 2020 · 8 comments
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sje30
Copy link
Contributor

sje30 commented Apr 14, 2020

Hi,

thanks for this great package. @nuest and I are using it for our CODECHECK project.

Would you be interested in a PR to allow addCreator() to look like this:

    addCreator = function(firstname, lastname, name = paste(lastname, firstname, sep=", "),
                                                 affiliation = NULL, orcid = NULL, gnd = NULL){
      creator <- list(name = name)

This means that by default the API should continue to work with firstname and lastname. However, as an alternative, we can specify name directly, which is what we'd like to do rather than be constrained by the firstname, lastname format. I've got it working at:
sje30@ff2665f
but have not yet added any documentation.

By mistake, I also added the same name= argument to the addContributor() function, but I'm not yet using that API.

@sje30
Copy link
Contributor Author

sje30 commented Apr 14, 2020

p.s. what is the gnd argument for? I couldn't find that.

nuest referenced this issue in codecheckers/Reproduction-Hancock Apr 14, 2020
hi @nuest are you happy with this version of multiple codecheckers?

I've adopted the firstname, lastname, ORCID convention so that it
drops in easily into zen4R api for creating register.  See the
codecheck-zenodo.R script for an example.
@eblondel eblondel self-assigned this Apr 14, 2020
@eblondel eblondel added the enhancement New feature or request label Apr 14, 2020
@eblondel
Copy link
Owner

thanks @sje30 i look at it ASAP. gnd is another id supported by Zenodo API https://developers.zenodo.org/#representation I didn't dig too much in it, but just sticked with the fact Zenodo API mentions it as payload property attachable to a creator (ORCID is more common indeed..).

eblondel added a commit that referenced this issue Apr 14, 2020
@eblondel eblondel added this to the 0.3 milestone Apr 14, 2020
@eblondel
Copy link
Owner

ok @sje30 @nuest i've integrated your proposal that is fine with me. Let me know

@nuest
Copy link
Contributor

nuest commented Apr 14, 2020

At a first glance, the test in line 555df14#diff-09ea42049f1c3a35868c13b0d984d841R81
seems not quite right. Maybe (untested!)

myrec$addCreator(firstname = "John", lastname = "Doe", affiliation = "Independent")
myrec$addCreator(name = "Doe, John", affiliation = "Independent")
expect_equal(myrec$metadata$creators[[1]], myrec$metadata$creators[[2]])

is what you mean?

But otherwise: thank you!

@eblondel
Copy link
Owner

@nuest don't worry for these tests, i have to review all of them, since others are failing (apparently due to some API changes). I've tested the feature and it works fine.

@sje30
Copy link
Contributor Author

sje30 commented Apr 14, 2020

Thank you very much @eblondel this seems to allow me to upload name=... perfectly.

@sje30 sje30 closed this as completed Apr 14, 2020
@eblondel eblondel modified the milestones: 0.3, 0.4 Aug 5, 2020
@eblondel
Copy link
Owner

eblondel commented Aug 7, 2020

Dear @sje30 I'm going soon to publish zen4R version 0.4, is it ok that I add you as contrib in package desc for this ticket? If yes, and i case you have an ORCID, can you send it to me so I can add it as well. Best, Emmanuel

@sje30
Copy link
Contributor Author

sje30 commented Aug 7, 2020

Thank you, happy to be named. My orcid:

https://orcid.org/0000-0001-8607-8025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants