The following commands are all ment to be executed in the root directory of the project.
For example, the hangman.py script
source ../.venv/bin/activate # if not already activated
export PYTHONPATH=$(pwd)
python server/py/hangman.py
source ../.venv/bin/activate # if not already activated
export PYTHONPATH=$(pwd)
python benchmark/benchmark_hangman.py python hangman.Hangman # or battleship.Battleship
source ../.venv/bin/activate # if not already activated
uvicorn server.py.main:app --reload
Open up your browser and go to http://localhost:8000
For example, the hangman.py script
"../.venv\Scripts\activate" # if not already activated
set PYTHONPATH=%cd%
python server/py/hangman.py
"../.venv\Scripts\activate" # if not already activated
set PYTHONPATH=%cd%
python benchmark/benchmark_hangman.py python hangman.Hangman # or battleship.Battleship
"../.venv\Scripts\activate" # if not already activated
uvicorn server.py.main:app --reload
start chrome http://localhost:8000
python benchmark/benchmark_dog.py python dog.Dog
python test/test_dog.py
The Benchmark File benchmark_dog.py
contains many helper functions which need to be copied to the test file test_dog.py
to pass some of the tests.
Helper functions are marked with the comment # helper functions our code needs to run
at the end of the file.