UBC-MDS / software-review-2022

0 stars 0 forks source link

Submission Group 10: candacovidmetrics (Python) #16

Open adammorphy opened 2 years ago

adammorphy commented 2 years ago

Submitting Author: Name @adammorphy Package Name: CanadaCovidMetrics One-Line Description of Package: Return up to date covid-19 data in Canada in usable Pandas DataFrames Repository Link: https://github.com/UBC-MDS/canadacovidmetrics Version submitted:  v1.1.0 Editor: TBD Reviewer 1: Cuthbert Chow @cuthchow, Reviewer 2: Francisco Mejia @RamiroMejia Reviewer 3: Margot Vore @voremargot Reviewer 4: Thomas Siu @thomassiu Archive: TBD Version accepted: TBD

Description

Scope

* Please fill out a pre-submission inquiry before submitting a data visualization package. For more info, see notes on categories of our guidebook.

-  Who is the target audience and what are scientific applications of this package? 

Our package is intended to speed up the proccess of communicating covid information in Canada, and therefore is targeted to science communicators, doctors, data scientists, and others who share covid data.

-   Are there other Python packages that accomplish the same thing? If so, how does yours differ?

Existing packages use other APIs which do not update the data consistently, and are not targeted for Canadian data (ex. John Hopkins University API). To our knowledge, no other package exists using OpenCovid API in the Python ecosystem

Technical checks

For details about the pyOpenSci packaging requirements, see our packaging guide. Confirm each of the following by checking the box.  This package:

