UBC-MDS / software-review-2021

1 stars 1 forks source link

Submission: NiceNumber (Python) #8

Closed jaymegordo closed 3 years ago

jaymegordo commented 3 years ago

Submitting Authors:

Package Name: NiceNumber One-Line Description of Package: NiceNumber is a package to convert numbers to concise human-readable strings. Repository Link: NiceNumber Version submitted: v0.2.5 Editor: TBD
Reviewer 1: TBD
Reviewer 2: TBD
Archive: TBD
Version accepted: TBD


Description

Large numbers can be difficult to display and hard for humans to comprehend/compare in their full form. NiceNumber simplifies the conversion of numbers to human-readable representaions with the use of multiple classes of suffixes, eg 1345948349 > '1.35B' or '1.35GB'. The package also has functions to convert from these strings back to raw numbers, convert entire columns of pandas dataframes, and colour-code sections of the number.

Scope

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

Technical checks

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

Publication options

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

P.S. *Have feedback/comments about our review process? Leave a comment here

Editor and Review Templates

Editor and review templates can be found here

hellosakshi commented 3 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:


Review Comments

  1. I am not able install the package. The error message was: You must give at least one requirement to install (see "pip help install").
  2. I am not able to open Contributors page. It's taking me to 404 page.
  3. I believe Metadata (** including author(s), author e-mail(s), a url, and any other relevant metadata) is missing.
  4. One Badges: "Release" is missing.
  5. I like the overall work. Specially good job including other packages with similar functions. This makes the purpose of the function much clearer to anyone reviewing the package.
jaymegordo commented 3 years ago

@hellosakshi I'm very sorry about the url, I removed the space from the link not realizing it was required... could you please install with: pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple nicenumber

and then import the package with: from nicenumber import nicenumber as nn

Thanks and sorry again about that!

shoebillm commented 3 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 hr


Review Comments

Overall, it is a very interesting package that does some essential data transformation work and it can be easily understood and used! I really like the idea that you group came up with: to convert the numbers from or to human-readable format, and this could be very useful in combination with other visualization packages!

*The release badge is broken and it might be better to remove it.

I have a few comments for your documents or functions (using your updated installation instruction, I was able to install the package):

  1. In your Features (from README.md),
    n = 1234.5
    nn.to_human(n=n, precision=1, family='number') 

    This example would not work as you stated to produce "1.2K", instead, it always produces "1K" no matter how I changed the precision argument. I went through your function file and found out the argument name was prec, and you might want to change it to precision .

Also, for this function,

n = -2
nn.to_human(n=n, precision=0, family='filesize')

It might be better to throw an error or warning message to the user when the converting a number to file size as it always has to be non-negative.

  1. In your Features (from README.md),
    
    from nicenumber import nicenumber as nn

df = pd.DataFrame(np.array([[1_000, 1_000_000], [1_000_000_000, 1_000_000_000_000]]), columns=['A', 'B'])

nn.to_pandas(df, columns=['A'], transform_type='human')


This example needs other dependencies to be installed (pandas and numpy), and you might want to include all dependencies to construct a fully reproducible example. In addition, this function does not produce a dataframe as claimed. I went through the function file and found out the argument name was `col_names`, so you might want to change either one for consistency purpose.

3. For the function `nn.to_to_numeric()`, when I tried to input the string as non-numeric values, the error message is a bit vague: `TypeError: 'NoneType' object is not subscriptable`. You might want to add an exception handling to say the string must be a valid number.

4. In your Features (from README.md), it would be more clear to include the "print" statement:
`print(nn.to_color(1234567, ['green', 'red', 'blue']))` as the output can only be colored numbers when you print them out.