From ed870f84c7f4804c1fae97e685d6234fa6340fcd Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Wed, 30 Jun 2021 16:53:25 -0400 Subject: [PATCH] Add virtual environment and how to run notes --- docs-src/api/Installation.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/docs-src/api/Installation.md b/docs-src/api/Installation.md index f04d7ed..ece9100 100644 --- a/docs-src/api/Installation.md +++ b/docs-src/api/Installation.md @@ -11,6 +11,22 @@ The code is available on [GitHub]({{ config.repo_url }}). Available package vers pip install -U pop ``` +!!! tip "Using a virtual environment is recommended for reproducibility." + Create a virtual environment called `__venv__`: + ```bash + python3 -m venv __venv__ + ``` + + Activate the virtual environment: + ```bash + source __venv__/bin/activate + ``` + + Update pip: + ```bash + pip install -U pip + ``` + === "Install via pip" To install webqueue2-api 0.9.1, you can run: @@ -18,8 +34,6 @@ The code is available on [GitHub]({{ config.repo_url }}). Available package vers pip install git+{{ config.repo_url }}@0.9.1#egg=webqueue2-api ``` - If you'd like a version other than 0.9.1 simply replace the that version number with a different version listed on the [releases page]({{ config.repo_url }}/releases). - === "Install via requirements file" To install webqueue2-api 0.9.1, place the following line your requirements file: @@ -28,4 +42,9 @@ The code is available on [GitHub]({{ config.repo_url }}). Available package vers pip install -r requirements.txt ``` - If you'd like a version other than 0.9.1 simply replace the that version number with a different version listed on the [releases page]({{ config.repo_url }}/releases). \ No newline at end of file +If you'd like a version other than 0.9.1 simply replace the that version number with a different version listed on the [releases page]({{ config.repo_url }}/releases). + +To start the server, run the following while your virtual environment is activated: +```bash +gunicorn webqueue2api.api:app +``` \ No newline at end of file