Common working environment setup for all the repositories.
All the repositories are Python and Django based, so you need to get Python set up. The following section provides a step-by-step guide to setting up your working environment. If you bump into any issue, please check our Common Issues section first for help.
First, check whether you've got Python installed:
We are currently on Python 3.8.x.
Add apt repository for older versions of python:
sudo add-apt-repository ppa:deadsnakes/ppa
Then, run the following command:
sudo apt install \
Install git by running
sudo apt install giton Ubuntu or
brew install giton Mac.
Check your pyenv installation:
Install the required python version: (this process may take a while)
pyenv install 3.8.16
At the point of writing, we are using either
3.8.16. Feel free to try the latest patch version of
3.8if a new one has come up.
Switch pyenv to using the 3.8.x:
pyenv global 3.8.16
This tells your system and the next steps in this page to use the selected Python version. You can double check by running
pyenv versionsagain. The star
*sign shows the selected version.
You can switch back to other Python version if you need to later. We use this Python version to build our virtual environment with
pipenvin the next steps. Once the virtual environment is built, we don't need pyenv anymore.
If you're on Mac, you may have an old or incompatible sqlite3 version, and it's recommended to first upgrade your sqlite3 and follow the next steps. Otherwise, you can skip ahead.
Upgrade sqlite3 with
brew install sqlite3. Then follow the instructions in
brew info sqlite3e.g.
If you need to have sqlite first in your PATH, run:
echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.zshrc
For compilers to find sqlite you may need to set:
Next up, you need to have
pipis Python standard package management system, used to install and manage software packages.
pipshould come with your Python installation.
On Ubuntu, run
sudo apt-get install python3-pip.
Check that you've got pip installed:
pipenvcreates and manages virtual environment for the project. It installs and removes packages from the
Pipfilein an isolated working environment, so it doesn't mess with your system.
On Mac, run
brew install pipenv.
On Ubuntu, run
sudo pip install pipenv.
Once you have the repo locally,
cdinto the folder, and run:
pipenv install --dev
This builds the virtual environment for the project. The process may take a few minutes.
If you've done everything right, all the steps above only have to be done once. And this is the point where you need to start from when you leave and come back, or start a new shell.
In the directory of the repo, run:
This activates the virtual environment for this repo. Depending on your shell, you should see the difference in the shell prompt when you're inside a virtual environment.
If working on the portal repo, you need to build the react frontend and move it to a static folder inside portal.
You will need yarn to build those. Install them by running:
sudo apt install npm
sudo npm install --global yarn
The following steps need node >= 14, make sure that is the version you are using.
Now to build the files, go into the directory
portal_frontendand run the yarn commands:
Then move the build files into the portal static directory:
mv build ../portal/frontend
Finally, inside the folder, run:
This command will:
- sync the database
- collect the static files
- run a development web server
You should see output like the following:
Django version 3.2.19, using settings 'settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
At this point the portal will be accessible with your browser at
The steps above are the same for all three repositories and the minimum to get the portal running.
aimmohas some extras as it uses
minikubeso please check the aimmo setup for more detail.
Please do not hesitate to ask questions if you found any difficulties to get things up and running. Github Discussion is the perfect place for this. It is monitored by the core developers and your questions may help other contributors who bump into the same issues.