ropensci / software-review

rOpenSci Software Peer Review.
286 stars 104 forks source link

CRediTas: a tiny package to generate CRediT authors statements #576

Closed jospueyo closed 1 year ago

jospueyo commented 1 year ago

Date accepted: 2023-04-11

Submitting Author Name: Josep Pueyo-Ros Submitting Author Github Handle: !--author1-->@jospueyo<!--end-author1-- Repository: https://github.com/jospueyo/CRediTas Version submitted: 0.1.0 Submission type: Standard Editor: !--editor-->@emilyriederer<!--end-editor-- Reviewers: @zambujo, @msperlin

Due date for @zambujo: 2023-04-04 Due date for @msperlin: 2023-04-06

Archive: TBD Version accepted: TBD Language: en

Package: CRediTas
Type: Package
Title: Generate CRediT Author Statements
Version: 0.1.0
Authors@R: 
    c(
      person(given = "Josep", family = "Pueyo-Ros", email = "josep.pueyo@udg.edu", 
      role = c("aut", "cre"), comment = c(ORCID = "0000-0002-1236-5651")))
Description: CRediTas is a tiny package to generate CRediT author statements (https://credit.niso.org/). 
    It provides three functions: create a template, read it back and generate the CRediT author statement in a text file.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
URL: https://github.com/jospueyo/creditas
BugReports: https://github.com/jospueyo/creditas/issues
RoxygenNote: 7.2.1
Suggests: 
    testthat (>= 3.0.0)
Config/testthat/edition: 3

Scope

The package facilitates the creation of CRediT author statements, which are mandatory for many journals and encourage good practices in coauthoring scientific publications.

The target audience are authors of scientific publications. There are not scientific applications of this package. It helps in the good practices of open science.

There are not as far as I know

Not applicable

Long lines in test-write_cras.R because I compare a string with a generated text file. If I break the lines I cannot compare both. Avoid T and F in write_cras.R: I do not use T or F, in line 1, there is "CRediT" which confounds the algorithm.

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

MEE Options - [ ] The package is novel and will be of interest to the broad readership of the journal. - [ ] The manuscript describing the package is no longer than 3000 words. - [ ] You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see [MEE's Policy on Publishing Code](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/journal-resources/policy-on-publishing-code.html)) - (*Scope: Do consider MEE's [Aims and Scope](http://besjournals.onlinelibrary.wiley.com/hub/journal/10.1111/(ISSN)2041-210X/aims-and-scope/read-full-aims-and-scope.html) for your manuscript. We make no guarantee that your manuscript will be within MEE scope.*) - (*Although not required, we strongly recommend having a full manuscript prepared when you submit here.*) - (*Please do not submit your package separately to Methods in Ecology and Evolution*)

Code of conduct

ropensci-review-bot commented 1 year ago

Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type @ropensci-review-bot help for help.

ropensci-review-bot commented 1 year ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 1 year ago

Checks for credit (v0.1.0)

git hash: 5c151c4f

Important: All failing checks above must be addressed prior to proceeding

(Checks marked with :eyes: may be optionally addressed.)

Package License: MIT + file LICENSE


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate. |type |package | ncalls| |:----------|:--------|------:| |internal |base | 12| |internal |credit | 2| |internal |stats | 2| |internal |utils | 2| |imports |NA | NA| |suggests |testthat | NA| |linking_to |NA | NA| Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats()', and examining the 'external_calls' table.

base

for (3), data.frame (2), drop (1), if (1), length (1), ncol (1), nrow (1), seq_len (1), T (1)

credit

create_template (1), read_template (1)

stats

df (2)

utils

read.csv2 (1), write.csv2 (1)

**NOTE:** No imported packages appear to have associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has: - code in R (100% in 3 files) and - 1 authors - no vignette - no internal data file - 1 imported package - 3 exported functions (median 17 lines of code) - 3 non-exported functions in R (median 31 lines of code) --- Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used: - `loc` = "Lines of Code" - `fn` = "function" - `exp`/`not_exp` = exported / not exported All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by [the `checks_to_markdown()` function](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) The final measure (`fn_call_network_size`) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile. |measure | value| percentile|noteworthy | |:-----------------------|-----:|----------:|:----------| |files_R | 3| 21.5| | |files_vignettes | 0| 0.0|TRUE | |files_tests | 4| 79.0| | |loc_R | 55| 5.5| | |loc_tests | 49| 25.2| | |num_vignettes | 0| 0.0|TRUE | |n_fns_r | 6| 6.6| | |n_fns_r_exported | 3| 12.9| | |n_fns_r_not_exported | 3| 5.3| | |n_fns_per_file_r | 1| 0.2|TRUE | |num_params_per_fn | 3| 33.6| | |loc_per_fn_r | 22| 64.1| | |loc_per_fn_r_exp | 17| 40.3| | |loc_per_fn_r_not_exp | 31| 79.3| | |rel_whitespace_R | 42| 19.2| | |rel_whitespace_tests | 27| 26.7| | |doclines_per_fn_exp | 22| 17.6| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 0| 0.0|TRUE | ---

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

#### 3a. Continuous Integration Badges [![R-CMD-check.yaml](https://github.com/jospueyo/credit/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jospueyo/credit/actions) **GitHub Workflow Results** | id|name |conclusion |sha | run_number|date | |----------:|:-----------|:----------|:------|----------:|:----------| | 4253501958|R-CMD-check |success |5c151c | 6|2023-02-23 | --- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) rcmdcheck found no errors, warnings, or notes #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 100 #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) No functions have cyclocomplexity >= 15 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 2 potential issues: message | number of times --- | --- Lines should not be more than 80 characters. | 2


4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following function name is duplicated in other packages: - - `read_template` from onbrand


Package Versions

|package |version | |:--------|:--------| |pkgstats |0.1.3 | |pkgcheck |0.1.1.11 |


Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

jospueyo commented 1 year ago

All items marked with ✖️ have been resolved.

jospueyo commented 1 year ago

@ropensci-review-bot check package

ropensci-review-bot commented 1 year ago

Thanks, about to send the query.

ropensci-review-bot commented 1 year ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 1 year ago

Checks for credit (v0.1.0)

git hash: fa36ab55

(Checks marked with :eyes: may be optionally addressed.)

Package License: MIT + file LICENSE


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate. |type |package | ncalls| |:----------|:---------|------:| |internal |base | 12| |internal |credit | 2| |internal |stats | 2| |internal |utils | 2| |imports |NA | NA| |suggests |knitr | NA| |suggests |rmarkdown | NA| |suggests |testthat | NA| |linking_to |NA | NA| Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats()', and examining the 'external_calls' table.

base

for (3), data.frame (2), drop (1), if (1), length (1), ncol (1), nrow (1), seq_len (1), T (1)

credit

create_template (1), read_template (1)

stats

df (2)

utils

read.csv2 (1), write.csv2 (1)

**NOTE:** No imported packages appear to have associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has: - code in R (100% in 3 files) and - 1 authors - 1 vignette - no internal data file - 1 imported package - 3 exported functions (median 17 lines of code) - 3 non-exported functions in R (median 31 lines of code) --- Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used: - `loc` = "Lines of Code" - `fn` = "function" - `exp`/`not_exp` = exported / not exported All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by [the `checks_to_markdown()` function](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) The final measure (`fn_call_network_size`) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile. |measure | value| percentile|noteworthy | |:------------------------|-----:|----------:|:----------| |files_R | 3| 21.5| | |files_vignettes | 1| 68.4| | |files_tests | 4| 79.0| | |loc_R | 55| 5.5| | |loc_vignettes | 47| 8.0| | |loc_tests | 49| 25.2| | |num_vignettes | 1| 64.8| | |n_fns_r | 6| 6.6| | |n_fns_r_exported | 3| 12.9| | |n_fns_r_not_exported | 3| 5.3| | |n_fns_per_file_r | 1| 0.2|TRUE | |num_params_per_fn | 3| 33.6| | |loc_per_fn_r | 22| 64.1| | |loc_per_fn_r_exp | 17| 40.3| | |loc_per_fn_r_not_exp | 31| 79.3| | |rel_whitespace_R | 42| 19.2| | |rel_whitespace_vignettes | 51| 16.9| | |rel_whitespace_tests | 27| 26.7| | |doclines_per_fn_exp | 22| 17.6| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 0| 0.0|TRUE | ---

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

#### 3a. Continuous Integration Badges [![R-CMD-check.yaml](https://github.com/jospueyo/credit/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jospueyo/credit/actions) **GitHub Workflow Results** | id|name |conclusion |sha | run_number|date | |----------:|:-----------|:----------|:------|----------:|:----------| | 4253778554|R-CMD-check |success |fa36ab | 10|2023-02-23 | --- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) rcmdcheck found no errors, warnings, or notes #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 100 #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) No functions have cyclocomplexity >= 15 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 6 potential issues: message | number of times --- | --- Avoid library() and require() calls in packages | 1 Lines should not be more than 80 characters. | 5


4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following function name is duplicated in other packages: - - `read_template` from onbrand


Package Versions

|package |version | |:--------|:--------| |pkgstats |0.1.3 | |pkgcheck |0.1.1.11 |


Editor-in-Chief Instructions:

This package is in top shape and may be passed on to a handling editor

jospueyo commented 1 year ago

@ropensci-review-bot check package (I added some sanity checks to a function)

ropensci-review-bot commented 1 year ago

I'm sorry human, I don't understand that. You can see what commands I support by typing:

@ropensci-review-bot help

jospueyo commented 1 year ago

@ropensci-review-bot check package

ropensci-review-bot commented 1 year ago

Thanks, about to send the query.

ropensci-review-bot commented 1 year ago

:rocket:

Editor check started

:wave:

ropensci-review-bot commented 1 year ago

Checks for credit (v0.1.0)

git hash: ca2d4ce9

(Checks marked with :eyes: may be optionally addressed.)

Package License: MIT + file LICENSE


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate. |type |package | ncalls| |:----------|:---------|------:| |internal |base | 17| |internal |credit | 4| |internal |stats | 2| |internal |utils | 1| |imports |NA | NA| |suggests |knitr | NA| |suggests |rmarkdown | NA| |suggests |testthat | NA| |linking_to |NA | NA| Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats()', and examining the 'external_calls' table.

base

for (3), data.frame (2), nrow (2), seq_len (2), character (1), drop (1), file (1), if (1), length (1), ncol (1), T (1), vapply (1)

credit

check_cras_table (1), create_template (1), drop_authors (1), read_template (1)

stats

df (2)

utils

read.csv2 (1)

**NOTE:** No imported packages appear to have associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has: - code in R (100% in 4 files) and - 1 authors - 1 vignette - no internal data file - 1 imported package - 3 exported functions (median 17 lines of code) - 7 non-exported functions in R (median 11 lines of code) --- Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used: - `loc` = "Lines of Code" - `fn` = "function" - `exp`/`not_exp` = exported / not exported All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by [the `checks_to_markdown()` function](https://docs.ropensci.org/pkgcheck/reference/checks_to_markdown.html) The final measure (`fn_call_network_size`) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile. |measure | value| percentile|noteworthy | |:------------------------|-----:|----------:|:----------| |files_R | 4| 28.3| | |files_vignettes | 1| 68.4| | |files_tests | 4| 79.0| | |loc_R | 71| 7.2| | |loc_vignettes | 51| 9.1| | |loc_tests | 55| 27.1| | |num_vignettes | 1| 64.8| | |n_fns_r | 10| 13.0| | |n_fns_r_exported | 3| 12.9| | |n_fns_r_not_exported | 7| 15.5| | |n_fns_per_file_r | 1| 19.8| | |num_params_per_fn | 3| 33.6| | |loc_per_fn_r | 14| 42.4| | |loc_per_fn_r_exp | 17| 40.3| | |loc_per_fn_r_not_exp | 11| 35.4| | |rel_whitespace_R | 44| 24.6| | |rel_whitespace_vignettes | 47| 16.9| | |rel_whitespace_tests | 27| 29.6| | |doclines_per_fn_exp | 22| 17.6| | |doclines_per_fn_not_exp | 0| 0.0|TRUE | |fn_call_network_size | 2| 14.4| | ---

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

#### 3a. Continuous Integration Badges [![R-CMD-check.yaml](https://github.com/jospueyo/credit/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jospueyo/credit/actions) **GitHub Workflow Results** | id|name |conclusion |sha | run_number|date | |----------:|:-----------|:----------|:------|----------:|:----------| | 4260817751|R-CMD-check |NA |ca2d4c | 12|2023-02-24 | --- #### 3b. `goodpractice` results #### `R CMD check` with [rcmdcheck](https://r-lib.github.io/rcmdcheck/) rcmdcheck found no errors, warnings, or notes #### Test coverage with [covr](https://covr.r-lib.org/) Package coverage: 100 #### Cyclocomplexity with [cyclocomp](https://github.com/MangoTheCat/cyclocomp) No functions have cyclocomplexity >= 15 #### Static code analyses with [lintr](https://github.com/jimhester/lintr) [lintr](https://github.com/jimhester/lintr) found the following 3 potential issues: message | number of times --- | --- Avoid library() and require() calls in packages | 1 Lines should not be more than 80 characters. | 2


4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following function name is duplicated in other packages: - - `read_template` from onbrand


Package Versions

|package |version | |:--------|:--------| |pkgstats |0.1.3 | |pkgcheck |0.1.1.11 |


Editor-in-Chief Instructions:

This package is in top shape and may be passed on to a handling editor

maurolepore commented 1 year ago

@jospueyo thanks a lot for your submission!

I'm discussing the scope with the editors board.

To increase the chance they will see the merit of {credit} you might want to unpack in README why the task this package solves is a tedious one. README says it's tedious but it's not immediately obvious how.

jospueyo commented 1 year ago

@maurolepore I just pushed this explanation.

maurolepore commented 1 year ago

@jospueyo

Thanks for the explanation and for your patience.

I discussed with other editors and find this package to be in scope. I'll start looking for a handling editor.

maurolepore commented 1 year ago

@ropensci-review-bot assign @emilyriederer as editor

ropensci-review-bot commented 1 year ago

Assigned! @emilyriederer is now the editor

emilyriederer commented 1 year ago

Hi @jospueyo ! I'm delighted to be handling this from the editorial side. I'm traveling for work W-F so I may be a bit slower to respond, but I thought I'd share some initial feedback to get us started. Thanks again and I look forward to working together.

Editor checks:

Editor comments

This is a very clean submission, and it feels close to being ready for reviewers! I notice a few small opportunities before we do the hand-off.


jospueyo commented 1 year ago
emilyriederer commented 1 year ago

Thanks @jospueyo ! I like the Documentation updates a lot. My mistake on the License -- I somehow saw the LICENSE file but missed the LICENSE.md file the first time through. I'll start looking for reviewers for this

emilyriederer commented 1 year ago

@ropensci-review-bot seeking reviewers

ropensci-review-bot commented 1 year ago

Please add this badge to the README of your package repository:

[![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/576_status.svg)](https://github.com/ropensci/software-review/issues/576)

Furthermore, if your package does not have a NEWS.md file yet, please create one to capture the changes made during the review process. See https://devguide.ropensci.org/releasing.html#news

emilyriederer commented 1 year ago

@ropensci-review-bot add @zambujo as reviewer

ropensci-review-bot commented 1 year ago

@zambujo added to the reviewers list. Review due date is 2023-04-04. Thanks @zambujo for accepting to review! Please refer to our reviewer guide.

rOpenSci’s community is our best asset. We aim for reviews to be open, non-adversarial, and focused on improving software quality. Be respectful and kind! See our reviewers guide and code of conduct for more.

ropensci-review-bot commented 1 year ago

@zambujo: If you haven't done so, please fill this form for us to update our reviewers records.

emilyriederer commented 1 year ago

Hi @jospueyo - I'm delighted to introduce the first of our two reviewers, @zambujo . I'm still looking for a second reviewer.

jospueyo commented 1 year ago

Hi @jospueyo - I'm delighted to introduce the first of our two reviewers, @zambujo . I'm still looking for a second reviewer.

Hi! Looking forward to hearing your suggestions!

emilyriederer commented 1 year ago

@ropensci-review-bot add @msperlin as reviewer

ropensci-review-bot commented 1 year ago

@msperlin added to the reviewers list. Review due date is 2023-04-06. Thanks @msperlin for accepting to review! Please refer to our reviewer guide.

rOpenSci’s community is our best asset. We aim for reviews to be open, non-adversarial, and focused on improving software quality. Be respectful and kind! See our reviewers guide and code of conduct for more.

ropensci-review-bot commented 1 year ago

@msperlin: If you haven't done so, please fill this form for us to update our reviewers records.

emilyriederer commented 1 year ago

Hi @jospueyo - I'm delighted to introduce @msperlin, as seasoned rOpenSci package dev, as your seond reviewer

jospueyo commented 1 year ago

Hi @jospueyo - I'm delighted to introduce @msperlin, as seasoned rOpenSci package dev, as your seond reviewer

Hi! I'm excited about this process! A lot to learn!

msperlin commented 1 year ago

Package Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

Documentation

The package includes all the following forms of documentation:

Functionality

Estimated hours spent reviewing: 1.5


Review Comments

credit is a tiny package that automates the process of writing a contribution matrix in the CRedit format, and can be very useful for academic work, specially in large research groups.

Overall, I liked the package and it worked fine in my machine. But, in order to improve it, I do have some suggestions:

package name

The name credit might confuse some users. At face value, an R package named credit is most likely to be related to mathematical finance and credit markets, and not to the CRedit reference system. My suggestion is to think about another, more intuitive, name. A couple suggestions: CReditR, contribR,

possible integration with other packages

There are many R packages for reproducible research, including handling research metadata such as bibtext references.

I wonder if the authors have checked for any possible integration with these packages. I don't have a direct suggestion, but might be worth the time to check for it.

use template for roles

The roles used in the code, as in "Conceptualization", "Methodology" and so on, should be defined in a single place. Do notice that you hard coded (wrote in a script) the roles in function create_template and in test test-read_template.

There are many ways to do it, but the simples is just using a function:

get_roles <- function() {

  roles <- c(
  "Conceptualization",
  "Methodology",
  "Software",
  "Validation",
  "Formal analysis",
  "Investigation",
  "Resources",
  "Data curation",
  "Writing - Original Draft",
  "Writing - Review & Editing",
  "Visualization",
  "Supervision",
  "Project administration",
  "Funding acquisition"
)

  return(roles)
}

With some simple webscrapping, you could use testthat to check if the template in the package is identical to the template from the site. Whenever the site adds or removes a role, your CHECK process will show it.

Function and argument naming

From the ropensci packaging guideline, I strongly advise to use the object_verb() format (and not the verb_object() pattern) for function names.

use cli messages

Package cli is a great way to communicate to the user the output of all functions. It can also include clickable links to local files. This can be very helpful in function write_cras(), where the users can simply click in the prompt to open the resulting text file.

Functions

create_template.R

In the description, you should add a link to the CRedit and also improve the text. This is your main function, and most likely where users will spend more time. You should try to document it as much as possible.

read_template.R

Since this function is reading a template, you should add some test to check if the information in the file has the expected structure (column names, number of columns, ..). If not, issuing a warning might be a good policy, letting the user know that the expected format was not found.

write_cras.R

In line 34, I suggest you add an input option for the user to drop (or not) authors without contributions. I suspect that, in large research groups, might be best to also make it explicit that some people did not contribute.

The description of the function was not found. Since this is a tiny package, I suggest to add a nice and comprehensive description of the function.

jospueyo commented 1 year ago

Hi! I opened separate issues in the package repository. Is it fine if I report the changes there? Or should I do here?

jospueyo commented 1 year ago

BTW, following the first comment, I changed the package name to CRediTas, and consequently, the repository name. How is this affecting this issue in terms of links or other problems?

msperlin commented 1 year ago

Hi! I opened separate issues in the package repository. Is it fine if I report the changes there? Or should I do here?

I'm fine with the changes as issues.

BTW, following the first comment, I changed the package name to CRediTas, and consequently, the repository name. How is this affecting this issue in terms of links or other problems?

I'm not sure of the consequences. Perhaps you should edit the first message. Or, resubmit the package. @emilyriederer can you help?

emilyriederer commented 1 year ago

Thanks, @jospueyo ! I think if you update the issue title and the link in your first GItHub post, we should be all good

jospueyo commented 1 year ago

I addressed all comments of @msperlin. You can see all changes in news: https://github.com/jospueyo/CRediTas/blob/master/NEWS.md

msperlin commented 1 year ago

I addressed all comments of @msperlin. You can see all changes in news: https://github.com/jospueyo/CRediTas/blob/master/NEWS.md

Thanks @jospueyo. Great work. LEt me know if I can help any further.

ropensci-review-bot commented 1 year ago

:calendar: @zambujo you have 2 days left before the due date for your review (2023-04-04).

zambujo commented 1 year ago

Package Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

Documentation

The package includes all the following forms of documentation:

Functionality

Estimated hours spent reviewing: 5


Review Comments

CRediTas, which presents itself as a tiny R package, gathers a few functions designed to help authors in providing detailed information about the 14 contributor roles defined by CRediT. Essentially, the package provides a few functions to convert an author-contribution matrix in CRediT statements-like format. The matrix can be more easily shared and edited among the authors in a spreadsheet-like manner before producing the corresponding text with the authors and their contributions.

Although the previous review already significantly improved the package, I have a few additional suggestions (of which implementing non-important ones is left to the criteria of the the author):

writing/reading output files with write.csv2()/read.csv2() (and/or the readxl package) could be shown in the README and in a vignette. template_create() could be even shorter:

template_create <- function(authors, roles = roles_get()){
df <- data.frame(Authors = authors)
mat <- matrix(0, nrow = length(authors), ncol = length(roles))
colnames(mat) <- roles
return(cbind(df, mat))
}

In the long run, I would also think of adding a couple of extra features:

jospueyo commented 1 year ago

Responses to @zambujo:

jospueyo commented 1 year ago

For the long run suggestions, I will keep those in mind. I liked both ideas from @zambujo. The second one is especially interesting for epistemological research. I also have in mind an option to facilitate copy&paste in MS word, currently the bold is missed on the way to MS word.

Any contributions will be welcome! ;)

msperlin commented 1 year ago

Responses to @zambujo:

I agree.

ropensci-review-bot commented 1 year ago

:calendar: @msperlin you have 2 days left before the due date for your review (2023-04-06).

zambujo commented 1 year ago

Many thanks @jospueyo: great to see the changes.

If i/o functionality is to be kept, then I'd like to extend my suggestion of not setting file = NULL by default to template_create() and template_read() (replacing is.null(file) with missing(file)).

In template_create(), I'd also suggest passing file as the second parameter.

And to help beginners, it might be a good idea to include path nomalization with normalizePath(file).

Eg.:

template_create <- function(authors, file, roles = roles_get()) {
  df <- data.frame(Authors = authors)
  mat <- matrix(0, nrow = length(authors), ncol = length(roles))
  colnames(mat) <- roles
  df <- cbind(df, mat)
  if (is.missing(file)) return(df)

  file <- normalizePath(file)
  write.csv2(df, file, row.names = FALSE)
  invisible()
}

Last, consider updating the error message in cras_write.R, line 82. 😉

emilyriederer commented 1 year ago

@msperlin - It looks like you're satisfied with the responses to your feedback? If so, can you please document your approval with our {Final Approval Form](https://devguide.ropensci.org/approval2template.html) ?

(Same for @zambujo once you're satisfied with the discussion!)

msperlin commented 1 year ago

Reviewer Response

Final approval (post-review)

Estimated hours spent reviewing: 2