This project implements a package classifier based on its dimensions and mass, determining the appropriate dispatch stack.
Packages are categorized according to the following criteria:
- 🟢 STANDARD: Packages that are neither bulky nor heavy can be handled normally.
- 🟡 SPECIAL: Packages that are either bulky or heavy cannot be handled automatically.
- 🔴 REJECTED: Packages that are both bulky and heavy are rejected.
The classifier analyzes packages based on their dimensions (height, width, and length) and mass, determining the appropriate dispatch stack.
💡 Classification Rules:
- A package is bulky if its volume (width × height × length) is ≥ 1,000,000 cm³ or any of its dimensions is ≥ 150 cm.
- A package is heavy if its mass is ≥ 20 kg.
- A package is rejected if it is both bulky and heavy.
Run the following command in the project root folder:
python -m venv venv- Windows:
venv\Scripts\activate
- macOS/Linux:
source venv/bin/activate
Install all required dependencies from the requirements.txt file:
pip install -r requirements.txtExecute the test suite using Pytest:
pytest