Skip to content
This repository was archived by the owner on Jul 14, 2021. It is now read-only.

Satook/paycalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install

This has been developed and tested against Python 3.7.3.

With the repo checked out, just run:

python setup.py install

Or to install in "developer mode", where the installed command references the checked out code, just run:

python setup.py develop

Example usage

Once installed, the command is paycalc-csv. Use the --help option to display help.

paycalc-csv reads from STDIN and writes to STDOUT. If your source data is in "people.csv" and you want the results to "slips.csv", just run

paycalc-csv < people.csv > slips.csv

If you source CSV has headers, add --skipfirst to the argument list to have paycalc-csv ignore the first line.

Note: The expected CSV dialect is excel format, which uses quoted strings, comma separators and \r\n for line endings. Both \r and \n on their own are accepted too.

Tests

Tests are just run using nose. In the repo root, just run

nosetests

To see code coverage:

nosetests --cover-html --cover-html-dir=cover --with-coverage --cover-package paycalc

This will print out a coverage summary and generate a set of html files that show coverage across all source code in a directory named cover.

Assumptions

  1. Will be run with an en_US or en_AU locale. Month names are expected in the correct format for the current locale.

  2. That all intermediary calculation can be performed at high (28 digit) precision but named values, e.g. gross income, tax, etc should be rounded before their use in further calculations.

About

CLI and libs for pay calculations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published