Setting up dev environment
Requirements
In order to set up local development environment make sure you have installed:
You can install conda-lock
on your base
environment by running:
conda install -c conda-forge conda-lock -n base
You can use miniforge which also includes
mamba. Using mamba
should
speed up dependency resolution significantly.
Using Makefile
Run:
make env
It will also install pre-commit
hooks and the project in an editable mode.
Once done you can activate the environment by running:
conda activate eodh-workflows
Manually
-
Run
conda-lock
command:conda-lock install --mamba -n eodh-workflows conda-lock.yml
-
Activate the env:
conda activate eodh-workflows
-
Install
pre-commit
hooks:pre-commit install
-
Install the project in an editable mode:
pip install -e .
Pre-commit hooks
This project uses pre-commit
package for managing and maintaining pre-commit
hooks.
To ensure code quality - please make sure that you have it configured.
-
Install
pre-commit
and following packages:ruff
,mypy
,pytest
. -
Install
pre-commit
hooks by running:pre-commit install
-
The command above will automatically run formatters, code checks and other steps defined in the
.pre-commit-config.yaml
-
All of those checks will also be run whenever a new commit is being created i.e. when you run
git commit -m "blah"
-
You can also run it manually with this command:
pre-commit run --all-files
You can manually disable pre-commit
hooks by running: pre-commit uninstall
Use this only in exceptional cases.
Setup environmental variables
Ask your colleagues for .env
files which aren't included in this repository and put them inside the repo's root directory.
To see what variables you need see the .env-sample
file.