-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
63 lines (53 loc) · 1.96 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
[tool.poetry]
name = "fast-zero"
version = "0.1.0"
description = "Study project repository for the 'FastAPI from Scratch' course by Dunossauro."
authors = ["Vicente Marçal <[email protected]>"]
license = "GPL-3.0-or-later"
readme = "README.md"
[tool.poetry.dependencies]
python = "3.12.*"
fastapi = "^0.111.0"
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
pytest-cov = "^5.0.0"
taskipy = "^1.12.2"
ruff = "^0.4.9"
httpx = "^0.27.0"
[tool.ruff]
line-length = 120
extend-exclude = ['migrations']
[tool.ruff.lint]
preview = true
select = ['I', 'F', 'E', 'W', 'PL', 'PT']
[tool.ruff.format]
preview = true
quote-style = 'single'
[tool.pytest.ini_options]
pythonpath = "."
minversion = "6.0"
addopts = '-ra -q -vv -p no:warnings'
testpaths = [
'tests/',
]
python_files = [
'test_*.py',
'*_test.py'
]
[tool.taskipy.variables]
pyc = "./ -name '*.pyc' -delete"
pycache = "./ -name '__pycache__' -delete"
thumbs = "./ -name 'Thumbs.db' -delete"
root = "./ -name '*~' -delete"
[tool.taskipy.tasks]
pre_test = {cmd = 'task lint', help = "Run lint command before test."}
test = {cmd = "pytest -x", help = "Run test and abort if has one fail."}
test-cov = {cmd = 'pytest --cov=fast_zero --cov-report html', help = "Run tests and generate coverage report."}
lint = {cmd = "ruff check . && ruff check . --diff", help = "Run lint to check PEP8."}
format = {cmd = "ruff format .", help = "Run format to fix PEP8."}
clean = {cmd = "find {pyc} && find {pycache} && find {thumbs} && find {root}", help = "Clear the project off all files that are dispensables.", use_vars = true}
post_clean = {cmd = "rm -rf .cache && rm -rf .pytest_cache && rm -rf dist && rm -rf *.egg-info && rm -rf htmlcov && rm -rf .tox/ && rm -rf site && rm -rf .coverage && rm -rf .ruff_cache", help = "Remove all files that are dispensables."}
run = {cmd = "fastapi dev fast_zero/app.py", help = "Run FastAPI development server."}
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"