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

utils.py and test_utils.py need better coverage and cleanup. #506

Closed
kdexd opened this issue Mar 5, 2016 · 3 comments
Closed

utils.py and test_utils.py need better coverage and cleanup. #506

kdexd opened this issue Mar 5, 2016 · 3 comments

Comments

@kdexd
Copy link

kdexd commented Mar 5, 2016

  • The file tardis/utils.py holds frequently used methods, which are used throughout the code base to perform small tasks repeatedly - such as formatting element symbols, obtaining tuples of (atomic symbol, atomic number) etc.. Also, utils.py contains declarations of custom exceptions raised at certain moments when required.
  • Coverage and brief documentation of this module is important. There are certain untested methods and untested custom defined Exceptions. Unit tests are required.
  • As of 05 March 2016, the day when issue was opened, the code coverage of tardis/util.py stands at 56.99% with only 110/193 relevant lines covered.
@unoebauer
Copy link
Contributor

This file looks like a loose collection of tools which may have been at a certain point relevant. In the process of cleaning-up this, we should check what parts are actually still relevant.

After a quick inspection, for example, I noticed that utility functions to convert between arabic and roman numerals. There is already a python package available for this task, if we still need it.

@kdexd
Copy link
Author

kdexd commented Mar 30, 2016

@unoebauer My point has been that for one or two simple methods, we can save TARDIS from an added dependency, such trivial utilities consume hardly few lines of code and easy to maintain due to corresponding tests. Nevertheless, I wrote tests some time ago, following the general guidance to all GSoC applicants to show coding practice by picking an untested method and writing test for it.

Since this issue has been raised, we can do a cleanup - as there is a famous saying, "Every line of code is more a liability than an asset."

@unoebauer
Copy link
Contributor

The relevant PR was merged last week - closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants