ropensci / software-review

rOpenSci Software Peer Review.
290 stars 104 forks source link

Submission: readODS #386

Closed chainsawriot closed 2 years ago

chainsawriot commented 4 years ago

Date accepted: 2022-06-24 Submitting Author Name: Chung-hong Chan Submitting Author Github Handle: !--author1-->@chainsawriot<!--end-author1-- Repository: https://github.com/chainsawriot/readODS Version submitted: 1.7.0 Editor: !--editor-->@noamross<!--end-editor-- Reviewers: @emmamendelsohn, @adamhsparks

Due date for @emmamendelsohn: 2020-08-11 Due date for @adamhsparks: 2020-08-11

Archive: TBD
Version accepted: TBD


Package: readODS
Type: Package
Title: Read and Write ODS Files
Version: 1.7.0
Date: 2020-06-22
Author: Gerrit-Jan Schutten, Chung-hong Chan, Thomas J. Leeper, John Foster,  and other contributors
Maintainer: Chung-hong Chan <chainsawtiney@gmail.com>
Contact: https://github.com/chainsawriot/readODS/
Description: Import ODS (OpenDocument Spreadsheet) into R as a data frame. Also support writing data frame into ODS file.
Imports:
    xml2 (>= 1.3.2),
    cellranger,
    readr (>= 1.2.1),
    stringi,
    utils
Suggests:
    dplyr,
    testthat,
    datasets,
    covr,
    knitr,
    rmarkdown
License: GPL-3
RoxygenNote: 7.1.0
Roxygen: list(markdown = TRUE)
VignetteBuilder: knitr

Scope

This package reads and writes OpenDocument Spreadsheet (ods) files.

Researchers working with ods files

No

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

