···28282929Assuming you are using [direnv](https://direnv.net/), on the root of the project, creates a file named `.envrc`:
30303131+```bash
3132 $ echo "dotenv" > .envrc
3333+```
32343335Then create an `.env` file with the environment variables. An example:
34363737+```
3538 # PostgreSQL
3639 # ------------------------------------------------------------------------------
3740 POSTGRES_HOST=localhost
···5659 # General
5760 # ------------------------------------------------------------------------------
5861 KEFI_SETTINGS_MODULE=kefi.config.local
5959-6262+```
60636164### Launch the external services
62656366To launch the database an Redis server, you can launch them using `docker-compose`:
64676868+```bash
6569 $ docker-compose up --build
7070+```
66716772### Install the dependencies
68736974You can install the dependencies of the project using [poetry](https://python-poetry.org/),
7075in a local virtual environment, using the following command:
71767777+```bash
7278 $ poetry install
7373-7979+```
74807581## Running tests
76827783Now, to test that everything is working, you can launch the tests using this command:
78848585+```bash
7986 $ poetry run pytest .
8787+```
80888189## Running local server
8290···84928593First, we have to run the migrations in order to get the last version of the database:
86949595+```bash
8796 $ poetry run alembic upgrade head
9797+```
88988999### Run server
9010091101Then, we launch the local server with `uvicorn`:
102102+```bash
103103+ $ poetry run uvicorn kefi.main:app --reload
104104+```
105105+106106+### Force load Kefis
921079393- $ poetry run uvicorn kefi.main:app --reload108108+```bash
109109+ $ poetry run ./manage.py
110110+```
111111+112112+```python
113113+ from kefi.models.helpers import notify_reset_wallet, reset_wallets
114114+ reset_wallets(session)
115115+ session.commit()
116116+```