Local Environment Setup¶
Setting up pyenv¶
Curl the following link to download pyenv
curl https://pyenv.run | bash
Export pyenv variables: Add pyenv initializer to shell startup script.
echo -e 'export PYENV_ROOT="$HOME/.pyenv" '
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"' >> ~/.bash_profile
Reload your profile.
source ~/.bash_profile
Install dependenies¶
Install poetry via curl:
curl -sSL https://install.python-poetry.org | python3 -
Add poetry to your shell
export PATH="$HOME/.poetry/bin:$PATH"
Configure poetry to create virtual environments inside the project’s root directory
poetry config virtualenvs.in-project true
Install packages via poetry
poetry install
We use pre-commit to check the formatting of our commits.
pre-commit install
Test the pre-commit works:
pre-commit run --all-files