Python backend for a Slack's kudos plugin.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #3 from Dekalabs/chore/update-readme

chore: update readme

authored by

Marcos Gabarda and committed by
GitHub
f48c9ea6 531389d9

+26 -3
+26 -3
README.md
··· 28 28 29 29 Assuming you are using [direnv](https://direnv.net/), on the root of the project, creates a file named `.envrc`: 30 30 31 + ```bash 31 32 $ echo "dotenv" > .envrc 33 + ``` 32 34 33 35 Then create an `.env` file with the environment variables. An example: 34 36 37 + ``` 35 38 # PostgreSQL 36 39 # ------------------------------------------------------------------------------ 37 40 POSTGRES_HOST=localhost ··· 56 59 # General 57 60 # ------------------------------------------------------------------------------ 58 61 KEFI_SETTINGS_MODULE=kefi.config.local 59 - 62 + ``` 60 63 61 64 ### Launch the external services 62 65 63 66 To launch the database an Redis server, you can launch them using `docker-compose`: 64 67 68 + ```bash 65 69 $ docker-compose up --build 70 + ``` 66 71 67 72 ### Install the dependencies 68 73 69 74 You can install the dependencies of the project using [poetry](https://python-poetry.org/), 70 75 in a local virtual environment, using the following command: 71 76 77 + ```bash 72 78 $ poetry install 73 - 79 + ``` 74 80 75 81 ## Running tests 76 82 77 83 Now, to test that everything is working, you can launch the tests using this command: 78 84 85 + ```bash 79 86 $ poetry run pytest . 87 + ``` 80 88 81 89 ## Running local server 82 90 ··· 84 92 85 93 First, we have to run the migrations in order to get the last version of the database: 86 94 95 + ```bash 87 96 $ poetry run alembic upgrade head 97 + ``` 88 98 89 99 ### Run server 90 100 91 101 Then, we launch the local server with `uvicorn`: 102 + ```bash 103 + $ poetry run uvicorn kefi.main:app --reload 104 + ``` 105 + 106 + ### Force load Kefis 92 107 93 - $ poetry run uvicorn kefi.main:app --reload 108 + ```bash 109 + $ poetry run ./manage.py 110 + ``` 111 + 112 + ```python 113 + from kefi.models.helpers import notify_reset_wallet, reset_wallets 114 + reset_wallets(session) 115 + session.commit() 116 + ```