Skip to content

Local Development Setup

Lars Waage edited this page May 25, 2023 · 4 revisions

Table of Contents

Preface

This document is intended to be a guide for setting up a local development environment for the project in order to enable autocompletion, linting, and testing.

The document assumes that the reader has completed the Project Installation. Otherwise, complete the Project Installation before returning to this document.

Python

Installing the Python dependencies locally enables linting and autocompletion in VSCode, making the local development significantly easier. There are many ways to accomplish this (e.g. devcontainers), but we're just outlining one way to do it here.

MacOS/Unix-like

Click to expand
  1. Install pyenv, a Python version manager

    $ brew install pyenv
  2. Install and use the latest version of Python 3.9

    $ pyenv install 3.9:latest
    $ pyenv use local 3.9:latest
  3. Set up and activate a virtual environment

    $ python -m venv .venv
    $ source .venv/bin/activate
  4. Install dependencies locally shell $ pip install -r backend/requirements/local.txt

Windows

Click to expand

Please refer to steps 1-5 in Project Installation | Server (Django) | Without Docker | Django.

Node.js

Please refer to steps 1-5 in Project Installation | Application (Next.js) | Without Docker (recommended)

Visual Studio Code (VSCode)

We recommend using Visual Studio Code. Simply install the editor and open the project folder.

Shell Command

For MacOS users, we recommend installing the code shell command in PATH by opening VSCode, click ⌘ + ⇧ + P and selecting Shell Command: Install 'code' command in PATH. This enables you to open files and directories in VSCode by running code <file or directory> in the terminal.

Extensions

See .vscode/extensions.json

Settings

We have defined settings for the project in .vscode/settings.json. If you for some reason want to override these settings, please change your workspace settings in VSCode.