0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-01-24 17:29:39 +00:00
alerta_alerta/CONTRIBUTING.md
Nick Satterly 0cb430d2ef
Fix linting errors (#1618)
* Use flake8 instead of pylint and black

* Fix type errors
2021-11-21 17:26:37 +01:00

57 lines
920 B
Markdown

# Contributing
## Setup development environment
### Install database backend
Either Postgres or MongoDB need to be available.
To install Postgres on macOS run:
```bash
$ brew install postgresql
```
To install MongoDB on macOS run:
```bash
$ brew tap mongodb/brew
$ brew install mongodb-community@4.4
```
Add `mongod` to your path and run:
```bash
$ mongod --config /usr/local/etc/mongod.conf
```
### Install packages
Create a virtual environment:
```bash
$ python3 -m venv venv
```
Install package dependencies into the virtual environment:
```bash
$ venv/bin/pip install -r requirements.txt
$ venv/bin/pip install -r requirements-dev.txt
$ venv/bin/pip install -e .
```
## Run Alerta in development mode
Alerta can be run in "development mode" from the command-line:
```bash
$ alertad run
```
Test that Alerta API is working by `curl`-ing the API endpoint:
```bash
$ curl http://localhost:8080/
```