Skip to main content

Environment

info

This guide assumes you're using an OS of the Linux/Unix variant (Ubuntu/OS X) and is not meant to be exhaustive.

Easy Mode

Install Dispatch with PIP:

> DISPATCH_LIGHT_BUILD=1 pip install -e .[dev]

Run dev server:

> STATIC_DIR="" dispatch server develop # or set STATIC_DIR to "" in .env

This command will run the webpack-dev-server in another process when starting the dev server and forward static files through HTTP.

API

System

Ensure you have python3 available on your system:

> which python3
/home/kglisson/.pyenv/shims/python3

Above, you can see that we're using pyenv to manage our python versions on our system. The rest of the guide will assume pyenv is being used.

Once we have python installed, let's ensure it's a new enough version:

> python --version
Python 3.10.11

Dispatch requires python 3.10+.

Create a new virtualenv just for Dispatch:

> pyenv virtualenv dispatch

Install Dispatch with pip:

> pip install -e /path/to/dispatch

Test it by seeing if the dispatch command is in your path:

> dispatch --help

UI

Dispatch uses the Vue Cli to manage its single-page app (SPA) and the Vuetify framework for material based components.

To get started developing with Vue, first navigate to the root static directory:

> cd <dispatch-source-patch>/src/dispatch/static/dispatch

Ensure you have node installed:

> which node
/home/kglisson/.nvm/versions/node/v12.7.0/bin/node

Notice that we are using nvm to manage our installations of Node. The rest of the guide assumes the usage of nvm.

Check to make sure we have the correct version of Node:

> node --version
v12.7.0
info

To correctly build it's components Dispatch requires node 12.7.0+

Install required node modules with npm :

> npm install

Test the development server:

> npm run serve