Initial Setup
Install Dependencies
Install pyenv
(MacOS)
We use python 3.9.11
for the back end in our repo, but python >= 3.9.11
should work in general.
You should use pyenv
to set up the right python
version for the project.
- Install
brew
(if not already installed). - Install the
xz
library (if not already installed). - Then install
pyenv
and set the rightpython
version. - Add this to your
~/.zshrc
: - Run
zsh
to open a new shell (with the updated~/.zshrc
). -
Check that the version of
python
is the same as you set topyenv local
.
Install Poetry
We use poetry
as our dependency manager for the back end.
- Install
poetry
. -
Check that the version of python that
poetry
uses is the same as you set topyenv local
. -
Install the dependencies.
Docker (Optional)
Docker is needed for different tasks such as releasing and updating the documentation. However, it won't be needed at first to develop and launch the app. You can skip this step and wait until you are required to use it.
- Install
Docker Desktop
. If you are using a Mac, check "Apple logo" > "About This Mac" to know if you have aMac with Intel Chip
or aMac with Apple Chip
. - Set the memory to at least 9 GB in Docker > Preference > Resources.
Front End
-
Install
Node.js
version 16. If you need to use different versions of Node on your machine, you may be interested in NVM. Otherwise, the simplest way to install Node on you Mac is to useHomebrew
(and follow directions to add this version to your PATH). -
Once you've installed
Node
, you can installyarn
. -
You can then install front-end dependencies, from the webapp folder, using:
Setting up the development environment
Install IDE
- If developing in back end, we recommend installing PyCharm:
- Install PyCharm.
- In PyCharm preferences, you can add your existing python virtual environment as the "Python Interpreter", pointing where what
poetry run which python
prints.
- If developing in front end, we recommend installing Visual Studio Code:
- Install Visual Studio Code
- A pre-defined configuration is available in the repo, to help development. Two things to do:
- View > Extensions > search for
esbenp.prettier-vscode
and install it. That's the officialCode formatter using prettier
by publisherPrettier
. - File > Open Workspace from File > select
azimuth.code-workspace
, which will set up two folders:webapp
and.
(for the rest). In thewebapp
folder,webapp/.vscode/settings.json
will configure Prettier to format your files on save.
- View > Extensions > search for
Pre-commit Hooks
We installed pre-commit hooks which will format automatically your code with each commit. The first time, you need to run the following command.