description |
---|
Quick guide for setting your environment for Dispatch development. |
{% hint style="info" %} This guide assumes you're using an OS of the Linux/Unix variant (Ubuntu/OS X). These guide is not meant to be exhaustive. {% endhint %}
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 will run the webpack-dev-server in another process when start dev server and forward static files through httpx.
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 lets ensure it's a new enough version:
> python --version
Python 3.7.3
{% hint style="info" %}
Dispatch uses async functionality and requires python 3.7.3+
.
{% endhint %}
Create a new virtualenv just for Dispatch:
> pyenv virtualenv dispatch
Install Dispatch with pip:
> pip install -e /path/to/dispatch
Test it would by seeing if the dispatch
command is in your path:
> dispatch --help
Dispatch use the Vue Cli to manage it's 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
{% hint style="info" %} To correctly build it's components Dispatch requires node 12.7.0+ {% endhint %}
Install required node modules with npm
:
> npm install
Test the development server:
> npm run serve