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

linelist full package review #103

Merged
merged 8 commits into from
Feb 13, 2024
Merged

linelist full package review #103

merged 8 commits into from
Feb 13, 2024

Conversation

Bisaloo
Copy link
Member

@Bisaloo Bisaloo commented Feb 5, 2024

@Bisaloo Bisaloo added this to the linelist 1.1.0 milestone Feb 5, 2024
Copy link
Member

@chartgerink chartgerink left a comment

Choose a reason for hiding this comment

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

Overall a really solid package. Happy to approve this!

I only left comments and questions for your consideration, and for future discussion.

  1. The package supports data.frame and tibble. As I understand it, data.table is also getting quite popular. Any thoughts on whether we want to include this in the future?
  2. The function naming can be slightly confusing at times.
  • For example, tags_names and tags_defaults for some reason feel odd as they have a double plural. Here I keep typing tag_names and tag_defaults myself.
  • Another example is lost_tags_action which is past tense and might be more literal by being active and present - e.g., lose_tags_action or losing_tags_action
  1. Do we want to have the discussion around object or column tagging here or park it for later, when the code is abstracted into a separate package? I don't know how important or needed the tag viewer is, proportional to the work that is needed and am raising it here because it seems relevant to the full package review domain.
  2. There are a few for loops in the code which might be candidates for rewrite using apply or a variant of it. I find for loops more readable myself, but I've come to learn that it's more common to write these functions instead.

I am still catching up on some of the ways the operators are defined for classes in R (e.g., [[<-.linelist <- function`) so those were a bit harder to review at this time.

CITATION.cff Outdated Show resolved Hide resolved
DESCRIPTION Outdated Show resolved Hide resolved
DESCRIPTION Outdated Show resolved Hide resolved
LICENSE Outdated Show resolved Hide resolved
LICENSE.md Outdated Show resolved Hide resolved
R/linelist-package.R Outdated Show resolved Hide resolved
tests/testthat/test-compat-dplyr.R Outdated Show resolved Hide resolved
R/linelist-package.R Outdated Show resolved Hide resolved
R/zzz.R Outdated Show resolved Hide resolved
R/make_linelist.R Outdated Show resolved Hide resolved
@Bisaloo
Copy link
Member Author

Bisaloo commented Feb 13, 2024

Overall a really solid package. Happy to approve this!

Thanks for the comments!

  1. The package supports data.frame and tibble. As I understand it, data.table is also getting quite popular. Any thoughts on whether we want to include this in the future?

Probably not. Its interface differs too much from standard data.frames and it would be extremely challenging to make it fit in our framework and cover all edge cases.

  1. The function naming can be slightly confusing at times.

No super strong opinions on this and renaming some of these functions could be done while extracting & generalizing the tagging functionality

  1. Do we want to have the discussion around object or column tagging here or park it for later, when the code is abstracted into a separate package? I don't know how important or needed the tag viewer is, proportional to the work that is needed and am raising it here because it seems relevant to the full package review domain.

There are some useful elements in epiverse-trace/datatagr#32 but agreed this is a discussion for 2.0.0

  1. There are a few for loops in the code which might be candidates for rewrite using apply or a variant of it. I find for loops more readable myself, but I've come to learn that it's more common to write these functions instead.

This blog post will hopefully convince you to give apply and its variant more love: https://epiverse-trace.github.io/posts/for-vs-apply/. 😉

This issue is now tracked in #105.

@Bisaloo Bisaloo changed the base branch from empty to main February 13, 2024 18:41
@Bisaloo Bisaloo marked this pull request as ready for review February 13, 2024 19:07
@Bisaloo Bisaloo merged commit bbcecf0 into main Feb 13, 2024
10 checks passed
@Bisaloo Bisaloo deleted the review branch February 13, 2024 19:08
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.

2 participants