Project environment and setup
Contents
Project environment and setup
Environment and dependencies
A working Python environment is required to generate Sphinx documentation.
In this guide, conda virtual environments are used to manage the project
dependencies in isolation. The conda package manager may be downloaded
directly from Anaconda’s webpage.
Feel free to create virtual environments using other tools, however please
remember to adjust the following anaconda-specific commands as necessary.
Note
The following steps assume that commands are run from a Windows OS. If replicating from a different OS, please adapt commands to the appropriate related invocation (Some examples here).
Installation
Open Git Bash in an interface of your choice and navigate to an empty project directory by inputting the following command:
cd <path_to_project_name>
Clone the target project from github
git clone -b <branch_name> https://github.com/<account_name>/<project_name>.git .
Alternatively, download the whole archive locally as a zip file. More details on cloning a repository here.
From the project root directory, run the following command to create a separate virtual environment:
conda create --name <project_name> python=<version_of_choice>
In these examples, Python v.3.7 was installed.
Activate the virtual environment
conda activate <project_name>
Create a
requirements.txtfile listing all the required packages to install, e.g.:pandas numpy statistics matplotlib scipy wezel sphinx
Install the required packages
pip install -r requirements.txt