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