Skip to content
Alfred Sporre edited this page Feb 24, 2020 · 14 revisions

Welcome to the Mycroft wiki!

Configuration

To set up the project, you will have to install Django and Django REST. To do this you will probably want to create a Python Virtual Environment.

Create Virtual Environment

Run python -m venv venv in the root-folder of the project.

Exit Virtual Environment

To enter the virtual environement:

  • run source venv/bin/activate on Linux
  • run "venv/Scripts/activate.bat" on Windows

Exit Virtual Environment

To exit the virtual environment, run deactivate.

Install Tools

First, enter the virtual environment, then run pip install -r requirements.txt.

You are now ready to roll!

Development

This chapter describes where code should be written.

Frontend

Frontend code should be written in the frontend/src.

Backend

Backend interfaces should be implemented in different Django apps, not frontend.

Operations

There are several scripts in the root-folder of the project. This chapter describes what they do.

run

This script starts the Django server.

pack

This script packs the frontend using webpack. This process combines all dependencies and compiles them to a single file.

migrate

This script migrates all current Django-models into actual databases. This effectively runs makemigrations and migrate. See documentation.

Clone this wiki locally