JOSS Options - [ ] The package has an **obvious research application** according to [JOSS's definition](https://joss.readthedocs.io/en/latest/submitting.html#submission-requirements). - [ ] The package contains a `paper.md` matching [JOSS's requirements](https://joss.readthedocs.io/en/latest/submitting.html#what-should-my-paper-contain) with a high-level description in the package root or in `inst/`. - [ ] The package is deposited in a long-term repository with the DOI: - (*Do not submit your package separately to JOSS*)
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

geanders commented 4 years ago

@chainsawriot : Thank you very much for your submission! @noamross will be your editor for the peer review process.

noamross commented 4 years ago

Hello @chainsawriot, thanks for your submission!

Editor checks:


Editor comments

Here is the output of goodpractice::gp() with my comments. These are small but should be addressed in revision (they can wait until after reviews if you choose), and can be used by reviewers as entry points to the code. I am now seeking reviewers.

── GP readODS ────────────────────────────────────

It is good practice to

  ✖ write unit tests for all functions, and all package code  # Good coverage! 93% is fine.
    in general. 93% of code lines are covered by test cases.

    R/readODS.R:31:NA
    R/readODS.R:32:NA
    R/readODS.R:44:NA
    R/readODS.R:47:NA
    R/readODS.R:93:NA
    ... and 9 more lines

  ✖ omit "Date" in DESCRIPTION. It is not required and it
    gets invalid quite often. A build date will be added to the package
    when you perform `R CMD build` on it.
  ✖ add a "URL" field to DESCRIPTION. It helps users find
    information about your package online. If your package does not
    have a homepage, add an URL to GitHub, or the CRAN package package
    page.
  ✖ add a "BugReports" field to DESCRIPTION, and point it to
    a bug tracker. Many online code hosting services provide bug
    trackers for free, https://github.com, https://gitlab.com, etc.
  ✖ use '<-' for assignment instead of '='. '<-' is the
    standard, and R users and developers are used it and it is easier
    to read your code for them if you use '<-'.

    tests/testthat/test_legacy.R:16:9
    tests/testthat/test_legacy.R:21:9
    tests/testthat/test_legacy.R:24:9
    tests/testthat/test_legacy.R:26:9
    tests/testthat/test_legacy.R:28:9
    ... and 21 more lines

  ✖ avoid long code lines, it is bad for readability. Also,        # Some long lines are OK. In a few cases here they're indicative of a place where a utility functions might make nested code more readable .
    many people prefer editor windows that are about 80 characters
    wide. Try make your lines shorter than 80 characters

    R/readODS.R:28:1
    R/readODS.R:60:1
    R/readODS.R:66:1
    R/readODS.R:75:1
    R/readODS.R:76:1
    ... and 85 more lines

  ✖ avoid calling setwd(), it changes the global environment.
    If you need it, consider using on.exit() to restore the working   # You do! so this is fine.
    directory.

    R/writeODS.R:48:13
    R/writeODS.R:49:5
    R/writeODS.R:51:5

  ✖ avoid sapply(), it is not type safe. It might return a
    vector, or a list, depending on the input data. Consider using
    vapply() instead.

    R/readODS.R:153:26
    R/readODS.R:154:26
    R/readODS.R:184:24
    R/readODS.R:202:10
    R/readODS.R:310:12
    ... and 2 more lines

  ✖ avoid 1:length(...), 1:nrow(...), 1:ncol(...),
    1:NROW(...) and 1:NCOL(...) expressions. They are error prone and
    result 1:0 if the expression on the right hand side is zero. Use
    seq_len() or seq_along() instead.

    R/readODS.R:20:12
    R/readODS.R:143:88
    tests/testthat/test_write_ods_append_update.R:33:43
    tests/testthat/test_write_ods_append_update.R:34:40
    tests/testthat/test_write_ods_append_update.R:68:49
    ... and 2 more lines

─────────────────────────────────────

Reviewer 1: @emmamendelsohn Reviewer 2: @adamhsparks Due date: 2020-08-11

noamross commented 4 years ago

Thanks @emmamendelsohn and @adamhsparks for agreeing to review! Due date: 2020-08-11.

adamhsparks commented 4 years 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:

For packages co-submitting to JOSS

The package contains a paper.md matching JOSS's requirements with:

  • [ ] A short summary describing the high-level functionality of the software
  • [ ] Authors: A list of authors with their affiliations
  • [ ] A statement of need clearly stating problems the software is designed to solve and its target audience.
  • [ ] References: with DOIs for all those that have one (e.g. papers, datasets, software).

Functionality

Final approval (post-review)

Estimated hours spent reviewing: 5


Review Comments

It's good to see the ODS format getting some attention like MS Excel's proprietary formats in R. While ODS files may not be used as much, I still think it's important to support this file format.

I appreciate the simplicity of the package. It does two things and it does them well. A good UNIX philosophy. This will help keep the package maintainable into the future and help rio maintenance as well, I'm sure.

There are some areas that need to be addressed before it can be accepted into rOpenSci's software community though.

Following are my comments on what I'd like to see changed and what needs to be fixed for inclusion.

Documentation

Vignettes
Function Documentation (and Other)
Community Guidelines
General Comments on Code

Functionality

Installation

Installs as expected with no issues.

Functionality
Performance
Automated Tests
Packaging Guidelines
emmamendelsohn commented 4 years ago

Heads up I will have my review posted tomorrow!

emmamendelsohn commented 4 years 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

Final approval (post-review)

Estimated hours spent reviewing: 5


Review Comments

Well done--nice and simple! The code was easy to follow and review. I only have a few comments to add to what has already been mentioned.

Documentation

Functionality

noamross commented 3 years ago

@chainsawriot Just following up here, please let us know when you've been able to address the reviews from @adamhsparks and @emmamendelsohn. (Thanks to both of you!)

chainsawriot commented 3 years ago

@noamross

First of all, I would like to thank both @adamhsparks and @emmamendelsohn for their insightful comments.

I am really sorry that I didn't aware of the 2 weeks responding window as specified in 7.3. Although it is now overdue, may I still ask for an extension? I will submit a revised version of the package by the end of this month.

Thank you very much.

noamross commented 3 years ago

That's fine, @chainsawriot. We're all doing our best and are trying to be accommodating with schedules this challenging year.

noamross commented 3 years ago

Hi @chainsawriot, I just wanted to follow up to see when you expect to be able to move forward.

noamross commented 3 years ago

Hello, @chainsawriot. I am putting a "holding" label on this. Do let us know if and when you intend to return to it.

chainsawriot commented 2 years ago

Hello, I've managed to update readODS according to the reviewers' comments. Sorry for the super long delay.

May I first address @emmamendelsohn comments?

Documentation

The usage of list_ods_sheets() is added.

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/vignettes/overview.Rmd#L89-L94

The documentation is revised as suggested.

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/readODS.R#L255-L256

Functionality

This one is tricky because the XML content in an ODS file can also record the empty lines after the "actual content". I've tried many ways to detect those empty lines but the detection is not straightforward. I took a simple solution: don't test whether skip is further than the "actual content". Instead, return an empty data frame when skip goes into any empty area (instead of ignoring skip and returning the entire data frame; which is not quite natural anyway). This new behavior is made explicit in the documentation. It could create breakage, but I think most users would not use skip for skipping lines at the very end but at the very beginning.

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/readODS.R#L257

Exporting tibble is a planned feature of the v2.0 of readODS. In that release, it is planned to use tibble's .name_repair option. I took the liberty of your "Not required" and defer this to the planned v2.0.

chainsawriot commented 2 years ago

@adamhsparks 's comments

Vignettes

I've made it explicit that PlantGrowth is from datasets

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/vignettes/overview.Rmd#L25

As suggested.

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/vignettes/overview.Rmd#L25

Function Documentation (and Other)

A package-level help file is added

https://github.com/chainsawriot/readODS/blob/master/man/readODS-package.Rd

Some examples are now included in the helpfile documentation for read_ods() and write_ods()

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/readODS.R#L268-L276

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/writeODS.R#L82-L88

All e-mail addresses are fixed.

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/writeODS.R#L81

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/readODS.R#L324

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/readODS.R#L267

Revised as suggested.

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/writeODS.R#L80

Revised as suggested

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/readODS.R#L254

(Sorry for the embarrassing typo) It has been corrected throughout the documentation.

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/readODS.R#L309

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/readODS.R#L336

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/readODS.R#L355

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/writeODS.R#L79

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/writeODS.R#L92

Thanks, @mmahmoudian for the PR 8dff1603c9154187562ae09402363307c363d97b

Revised as suggested

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/readODS.R#L245

Community Guidelines

BugsReports field is added to DESCRIPTION

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/DESCRIPTION#L9

Contribution guidelines are added to the README.

https://github.com/chainsawriot/readODS/blame/master/README.md#L211

General Comments on Code

All instances of sapply() are replaced by their brothers and sisters from purrr. All 1:length() instances are replaced by seq or seq_len accordingly.

The encoding for roxy2 is made explicit.

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/DESCRIPTION#L27

The missing path is now checked.

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/readODS.R#L280-L282

Yes, it should be replaced by a simple tempdir().

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/R/writeODS.R#L101

All stop() instances are modified with call. = FALSE

Installation

Functionality

Performance

I address the performance issue by stating in the README about the non-optimized performance. Also, alternatives (such as using headless Libreoffice) are suggested.

https://github.com/chainsawriot/readODS/blame/master/README.md#L168

Automated Tests

Packaging Guidelines

Due to contributions from different contributors who use different styles, the programming style in the codebase was mixed. The whole package is now using the consistent style of "<-".

The package is now checked with GHA for release, oldrel and devel.

https://github.com/chainsawriot/readODS/blob/cfd484e1baf1c8da9013d48fa9fb7f150adb3bc9/.github/workflows/R-CMD-check.yaml#L21-L25

chainsawriot commented 2 years ago

@noamross Once again, I am really sorry for the great delay. Please let me know what I should do next. Thank you very much!

chainsawriot commented 2 years ago

@noamross I was wondering will there be any update on this?

noamross commented 2 years ago

Hi @chainsawriot, sorry that this slipped through the cracks. @adamhsparks and @emmamendelsohn, please respond to let us know whether the changes address all your concerns.

adamhsparks commented 2 years ago

@noamross, @chainsawriot, I'm happy with the changes

emmamendelsohn commented 2 years ago

Everything looks good from my end as well. @chainsawriot @noamross

noamross commented 2 years ago

@ropensci-review-bot approve readODS

ropensci-review-bot commented 2 years ago

Approved! Thanks @chainsawriot for submitting and @emmamendelsohn, @adamhsparks for your reviews! :grin:

To-dos:

Should you want to acknowledge your reviewers in your package DESCRIPTION, you can do so by making them "rev"-type contributors in the Authors@R field (with their consent).

Welcome aboard! We'd love to host a post about your package - either a short introduction to it with an example for a technical audience or a longer post with some narrative about its development or something you learned, and an example of its use for a broader readership. If you are interested, consult the blog guide, and tag @ropensci/blog-editors in your reply. She will get in touch about timing and can answer any questions.

We maintain an online book with our best practice and tips, this chapter starts the 3d section that's about guidance for after onboarding (with advice on releases, package marketing, GitHub grooming); the guide also feature CRAN gotchas. Please tell us what could be improved.

Last but not least, you can volunteer as a reviewer via filling a short form.

chainsawriot commented 2 years ago

@ropensci-review-bot finalize transfer of readODS

ropensci-review-bot commented 2 years ago

Transfer completed. The readODS team is now owner of the repository and the author has been invited to the team