-
Notifications
You must be signed in to change notification settings - Fork 8
/
pyproject.toml
108 lines (98 loc) · 3.75 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[tool.poetry]
name = "Modmail"
version = "0.2.0"
description = "A modmail bot for Discord. Python 3.8+ compatiable"
license = "MIT"
authors = ["aru <genericusername414@gmail.com>", "bast <bast@fastmail.com"]
maintainers = ["aru <genericusername414@gmail.com>"]
readme = "README.md"
repository = "https://github.com/discord-modmail/modmail"
homepage = "https://github.com/discord-modmail/modmail"
keywords = ["discord", "modmail"]
include = ["CHANGELOG.md", "env.template"]
packages = [{ include = "modmail" }]
[tool.poetry.dependencies]
python = "^3.8"
aiohttp = { extras = ["speedups"], version = "^3.7.4" }
arrow = "^1.1.1"
colorama = "^0.4.3"
coloredlogs = "^15.0"
"discord.py" = { url = "https://github.com/Rapptz/discord.py/archive/45d498c1b76deaf3b394d17ccf56112fa691d160.zip" }
python-dotenv = "^0.19.2"
atoml = "^1.0.3"
attrs = "^21.2.0"
desert = "^2020.11.18"
marshmallow = "~=3.13.0"
PyYAML = { version = "^6.0.2", optional = true }
typing-extensions = "^4.0.1"
marshmallow-enum = "^1.5.1"
[tool.poetry.extras]
yaml = ["pyyaml"]
[tool.poetry.dev-dependencies]
# always needed
pre-commit = "^3.5.0"
taskipy = "^1.6.0"
# linting
black = "^24.8.0"
flake8 = "~=3.8"
flake8-annotations = "~=2.3"
flake8-bugbear = "~=20.1"
flake8-docstrings = "~=1.5"
flake8-isort = "^4.0.0"
flake8-string-format = "~=0.3"
flake8-tidy-imports = "~=4.1"
flake8-todo = "~=0.7"
isort = "^5.13.2"
pep8-naming = "~=0.11"
# testing
aioresponses = "^0.7.2"
coverage = { extras = ["toml"], version = "^6.0.2" }
coveralls = "^3.3.1"
pytest = "^6.2.4"
pytest-asyncio = "^0.15.1"
pytest-cov = "^3.0.0"
pytest-dependency = "^0.5.1"
pytest-sugar = "^0.9.4"
pytest-xdist = { version = "^2.3.0", extras = ["psutil"] }
# Scripts
click = "^8.0.3"
[tool.poetry.group.docs.dependencies]
mkdocs = ">=1.1.2,<2.0.0"
mkdocs-material = ">=7.1.9,<8.0.0"
mkdocs-markdownextradata-plugin = ">=0.1.7,<0.2.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.coverage.run]
branch = true
source_pkgs = ['modmail', 'tests']
omit = ["modmail/plugins/**.*"]
[tool.pytest.ini_options]
addopts = "--cov --cov-report="
minversion = "6.0"
testpaths = ["tests/modmail"]
filterwarnings = [
"default",
'ignore::DeprecationWarning:marshmallow.fields:173',
'ignore::DeprecationWarning:marshmallow.fields:438',
'ignore::DeprecationWarning:marshmallow.fields:456',
]
[tool.black]
line-length = 110
target-version = ['py38']
include = '\.pyi?$'
[tool.taskipy.tasks]
start = { cmd = "python -m modmail", help = "Run bot" }
black = { cmd = "black --check .", help = "dry run of black" }
cov-server = { cmd = "coverage html", help = "Start an http.server for viewing coverage data." }
post_cov-server = "python -m http.server 8012 --bind 127.0.0.1 --directory htmlcov"
docs = { cmd = "mkdocs serve", help = "Run the docs on a local automatically reloading server" }
export = { cmd = "python -m scripts.export_requirements", help = "Export the requirements from poetry.lock to requirements.txt" }
flake8 = { cmd = "python -m flake8", help = "Lints code with flake8" }
lint = { cmd = "pre-commit run --all-files", help = "Checks all files for CI errors" }
lock = { cmd = 'poetry lock --no-update && task export --docs', help = 'Relock the dependencies without updating them. Also runs the export scripts' }
precommit = { cmd = "pre-commit install --install-hooks", help = "Installs the precommit hook" }
report = { cmd = "coverage report", help = "Show coverage report from previously run tests." }
scripts = { cmd = 'python -m scripts', help = 'Run the scripts wrapper cli.' }
test = { cmd = "pytest -n auto --dist loadfile", help = "Runs tests and save results to a coverage report" }
test_mocks = { cmd = 'pytest tests/test_mocks.py', help = 'Runs the tests on the mock files. They are excluded from the main test suite.' }