JOSS Checks - [ ] The package has an **obvious research application** according to JOSS's definition in their [submission requirements][JossSubmissionRequirements]. Be aware that completing the pyOpenSci review process **does not** guarantee acceptance to JOSS. Be sure to read their submission requirements (linked above) if you are interested in submitting to JOSS. - [ ] The package is not a "minor utility" as defined by JOSS's [submission requirements][JossSubmissionRequirements]: "Minor ‘utility’ packages, including ‘thin’ API clients, are not acceptable." pyOpenSci welcomes these packages under "Data Retrieval", but JOSS has slightly different criteria. - [ ] The package contains a `paper.md` matching [JOSS's requirements][JossPaperRequirements] with a high-level description in the package root or in `inst/`. - [ ] The package is deposited in a long-term repository with the DOI: *Note: Do not submit your package separately to JOSS*

Are you OK with Reviewers Submitting Issues and/or pull requests to your Repo Directly?

This option will allow reviewers to open smaller issues that can then be linked to PR's rather than submitting a more dense text based review. It will also allow you to demonstrate addressing the issue via PR links.

Code of conduct

RamiroMejia 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:

Readme requirements The package meets the readme requirements below:

The README should include, from top to bottom:

Usability

Reviewers are encouraged to submit suggestions (or pull requests) that will improve the usability of the package as a whole. Package structure should follow general community best-practices. In general please consider:

Functionality

For packages co-submitting to JOSS

Note: Be sure to check this carefully, as JOSS's submission requirements and scope differ from pyOpenSci's in terms of what types of packages are accepted.

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

Final approval (post-review)

Estimated hours spent reviewing:

1.5 hours

Review Comments

Hello Group 10 members,

Congratulations, you did a great job on your package.

Overall, your repo is well organized, everything is easy to find and your package complies with all the requirements asked in the Milestones.

I have the following comments about your package:

  1. I found some inconsistencies in the Usage & Example section of your README file and in the published documentation. The examples for National vaccination completion in 2021 and for Daily new case count by province are not running correctly because of the name of the 'date' column produced by the query.

  2. In the published documentation, the code is running a Module not Found error in the examples section.

  3. The main functionality of the package is the query of data, so, it would be relevant to show the output datasets (a few rows of data). I think it would be great if you can show more examples on how to query data using different arguments like date or location

  4. You can make your functions more robust by adding exception handling for the argument after. If I enter an invalid date E.g "2000-01-01" or "2019-12-31" we should expect an error message to let the user know the date does not make sense or there is no data for those dates.

  5. I tried to retrieve the deaths from "2020-01-01" to "2020-03-01", it seems like there is no data for those dates, this is an expected outcome because it was the start of the pandemic. However, the error that the function shows is a "KeyError", this could be confusing because the date format entered is correct. You can try to add some exception handling for those dates that do not have data.

thomassiu 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:

Readme requirements The package meets the readme requirements below:

The README should include, from top to bottom:

Usability

Reviewers are encouraged to submit suggestions (or pull requests) that will improve the usability of the package as a whole. Package structure should follow general community best-practices. In general please consider:

Functionality

For packages co-submitting to JOSS

Note: Be sure to check this carefully, as JOSS's submission requirements and scope differ from pyOpenSci's in terms of what types of packages are accepted.

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

Final approval (post-review)

Estimated hours spent reviewing:

1.5 hours

Review Comments

Hi Group 10,

Congratulations and well done on developing the package! All the contents are well organized, and clear examples are provided in the readme which is really great. The 100% code coverage is really an exceptional job!

Here are some of the comments for your considerations to improve. Note that I created a new conda environment with only python 3.9 installed for the test.

  1. It would be great if you include package dependencies in README so that the users can install it along with this package. For example, when I run the installation and the first example, I realized that matplotlib is required.
  2. In the second function, I was not able to run it successfully with error KeyError: 'date_vaccine_completed'. I also found that the test case does not check against this column (line #119) in test_canadacovidmetrics.py
  3. Similarly, in the example of ccm.get_cases(), the code ccm.get_cases().set_index('date_report') throws error of "None of ['date_report'] are in the columns".
  4. It would be great if examples of get_recoveries is added back to readme examples
  5. To make the function more robust, you may consider adding a check that before must be smaller or equal to after, instead of throwing Key error.

Once again, congratulations team on the nice work!

cuthchow 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:

Readme requirements The package meets the readme requirements below:

The README should include, from top to bottom:

Usability

Reviewers are encouraged to submit suggestions (or pull requests) that will improve the usability of the package as a whole. Package structure should follow general community best-practices. In general please consider:

Functionality

For packages co-submitting to JOSS

Note: Be sure to check this carefully, as JOSS's submission requirements and scope differ from pyOpenSci's in terms of what types of packages are accepted.

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

Final approval (post-review)

Estimated hours spent reviewing: 1 hour

Review Comments

Hi Group 10 members,

Excellent work on the canadacovidmetrics package! Generally, the package is well produced and well documented, and it was easier to install the software for myself to use and explore. However, I just have some several specific remarks which you may want to consider for future improvements to this Python package:

  1. Rather than including all the functions in a single python script, such that they all have to be accessed under the same namespace, it may be better to write a separate python script for each function. For example, such that it would be possible to import the functions like from canadacovidmetrics.get_vaccinations import get_vaccinations.
  2. For the examples which utilised datetimes as arguments (e.g get_deaths), it may be more ideal to abstract the use of the functions from dt away from the user, and allow more simple arguments where they can simply specify a start/end date and then directly specify the number of days before or after than date as an integer.
  3. The README appears to be missing a usage/example for the get_recoveries() function, which may be helpful to some users
  4. I have tried running all the code in the Usage & Examples section, and the code related to plotting the get_vaccinations() data does not seem to work, and currently throws an error.
  5. Seeing as the functions have quite a lot of overlapping use (ie, they are all for acquiring covid data concerning different metrics), it may be more user friendly to bundle them into a single function, with an additional argument to specify which metric (deaths, vaccinations, cases) to return, and instead add other functions for things such as plotting the output.
voremargot 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:

Readme requirements The package meets the readme requirements below:

The README should include, from top to bottom:

Usability

Reviewers are encouraged to submit suggestions (or pull requests) that will improve the usability of the package as a whole. Package structure should follow general community best-practices. In general please consider:

Functionality

Final approval (post-review)

Estimated hours spent reviewing: 1hr


Review Comments

You did a good job with your package. While it is simple it makes the task of getting covid data easy and efficient. Below you will see some suggestions to improve your model in future releases!