Developer Environment Setup

This setup has only been tested on Linux (Fedora & Ubuntu)

Windows & MacOS will likely have to hack together their own developer setup (and report back here!)

Install PILOT Drive & Friends

  1. Clone PILOT Drive:

    git clone git@github.com:lamemakes/pilot-drive.git
    cd pilot-drive
    
  2. Install Python 3.11

  3. Install Node.js >= 16.16.0 & npm >= v8.11.0, nvm is highly recommended.

  4. Install yarn >= 1.22.19 via:

    npm install --global yarn
    
  5. Install the needed pip packages:

    sudo python3.11 -m pip install backend/ pylint black pytest
    sudo python3.11 -m pip install ELM327-emulator  # emulates OBD functionality
    
  6. Install the needed Node packages:

    yarn --cwd ui/ install --frozen-lockfile
    
  7. (Optional) Use my fork of lukasjapan’s bt-speaker to install bt-speaker for bluetooth audio. Raspberry Pi Only!

  8. (Optional) Install ancs4linux for iOS notification integration

  9. (Optional) Install Android Debug Bridge (ADB) and Android Asset Packaging Tool 2 (AAPT2) for Android notification integration

NOTE: PILOT Drive needs to be installed as root, along with it’s pip dependencies!

Build PILOT Drive

  1. Enter the PILOT Drive directory:

    cd pilot-drive/
    
  2. The entire Python package can be built via the Makefile in the root directory:

    make
    
  3. Alternatively, the frontend OR package can be chosen for build:

    make web        # Build ONLY the frontend
    make package    # Build ONLY the Python package
    
  4. After a successful package build, install the package:

    sudo python3.11 -m pip uninstall pilot-drive
    sudo python3.11 -m pip install ./dist/pilot_drive-X.X.X-py3-none-any.whl    # replace "X.X.X" with current version
    

Run it!

  1. Start the backend:

    sudo python3.11 backend/pilot_drive
    
  2. Start the frontend (in a new terminal):

    yarn --cwd ui/ dev
    
  3. In your browser, navigate to the address indicated by the previous step - likely http://localhost:5173

Ready to merge your changes?

  1. First, make sure your changes are ready to be integrated and pass tests/linting:

    cd pilot-drive
    python3.11 -m black backend/pilot_drive
    python3.11 -m pylint backend/pilot_drive
    sphinx-apidoc ./backend/pilot_drive -o ./docs/source/api/
    
  2. Put up a Pull Request referencing the issue/feature being fixed

Thank you!

Your contributions to PILOT Drive are what makes it great. From reporting a small typo of a bug, to a major feature contibution - every ounce helps to create more of a free, privacy oriented, and open source alternative to the norm.