Test environment setup

Create Anaconda environment (optional)

You may or may not want to create a separate environment in Anaconda. You can also use the base environment.

Follow the instructions to create a new Anaconda environment.

  1. Launch Anaconda navigator.
  2. Go to Environments (on the left) > Create (on the bottom).
  3. Give your environment a name.
  4. Select Python 3.x.
  5. Click Create.

Launch terminal within the environment

  1. Launch Anaconda navigator.
  2. Go to Environments (on the left).
  3. Click on the environment you will be using.
  4. Click on next to the environment after it is loaded.
  5. Choose Open Terminal.

Launch terminal within the environment (alternative)

  1. Launch a terminal.
  2. Run conda activate your-environment-name. Replace your-environment-name with the name of the environment you created.

Installation of packages

  1. You need to install two packages: fastapi and uvicorn.

  2. In the terminal with your environment activated, issue the following command

    conda install -c conda-forge fastapi uvicorn

Clone or download

  1. If you are familiar with git, clone the repository https://github.com/ricwtk/maze; else, download the repository and unzip the file.

  2. There is no specific location you need to put this folder at.

  3. You should have the following folder struture.

    maze docs mazes players static main.py README.md

Run the application

  1. Launch a terminal within the environment you will be using.
  2. Change directory cd to the folder that you have expanded or cloned the repository to.
  3. Execute the command uvicorn main:app --reload.
  4. Head to your browser and go to http://127.0.0.1:8000. If your terminal output shows a different port, use that port instead.
Last Updated: 4/27/2020, 4:37:55 PM