This is a requirement for CSC510 Software Engineering HW2,HW3,HW4,HW5 for Group 10
Implement the functionalities of this Lua code in Python. Basically this code will read and help store CSV data in an appropriate format. It also summarizes the data column wise and displays a few statistics.
- Sym
These are variable names that start with a lower case letter - Num
These are variable names that start with an upper case letter
- Num
- Sym
- Data
- Cols
- Row
- Read CSV
A csv function that reads each line of a text file, divides on some operator (e.g. comma), removes leading and trailing white space, then coerces the cells to ints, floats, booleans or (failing the rest) to strings. - CLI
It can update the predefined settings to a custom value - Help
Display the option for the CLI functioanlity using -h option - Generate Summary
- For Sym datatype-
- div = entropy = for symbols occurring at probability p1,p2,... then entropy defined by ∑ -pi * log2(pi).
- mid = mode which is the most common symbol
- For Num datatype-
- div = standard deviation = sort numbers, find 90th, 10th percentile, return (90th-10th)/2.56
- mid = median of all the numbers
- For Sym datatype-
- Install python 3.10.7 from here.
- Create working directory named Python_Summarizer
$ mkdir Python_Summarizer
- Clone this repository from here or use
$ git clone https://github.com/boscosylvester-john/se_hw_LuaToPython
- Install all the requirements using
$ cd Python_Summarizer $ pip install -r requirements.txt
- Test all the test files using
$ cd Python_Summarizer/tests $ python __init__.py
- Generate the coverage reports
$ cd Python_Summarizer/tests $ coverage run __init__.py
Module | statements | missing | excluded | coverage |
---|---|---|---|---|
src\Cols.py | 22 | 1 | 0 | 95% |
src\Data.py | 36 | 4 | 0 | 89% |
src\Num.py | 37 | 0 | 0 | 100% |
src\Row.py | 6 | 0 | 0 | 100% |
src\Sym.py | 28 | 0 | 0 | 100% |
src\Utils.py | 90 | 18 | 0 | 80% |
tests\__init__.py | 6 | 0 | 0 | 100% |
tests\test_cases.py | 56 | 1 | 0 | 98% |
tests\test_engine.py | 55 | 11 | 0 | 80% |
Total | 336 | 35 | 0 | 90% |
The basic mathemtical operations that this repo does are-
- Addition
- Subtraction
- Multiplication
- Division
- Python
- Github Desktop
- Git Bash
- VS Code
- Codecov
Please have a look at the guidelines before contributing.