-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
102 lines (92 loc) · 2.64 KB
/
pyproject.toml
File metadata and controls
102 lines (92 loc) · 2.64 KB
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
[project]
name = "pad-api"
version = "1.0.0"
description = ""
authors = [{ name = "James Sweet", email = "jsweet@nd.edu" }]
dependencies = [
"fastapi>=0.79.0",
"uvicorn[standard]>=0.18.2",
"sqlalchemy>=1.4.40",
"alembic>=1.8.1",
"pymysql>=1.0.2",
"pillow>=9.4.0",
"authlib>=1.2.0",
"pydantic[dotenv]>=1.10.6,<2.0",
"itsdangerous>=2.1.2",
"httpx>=0.23.3",
"python-multipart>=0.0.6",
]
requires-python = ">=3.10, <3.11"
license = { text = "MIT" }
[build-system]
requires = ["pdm-pep517>=1.0.0"]
build-backend = "pdm.pep517.api"
[tool]
[tool.pdm]
[tool.pdm.scripts]
server = "uvicorn server.main:app --reload"
lint = "ruff --fix ."
format = { shell = "black . && isort ." }
test = "pytest"
export-requirements-production = { shell = "pdm export --production --format requirements --without-hashes > requirements.txt" }
export-requirements-development = { shell = "pdm export --dev --format requirements --without-hashes > requirements-dev.txt" }
export-requirements = { composite = [
"export-requirements-production",
"export-requirements-development",
] }
ci = { composite = ["lint", "format", "test", "export-requirements"] }
[tool.pdm.dev-dependencies]
dev = ["black>=23.1.0", "ruff>=0.0.254", "isort>=5.12.0"]
test = [
"pytest>=7.2.2",
"httpx>=0.23.3",
"freezegun>=1.2.2",
"pyfakefs>=5.1.0",
"pytest-sugar>=0.9.6",
"hypothesis[numpy]>=6.68.2",
"requests>=2.28.2",
"icdiff>=2.0.6",
"pprintpp>=0.4.0",
"fuzzywuzzy>=0.18.0",
]
profile = ["pyinstrument>=4.4.0"]
[tool.pdm.build]
package-dir = "src"
[tool.pytest.ini_options]
pythonpath = "tests"
addopts = ["--verbose", "--import-mode=importlib", "--hypothesis-profile=test"]
markers = [
"fuzz: marks tests as using hypothesis fuzzing (deselect with '-m \"not fuzz\"')",
"regression: marks tests as regression tests against a previous website",
]
filterwarnings = ["ignore:Using slow pure-python SequenceMatcher:UserWarning"]
[tool.black]
line-length = 120
[tool.ruff]
line-length = 120
src = ["src", "test"]
select = [
"E",
"F",
"W",
"I",
"N", # Naming
"UP", # Upgrades
"COM", # Commas
"DJ", # Django Linting
"PT", # PyTest
"Q", # Quotes
"RET", # Funciton Returns
"SIM", # Simplification
"TID", # Tidy Imports
"PTH", # Use PathLib instead of os
"PL", # PyLint
]
extend-exclude = ["E712"]
[tool.ruff.per-file-ignores]
"__init__.py" = ["E402"]
"tests/**/*.py" = ["PLR2004"] # Ignore warning about asserts
"src/server/schemas/*" = ["E402"]
"src/server/database/migrations/versions/*" = ["E711"]
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"