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

Configure Feed

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

chore: updated readme

+68 -2
+68 -2
README.md
··· 4 4 5 5 --- 6 6 7 - [![Build Status](https://app.travis-ci.com/Dekalabs/kefi-backend.svg?token=zHqzKycTrkNHZc8GFpCg&branch=main)](https://app.travis-ci.com/Dekalabs/kefi-backend) 7 + # Welcome to Kefi community! 8 + 9 + ## Run in local 10 + 11 + To be able to run Kefi in you own computer, for development proposes, first, you'll 12 + need the following software installed and configured: 13 + 14 + * Python 3.10 (we recommend [pyenv](https://github.com/pyenv/pyenv) to handle several Python versions) 15 + * [poetry](https://python-poetry.org/) 16 + * [Docker](https://www.docker.com/) and docker-compose 17 + 18 + This project uses environment variables to handle the configuration, following the [twelve-factor config recommendation](https://12factor.net/config), and we recommend to use [direnv](https://direnv.net/) to handle project's local environment variables. 19 + 20 + ### 1. Clone the repository 21 + 22 + First, just clone this repository in your machine. 23 + 24 + ### 2. Create environment variables 25 + 26 + Assuming you are using [direnv](https://direnv.net/), on the root of the project, creates a file named `.envrc`: 27 + 28 + $ echo "dotenv" > .envrc 29 + 30 + Then create an `.env` file with the environment variables. An example: 31 + 32 + # PostgreSQL 33 + # ------------------------------------------------------------------------------ 34 + POSTGRES_HOST=localhost 35 + POSTGRES_PORT=5432 36 + POSTGRES_DB=kefi 37 + POSTGRES_USER=pyqF6iHnFi3LjiFV 38 + POSTGRES_PASSWORD=HGt9nkXNv6F9xkzN 8 39 9 - # Welcome to Kefi community! 40 + # Database connection 41 + # ------------------------------------------------------------------------------ 42 + DATABASE_URL=postgresql://pyqF6iHnFi3LjiFV:HGt9nkXNv6F9xkzN@localhost:5432/kefi 43 + 44 + # Redis 45 + # ------------------------------------------------------------------------------ 46 + REDIS_HOST=localhost 47 + 48 + # Slack 49 + # ------------------------------------------------------------------------------ 50 + SLACK_BOT_TOKEN= 51 + SLACK_TEAM_ID= 52 + 53 + # General 54 + # ------------------------------------------------------------------------------ 55 + KEFI_SETTINGS_MODULE=kefi.config.local 56 + 57 + 58 + ### 3. Launch the external services 59 + 60 + To launch the database an Redis server, you can launch them using `docker-compose`: 61 + 62 + $ docker-compose up --build 63 + 64 + ### 4. Install the dependencies 65 + 66 + You can install the dependencies of the project using [poetry](https://python-poetry.org/), 67 + in a local virtual environment, using the following command: 68 + 69 + $ poetry install 70 + 71 + ### 5. Run tests 72 + 73 + Now, to test that everything is working, you can launch the tests using this command: 74 + 75 + poetry run pytest .