Module to calculate shipment price for a given transaction and history.
- Python 3.12.0 (no dependencies)
- Docker
-
Clone the project
git clone https://github.com/israel-meiresonne/shipment-discount-calculator.git
-
Change your directory to the source code
cd ./shipment-discount-calculator/src
-
Run the Python main code
python main.py input.txt
-
Run the Python tests
python test.py
-
Clone the project
git clone https://github.com/israel-meiresonne/shipment-discount-calculator.git
-
Change your directory to the cloned project
cd ./shipment-discount-calculator
-
Start Python service from Docker-compose
docker-compose up python-3.12.0 -d
-
Run the Python main code
docker exec python-shipment python main.py input.txt
-
Run the Python tests
docker exec python-shipment python test.py
-
Shut down the Python service (optional)
docker-compose down python-3.12.0
-
Destroy the Python image used by Docker (optional)
docker image rm shipment-discount-calculator-python-3.12.0