Robot Challenge
An attempt at Robot Challenge.
# download and install python >=3.7 fromhttps://www.python.org/downloads/
# download source code using git
git clone https://github.com/sheecegardezi/RobotChallenge.git
cd RobotChallenge
# install create a virtual environment
python -m venv venv
# activate the virtual environment on Linux
source venv/bin/activate
# activate the virtual environment on windows
# source venv\Scripts\activate
# install the requirements
pip install -r requirements.txt
# install the software
pip install -e .
# run the tests
pytest --cov=robotchallenge -rx -s tests
robotchallenge --help
robotchallenge -f "`pwd`/tests/test_data/sample_problems.txt"
# Create a file with a new commond is each line eg. input_file.txt:
PLACE 1,2,EAST
MOVE
MOVE
LEFT
MOVE
REPORT
Output: 3,3,NORTH
# Run the software with the above file
robotchallenge -f "`pwd`/input_file.txt"
# clone repo
git clone https://github.com/sheecegardezi/RobotChallenge.git
cd RobotChallenge
# building image locally
docker build -t robotchallenge .
# printing help
docker run -it --rm robotchallenge -h
# using existing test file
docker run -it --rm robotchallenge -f "/app/tests/test_data/sample_problems.txt"
# using new test file
docker run -it --rm -v "`pwd`/tests/test_data/sample_problems.txt":"/app/tests/test_data/sample_problems.txt" robotchallenge -f "/app/tests/test_data/sample_problems.txt"
# pulling image from repo
docker image pull sheecegardezi/robotchallenge:latest
# printing help
docker run -it --rm sheecegardezi/robotchallenge:latest -h
# using existing test file
docker run -it --rm sheecegardezi/robotchallenge:latest -f "/app/tests/test_data/sample_problems.txt"
# using new test file
docker run -it --rm -v "`pwd`/tests/test_data/sample_problems.txt":"/app/tests/test_data/sample_problems.txt" sheecegardezi/robotchallenge:latest -f "/app/tests/test_data/sample_problems.txt"
pytest --cov=robotchallenge -rx -s tests