⚓️ Service that powers Bakus
Setup your environment for development
Can skip these instructions if you already have pyenv
, postgres
installed. Use brew
to install these.
We use pyenv for setting up python environment. Full instructions available from pyenv
.
brew install pyenv pyenv-virtualenv
Setup shell profile with pyenv
init lines. Here's the example for .bash_profile
export PYENV_ROOT=$HOME/.pyenv
export PATH=$PYENV_ROOT/shims:$PATH
# Complete pyenv setup
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
This project uses postgres
as its database. brew services
is our preferred way to run it.
brew install postgres
brew services start postgres
Using pgAdmin (or some other postgres client tool), add a user and database for bakus-service to use:
- Database name:
bakus-service
- User:
bakus
- Password:
bakus
This project uses Python 3.10, which we should install using pyenv
# pyenv will show more versions for 3.10
# use the latest patch version offered
pyenv install 3.10.4
Setup virtualenv using pyenv. We use the name bakus-service
to have consistent naming.
pyenv virtualenv 3.10.4 bakus-service
Set that new pyenv version (pyenv treats virtualenvs as just addition versions) as the one to use for our project. This assumes your shell is set to the top level of the repo.
pyenv local bakus-service
Install project dependencies. This installs the main dependencies in addition to the ones for dev work.
pip install -r requirements-dev.txt
Setup pre-commit to ensure proper code formatting
pre-commit install
TBD
If using PyCharm, take a look at PyCharm Tips