Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update CONTRIBUTING.md #57

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 =
Loading