Skip to content

Latest commit

 

History

History
87 lines (80 loc) · 2.27 KB

README.md

File metadata and controls

87 lines (80 loc) · 2.27 KB

Inventory Report 📝

Project Context 💡

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.

Acquired Knowledge 📖

In this project, I was able to:

  • Apply Oriented Objects Programming concepts in Python;
  • Apply design patterns;
  • Reading and writing files (XML, CSV, JSON).

Main Technologies 🧰

Python Pytest
python pytest

Running the application ⚙️

  1. Clone the repository and enter it
git clone [email protected]:ImVictorM/Inventory-Report.git && cd Inventory-Report
  1. Create the virtual environment
python3 -m venv .venv && source .venv/bin/activate
  1. Install the dependencies
python3 -m pip install -r dev-requirements.txt
  1. Install the main package
pip install .
  1. Choose the report type you want
  • report types: simples or completo
inventory_report {file_path} {report_type}

Example:

inventory_report inventory_report/data/inventory.csv simples

Testing 🛠️

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