Skip to content

Commit

Permalink
Merge pull request #688 from aobolensk/poetry
Browse files Browse the repository at this point in the history
Add support for Poetry build
  • Loading branch information
aobolensk authored Jan 28, 2024
2 parents 8859189 + faf6c86 commit dcd8f55
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ jobs:
python -m pip install -r tests/requirements.txt
- name: Run tests
run: python walbot.py test
poetry-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install .
python -m pip install -r tests/requirements.txt
- name: Run tests
run: python walbot.py test
light-docker-tests:
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ nohup.out

# Do not ignore .gitkeep
!/**/.gitkeep

# Poetry
/poetry.lock
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ $ python -m pip install -r requirements-extra.txt # optional
$ python walbot.py start
```

or using [Poetry](https://python-poetry.org/)

```shell
$ poetry install
$ python walbot.py start
```

### Command line options overview:
```shell
$ python walbot.py start # Start the bot
Expand Down
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[tool.poetry]
name = "walbot"
version = "0.1.0"
description = "Discord and Telegram bot written in Python"
authors = ["Arseniy Obolenskiy <[email protected]>"]
license = "MIT"
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.8 <3.12"
numpy = "1.24.3"
py-cord = {version = "2.4.1", extras = ["voice"]}
requests = "2.31.0"
psutil = "5.9.7"
python-dateutil = "2.8.2"
gitpython = "3.1.41"
pyyaml = "6.0.1"
yt-dlp = "2023.12.30"
python-telegram-bot = "20.3"
aiogoogletrans = {git = "https://github.com/aobolensk/aiogoogletrans", rev = "master"}
nest-asyncio = "1.5.9"
python-magic = "0.4.27"

[tool.poetry.group.test]
optional = true

[tool.poetry.group.test.dependencies]
pytest = "7.4.4"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit dcd8f55

Please sign in to comment.