Skip to content

Dev environment

Stefan Allius edited this page Jan 8, 2025 · 12 revisions

Development Setup

For easy contribution here you find the recommended setup:

  1. Update or install Homebrew Check and update your home-brew:

    brew doctor
    brew update

    If you have no home-brew you can easily install it:

    xcode-select --install
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    echo >> /Users/sallius/.zprofile
    echo 'eval "$(/usr/local/bin/brew shellenv)"' >> /Users/sallius/.zprofile
    eval "$(/usr/local/bin/brew shellenv)"
  2. Install 'vscode' from code.visualstudio.com

    brew install --cask visual-studio-code
  3. Install 'docker-desktop' from www.docker.com

    brew install --cask docker
  4. Install pyenv so we can easily switch the Python version

    A description how to install pyenv you will find here: pyenv project

    On MacOs you should use home-brew. Before you install new things, please check your installation and update home-brew.

    Then install pyenv and set some environments for your shell

    brew install pyenv
    
    echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zprofile
    echo [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zprofile
    echo 'eval "$(pyenv init -)"' >> ~/.zprofile
  5. Download repositories

  6. Setup a virtual environment with pyenv and venv

    Start vscode and enter the workspace of the proxy. Then open a new terminal (zsh) and create the python environment:

    pyenv install 3.12.7
    pyenv local 3.12.7
    pyenv exec python3 -m venv .venv
    source .venv/bin/activate
  7. Install 'python' packages:

    python3 -m pip install --upgrade pip
    python3 -m pip install -r requirements.txt
    python3 -m pip install -r requirements-test.txt
  8. Install vscode packages: Python, Pylance, Docker, Flake8, yUML, Markdown All In One, markdownlint, Coverage Gutters

  9. Optional: install hadolint for Dockerfile checking

    brew install hadolint

    and install the vscodepackage: hadolint