UBC-MDS / software-review-2022

0 stars 0 forks source link

Submission Group 16: Ranimalsgonewild (R) #56

Open zjr-mds opened 2 years ago

zjr-mds commented 2 years ago

name: Ranimalsgonewild about: demonstrate basic features of text analysis while applying a humorous lens


Submitting Author Name: Junrong Zhu @zjr-mds, Morgan Rosenberg @morganrosenberg50, Kyle Maj @Kylemaj, Nagraj Rao @nrao944 Submitting Author Github Handle: Junrong Zhu @zjr-mds Other Package Authors Github handles: @morganrosenberg50, @Kylemaj, @nrao944 Repository: https://github.com/UBC-MDS/Ranimalsgonewild Version submitted: 1.0.0 Submission type: Standard Editor: Junrong Zhu @zjr-mds, Morgan Rosenberg @morganrosenberg50, Kyle Maj @Kylemaj, Nagraj Rao @nrao944 Reviewers: Shiva Jena, shiva Jena (@jena), Lynn Wu (@lynnwbl), Son Chau (@SonQBChau), Zack Tang (@zackt113)


Package: Ranimalsgonewild
Title: Animal themed text filters
Version: 0.0.0.9000
Authors@R: 
    person("Kyle", "Maj", , "kyle.maj@gmail.com", role = c("aut", "cre"))
    person("Junrong", "Zhu", , "Junrong.Zhu@gmail.com", role = c("aut", "cre"))
    person("Nagraj", "Rao", , "Nagraj.Rao@gmail.com", role = c("aut", "cre"))
    person("Morgan", "Rosenberg", , "Morgan.Rosenberg@gmail.com", role = c("aut", "cre"))
Description: This package is designed to demonstrate how basic features of text
  analysis can be utilized to analyze and represent a text file or string while 
  applying a humorous lens (because what is data science without a dash of 
  humour!). It counts the number of words from a text, calculates the average word
  length of that text, and returns an animal image corresponding to the average
  word length. It subsequently transforms the text into a wordcloud in the 
  shape of the animal. We have included a bonus fourth function for fun, inspired 
  by the popular childhood game - MadLibs.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
Config/testthat/edition: 3
Imports: 
    stringr,
    graphics,
    grDevices,
    imager,
    png,
    RCurl,
    XML,
    htm2txt,
    wordcloud2 (>= 0.2.2),
    tm (>= 0.7.8),
    SnowballC,
    wordcloud,
    testthat
Remotes: 
    lchiffon/wordcloud2
Suggests: 
    covr

Scope

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

lynnwbl commented 2 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

Estimated hours spent reviewing: 1.5 hours


Review Comments

Overall great work! Here are some of my comments:

  1. The wordCloud function does not seem to produce an animal-shaped image. I have tried inputting different links and got a square-shaped image in each run. image

  2. The output images do not seem to display in the Usage section of the vignette: https://ubc-mds.github.io/Ranimalsgonewild/articles/ranimalgonewild-vignette.html image

  3. In the function textTransformer, three lines of code are repeated, it might be a typo: image

  4. I like how you have added comment lines for wordCloud, it might be a good idea to also include some comment lines for the other three functions.

  5. Minor: In README, the font for Contributors looks much larger than the other section titles.

Please let me know if you have any questions. Thank you!

zjr-mds commented 2 years ago

@lynnwbl Hello Lynn, thank you for the awesome feedback! And yes, the wordcloud in R package is a bit different from the python package that it can’t produce an animal shaped wordcloud but we’re happy that Rstudio is able to generate a wordcloud based on word counts. Also, good eyes! Thanks for catching the img rendering issue, and duplicate code 🙌

SonQBChau commented 2 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

Estimated hours spent reviewing:


Review Comments

  1. textTransformer has a bug that it would combine the word with punctuation marks. For example:

    > text = "Your chances of being ambushed by a duck are low... but never zero!"
    > textTransformer(text)
    [1] "Your chances of being ambushed by a duck are horse but never zero!"

    The above text should only replace low with horse, not low...

  2. textTransformer description doesn't match the function parameters. The function doesn't actually take a species name but an integer. From the readme:

    This function takes a sequence of text(character) and a species(character), and randomly replaces a set number of words with a random animal.

    From the function:

    #' @param text String Character
    # ' @param num_words Integer
  3. If your function have optional parameter(s), I suggest to include it in the README. For example, the usage of textTransformer should have both textTransformer(text) and textTransformer(text, int)

  4. animalClassifier throws an error when passing empty value:

    > animalClassifier("")
    Error in if (ratio <= 0.4) { : missing value where TRUE/FALSE needed

    I suggest trying to catch it in the function and printing out the message to the user

  5. animalType there is no check if the user enter none of "Duck", "Monkey", "Giraffe", "Whale"

zackt113 commented 2 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

Estimated hours spent reviewing:


Review Comments

Same as Python one, great and interesting work!

Here's something that could be improved on:

  1. The documentation cannot render those interesting pictures for both animalType and wordCloud functions. Without seeing those pictures, users may not be able to know what's the functionality of those two functions.
  2. It would be great if you guys can keep working on the CodeCov to push it to 100% as sometimes some lines may not work and developers could not discover it.
  3. This is a quite big picture comment. Since this is a package; so, I think it would be great if all functions are serving towards a mutual goal. Now, every function is working for its unique functionality. But overall, I don't see how those four functions could be incorporated together into one package. I think it would be clearer if functions in the same package serve similar functionality.
  4. In the documentation, the function did not provide any details on each parameter except for the data type. As a user, I felt lost as I didn't understand the meaning of the parameter. For example, num_words in textTransformer function, I don't know how this parameter works in this function.
  5. And last minor suggestion on workflow. It would be better if the branch name could be more meaningful. As of now, I could see some branches were named as group members' names. It would be clearer if the branch name become more related to the work. For example, feature/documentation, etc.

Overall, great works! Thanks for creating such a fun package.

Best, Zack

shivajena commented 2 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

Estimated hours spent reviewing: 1 hr


Review Comments

Great work team 16, it was really fun working out this function in R. I have one suggestion:

  1. I understand that there are some differences between python and R in shaping the word cloud into an animal. This is a common issue with wordcloud2 which is used in your function, and can explore forums on this to resolve.