Skip to content

Commit

Permalink
doc: update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rstagi committed Nov 13, 2024
1 parent 277880c commit 00c6a1d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Contributing

Hello everybody! 💪

Any contribution to this project is appreciated and welcomed 😎
Expand All @@ -12,3 +14,43 @@ See this [PR example](https://github.com/iamgiolaga/partitelle-bot/pull/20)

Best,
Giovanni

## Init the environment

To init the environment, run the following commands:

```bash
pyenv install
pyenv local
pip install -r requirements.txt
```

Make sure that the python version is the one specified in the `.python-version` file:

```bash
python --version
```

Create a `.env` file and fill it with the correct values. You can use the `default.env` file as a template.

## Run the tests

To run the tests, run the following command:

```bash
python -m unittest discover test
```

## Run the bot

To run the bot, run the following command:

```bash
python main.py
```

If you're running the bot locally (ENV = local), the bot will start polling messages from Telegram.

If you're running the bot on other environments (ENV != local), the bot will start a webhook listener instead.

This is useful to test the bot on a local environment before pushing the changes to the remote server.
8 changes: 8 additions & 0 deletions default.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PB_TG_TOKEN = ""
PB_URL = ""
PB_DB_TABLE_NAME = ""
PB_DB_HOST = ""
PB_DB_NAME = ""
PB_DB_USER = ""
PB_DB_PASSWORD = ""
PB_DB_PORT =

0 comments on commit 00c6a1d

Please sign in to comment.