Skip to content

Commit

Permalink
chore: update dependencies (UNICT-DMI#185)
Browse files Browse the repository at this point in the history
* chore: update requirements

* docs: update contributors

* chore: update python in gh actions

* docs: add details to testing section in README.md

* style: fix lint errors in UPDATE.md

* chore: minor changes
  • Loading branch information
v0lp3 authored Nov 22, 2021
1 parent 4c8ccbf commit f9d099d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 40 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/telegram-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8.5
- name: Set up Python 3.9.7
uses: actions/setup-python@v2
with:
python-version: 3.8.5
python-version: 3.9.7
- name: Install dependencies for requirements and testing
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -48,10 +48,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8.5
- name: Set up Python 3.9.7
uses: actions/setup-python@v2
with:
python-version: 3.8.5
python-version: 3.9.7
- name: Install dependencies for requirements and testing
run: |
python -m pip install --upgrade pip
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ This project is made possible thanks to the contributions of:
- [Stefano Origlio](https://github.com/InfernoMentale)
- [Salvo Asero](https://github.com/Guberlo)
- [Paolo Rabbito](https://github.com/IlRabbino)
- [Andrea Maugeri](https://github.com/v0lp3)
35 changes: 11 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

**Telegram-DMI-Bot** is the platform that powers **@DMI_bot**, a Telegram bot aided at helping students find informations about professors, classes' schedules, administration's office hours and more.

### Using the live version
## Using the live version

The bot is live on Telegram with the username [@DMI_Bot](https://telegram.me/DMI_Bot).
Send **'/start'** to start it, **'/help'** to see a list of commands.
Send **`/start`** to start it, **`/help`** to see a list of commands.

Please note that the commands and their answers are in Italian.

Expand Down Expand Up @@ -37,19 +37,7 @@ _(If you don't have a token, message Telegram's [@BotFather](http://telegram.me/
- python-pip3
- language-pack-it

#### To install with _pip3_

- python-telegram-bot==12.8
- pydrive
- requests
- beautifulsoup4
- python-gitlab
- matplotlib
- pandas
- pillow
- lxml

To install all the requirements you can run:
**To install all the requirements you can run**:

```bash
pip3 install -r requirements.txt
Expand All @@ -71,11 +59,13 @@ services:
```
### docker cli
```bash
$ docker run -v </path/to/settings.yaml>:/dmibot/config/settings.yaml -v </path/to/DMI_DB.db>:/dmibot/data/DMI_DB.db -t unictdmi/dmibot
docker run -v </path/to/settings.yaml>:/dmibot/config/settings.yaml -v </path/to/DMI_DB.db>:/dmibot/data/DMI_DB.db -t unictdmi/dmibot
```

### Parameter

Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate \<external>:\<internal> respectively.

| Parameter | Function |
Expand All @@ -84,6 +74,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-v /dmibot/data/DMI_DB.db` | database |

### Building locally

```bash
git clone https://github.com/UNICT-DMI/Telegram-DMI-Bot.git
cd Telegram-DMI-Bot
Expand Down Expand Up @@ -119,13 +110,7 @@ You can enable these commands setting **disable_drive = 0** and configuring the

### Testing

#### To install with _pip3_

- pytest
- pytest-asyncio
- telethon

To install all the test requirements you can run:
**To install all the test requirements you can run**:

```bash
pip3 install -r requirements_dev.txt
Expand Down Expand Up @@ -156,7 +141,9 @@ python3 conftest.py .
```

- Follow the procedure and copy the session value it provides in the settings file in "test:session". You can then delete the `conftest.py` you just used, you won't need it again
- Edit the remaining values in the settings file as you like
- Edit `tag` value with the username of the test bot you will use.
- Edit `representatives_group` value with the `user_id` or `group_id` where you want receive reports from **/report** command.
- Edit `dev_group_chatid` value with the `user_id` or `group_id` where you want receive tracebacks.

**Check [here](https://dev.to/blueset/how-to-write-integration-tests-for-a-telegram-bot-4c0e) if you want to have more information on the steps above**

Expand Down
2 changes: 1 addition & 1 deletion data/markdown/contributors.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@Helias, @adrianoferraguto, @Veenz, @simone989, @TkdAlex, @aegroto, @Squalex95, @LucaCavallaro, @Pierpaolo791, @Wornairz, @herbrant, @RayperZ, @margazz, @BeastHunter19, @D4ed4lUS, @Warcreed, @TendTo, @Adrenoid, @dcariotti, @datalux, @SalAsero, @bastardo\_saudita360, @IlRabbino
@Helias, @adrianoferraguto, @Veenz, @simone989, @TkdAlex, @aegroto, @Squalex95, @LucaCavallaro, @Pierpaolo791, @Wornairz, @herbrant, @RayperZ, @margazz, @BeastHunter19, @D4ed4lUS, @Warcreed, @TendTo, @Adrenoid, @dcariotti, @datalux, @SalAsero, @bastardo\_saudita360, @IlRabbino, @v0lp3
https://github.com/UNICT-DMI/Telegram-DMI-Bot.git
16 changes: 8 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
python-telegram-bot==13.4.1
python-telegram-bot==13.8.1
PyDrive2==1.10.0
requests==2.25.1
beautifulsoup4==4.9.3
python-gitlab==2.6.0
matplotlib==3.3.4
pandas==1.2.3
Pillow==8.1.2
lxml==4.6.3
requests==2.26.0
beautifulsoup4==4.10.0
python-gitlab==2.10.1
matplotlib==3.5.0
pandas==1.3.4
Pillow==8.4.0
lxml==4.6.4
6 changes: 3 additions & 3 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pytest==6.2.2
Telethon==1.20
pytest-asyncio==0.14.0
pytest==6.2.5
Telethon==1.23.0
pytest-asyncio==0.16.0

0 comments on commit f9d099d

Please sign in to comment.