Development Setup

Backend Development

Warning

Always be aware of piping commands to any shell - this is the recommended method for poetry but there are other options.

Windows

Note

Do not install python from the Windows Store - it will not work with these instructions.

  1. Install python version 3.9 or above.

  2. Install git.

  3. Install Build Tools for Visual Studio 2022

    • When asked for Workloads, select “Desktop development with C++”

    • Included
      • C++ Build Tools core features

      • C++ 2022 Redistributable Update

      • C++ Core desktop features

    • Optional
      • MSVC v143 - VS 2022 C++ x64/x86 build tools (vXX,XX)

      • Windows SDK

      • C++ CMake tools for Windows

      • Testing tools core features - Build Tools

      • C++ AddressSanitizer

    • The default install options are appropriate.

  4. Reboot

  5. Install poetry using PowerShell:

    $ (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
    
  6. Clone the main branch from the LedFx Github repository:

    $ git clone https://github.com/LedFx/LedFx.git
    
  7. Install LedFx and its requirements using poetry:

    $ cd LedFx
    $ poetry install
    
  8. This will let you run LedFx directly from the cloned repository via:

    $ ledfx --open-ui
    

Linux

Note

This assumes an apt based system such as ubuntu. If your system uses another package manager you should be able use it to get the required packages.

  1. Install poetry:

    $ curl -sSL https://install.python-poetry.org | python3 -
    
  2. Clone the main branch from the LedFx Github repository:

    $ git clone https://github.com/LedFx/LedFx.git
    
  3. Install system dependencies via apt install:

    $ sudo apt install libatlas3-base \
          libavformat58 \
          portaudio19-dev \
          pulseaudio \
    
  4. Install LedFx and its requirements using poetry:

    $ cd LedFx
    $ poetry install
    
  5. This will let you run LedFx directly from your local copy via:

    $ ledfx --open-ui
    

macOS

  1. Install poetry:

    $ curl -sSL https://install.python-poetry.org | python3 -
    
  2. Clone the main branch from the LedFx Github repository:

    $ git clone https://github.com/LedFx/LedFx.git
    
  3. Install LedFx and its requirements using poetry:

    $ cd LedFx
    $ poetry install
    
  4. This will let you run LedFx directly from your local copy via:

    $ ledfx --open-ui
    

Document Development

The documentation is written in reStructuredText. Once you are finished making changes, you must build the documentation. To build the LedFx documentation follow the steps outlined below:

Note

Alternatively, you may run make livehtml in place of make html to open a browser and view your changes in realtime.

Linux

$ cd ~/ledfx/docs
$ pip install -r requirements-docs.txt
$ make html

macOS

$ source ~/ledfx-venv/bin/activate
$ cd ~/ledfx/docs
$ pip install -r requirements-docs.txt
$ make html