This project is a report generator that receives input files path containing stock data and outputs a report about those data in a simple or complete format. Supported files type: CSV, JSON, XML.
In this project, I was able to:
- Apply Oriented Objects Programming concepts in Python;
- Apply design patterns;
- Reading and writing files (XML, CSV, JSON).
Python | Pytest |
---|---|
- Clone the repository and enter it
git clone git@github.com:ImVictorM/Inventory-Report.git && cd Inventory-Report
- Create the virtual environment
python3 -m venv .venv && source .venv/bin/activate
- Install the dependencies
python3 -m pip install -r dev-requirements.txt
- Install the main package
pip install .
- Choose the report type you want
- report types:
simples
orcompleto
inventory_report {file_path} {report_type}
Example:
inventory_report inventory_report/data/inventory.csv simples
To run all tests:
python3 -m pytest
Running only one test file:
python3 -m pytest {test_file_path}.py
Test using docker-compose:
docker-compose run --rm inventory pytest