Skip to content

Inventory report generator built with Python and tested with Pytest.

Notifications You must be signed in to change notification settings

garciaagui/inventory-report

Repository files navigation

Inventory Report 📦

🇧🇷 Clique aqui para acessar a versão em português.

Summary

  1. Description
  2. Technologies
  3. Features
  4. How to Run
  5. About Trybe
  6. Contact

Description

30th project of the Trybe Web Development course.

The Inventory Report is a Python project focused on generating simple and complete inventory reports from data stored in CSV, JSON, and XML files. In order to create an efficient and scalable system, Object-Oriented Programming concepts were applied, as well as design patterns such as Adapter, Strategy and Iterator.

ℹ️ I wrote tests for the functions implemented by Trybe. These tests can be found in the tests subdirectories.


Technologies

The project was developed in Python. The tests were written using Pytest and code quality was ensured using the Flake8 linter.

Python Pytest Flake8


Features

  • Import data from CSV, JSON, and XML files.
  • Generate simple and complete reports based on the imported data.

How to Run

To run the project locally, follow the steps below.

  1. Clone the repository.
git clone git@github.com:garciaagui/inventory-report.git
  1. Navigate to the root of the project.
cd inventory-report/
  1. Create the virtual environment.
python3 -m venv .venv
  1. Activate the virtual environment.
source .venv/bin/activate
  • Note that at the beginning of the terminal line there will be (.venv), as in the example below.
(.venv) gui@gui-desktop:~/Trybe/inventory-report$
  • To deactivate the virtual environment, run the command deactivate. Remember to activate it again when you return to the project.
  1. Install dependencies in the virtual environment.
python3 -m pip install -r dev-requirements.txt
  1. Run the command below to enable report generator.
pip install .
  1. Now, it's possible to generate the reports using the command pattern below.
inventory_report <input_file_path> <report_type>
  • Example:
inventory_report inventory_report/data/inventory.csv simple

  • Accepted values for report_type: simple, complete, colored.
ℹ️ For additional instructions, click here.
  • 🧪 To run all tests, execute the command below.
python3 -m pytest
  • 🧪 To run only one test file, follow the example below.
python3 -m pytest tests/product/test_product.py
  • 🧪 To run only one specific test, follow the example below.
python3 -m pytest -k test_create_product_sucessfully
  • If you wish to manually test directly in the modules where the functions were implemented, follow the example below.
python3 -m inventory_report.reports.simple_report

About Trybe

"Trybe is a future school for anyone who wants to improve their lives and build a successful career in technology, where the person only pays when they get a good job."

"The program features over 1,500 hours of online classes covering introduction to software development, front-end, back-end, computer science, software engineering, agile methodologies, and behavioral skills."


Contact

Project developed by Guilherme Garcia. Below are my social networks and means of contact. 🤘

Gmail Linkedin GitHub Instagram

Back to top

About

Inventory report generator built with Python and tested with Pytest.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages