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

Make the .roles parameter of set_main_contributors() work with a combination of named and unnamed expressions #65

Closed
arnaudgallou opened this issue Jan 2, 2024 · 0 comments · Fixed by #68
Labels
feature New feature or request Plume Plume related issue

Comments

@arnaudgallou
Copy link
Owner

arnaudgallou commented Jan 2, 2024

Currently, the only ways to set the same main contributors across all but a few roles is to specify main contributors for each roles, or to call set_main_contributors() twice, once to set main contributors across all roles and another time to define main contributors more specifically. E.g.:

aut <- Plume$new(tibble::tibble(
  given_name = LETTERS[1:3],
  family_name = LETTERS[1:3],
  analysis = 1,
  writing = 1,
  methodology = 1,
))
aut$set_main_contributors(3, .roles = aut$get_roles())
aut$set_main_contributors(writing = 2)
aut$get_contributions()
#> Formal analysis: C.C., A.A. and B.B.
#> Methodology: C.C., A.A. and B.B.
#> Writing - original draft: B.B., A.A. and C.C.

I could combine these features so that .roles only applies to unnamed expressions while named expressions would work as normal:

# set the third author as main contributor to all roles but writing
aut$set_main_contributors(3, writing = 2, .roles = aut$get_roles())
@arnaudgallou arnaudgallou added feature New feature or request Plume Plume related issue labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Plume Plume related issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant