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

  1. 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>
    
  2. 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.

  3. 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.

  4. Activate the virtual environment

    conda activate <project_name>
    
  5. Create a requirements.txt file listing all the required packages to install, e.g.:

    pandas
    numpy
    statistics
    matplotlib
    scipy
    wezel
    sphinx
    
    _images/setup_requirements.png
  6. Install the required packages

    pip install -r requirements.txt