Developer Onboarding

This guide explains how to set up a workstation and start local development. Also read the time management and productivity guide.

Shell aliases

Add aliases to your shell configuration, such as ~/.bashrc:

alias activate='source .venv/bin/activate && python3 --version && which python3 && pip --version'
alias python='python3'
alias venv='python3 -m venv .venv'
alias vpn='sudo wg-quick up wg0; sudo wg show'
alias vpn-down='sudo wg-quick down wg0'
alias dc='docker compose'

Reload your shell configuration after saving it.

Workstation setup

  1. Create a GitLab account using your company email address.

  2. Generate an SSH key:

    ssh-keygen -t ed25519 -C "firstname.x@pceuropa.net"
    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_ed25519
  3. Display your public key with cat ~/.ssh/id_ed25519.pub, then add it under GitLab > User Settings > SSH Keys.

  4. Add a GitLab avatar to make project activity and reviews easier to identify.

  5. Install an IDE or editor suitable for Python development.

  6. Log in to the PCEUROPA Slack workspace.

  7. Open the whole_internet GitLab project, select Code, copy the Clone with SSH URL, and run:

    git clone <ssh-url>
  8. Confirm that your Python version matches the version required by the project:

    python3 --version
  9. Install MongoDB Compass and IPython:

    sudo apt install ipython3
  10. Ask your buddy for authorized development-database access. Use DB_URI from crawler/.env with mongodump and mongorestore when a local copy is required. Never commit credentials or database dumps.

Start the local environment

  1. Enter the crawler directory:

    cd ~/crawler
  2. Create a virtual environment:

    python3 -m venv .venv
  3. Activate it and confirm the active tools:

    source .venv/bin/activate
    python3 --version
    which python3
    pip --version