-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
132 lines (116 loc) · 3.34 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[project]
name = 'ov-wag'
dynamic = ['version']
description = 'WGBH Open Vault Wagtail backend'
authors = [{ name = 'WGBH-MLA', email = 'ryan_harbert@wgbh.org' }]
readme = 'README.md'
license = { text = 'MIT' }
dependencies = [
"Django~=5.1.5",
"wagtail~=6.4",
"wagtail-factories~=4.2.1",
"pydantic~=2.10.6",
"psycopg2~=2.9.10",
"python-dotenv~=1.0.1",
"gunicorn~=23.0.0",
"wagtail-headless-preview~=0.8.0",
"django-cors-headers~=4.6.0",
"django-allauth~=65.3.1",
"elasticsearch~=8.17.1",
"wagtail-footnotes~=0.13.0",
]
requires-python = '~=3.10'
[dependency-groups]
dev = [
"black~=25.1.0",
"ruff~=0.9.4",
"pre-commit~=4.1.0",
]
docs = [
"mkdocs~=1.6.1",
"mkdocs-material~=9.6.2",
"mike~=2.1.3",
"mkdocstrings[python]~=0.28.0",
"mkdocs-git-revision-date-localized-plugin~=1.3.0",
"mkdocs-jupyter~=0.25.1",
]
test = [
"pytest~=8.3.4",
"pytest-django~=4.9.0",
"pytest-cov~=6.0.0",
"pytest-sugar~=1.0.0",
"pytest-xdist~=3.6.1",
"nbmake~=1.5.5",
"coverage~=7.6.10",
]
[project.optional-dependencies]
cli = [
"typer~=0.15.1",
"loguru~=0.7.3",
"trogon~=0.6.0",
]
production = [
"gunicorn[standard]~=23.0.0",
"django-storages[s3]~=1.14.4",
]
[project.urls]
documentation = 'https://wgbh-mla.github.io/ov-wag/'
homepage = 'https://github.com/WGBH-MLA/ov-wag'
repository = 'https://github.com/WGBH-MLA/ov-wag'
[project.scripts]
ov = 'cli:app'
ov-docs = 'mkdocs.commands:serve.serve'
[build-system]
requires = ['pdm-backend']
build-backend = 'pdm.backend'
[tool.black]
extend-exclude = 'migrations'
[tool.ruff]
extend-exclude = ['migrations']
[tool.pdm]
version = { source = 'file', path = 'ov_wag/_version.py' }
[tool.pdm.scripts]
# Development
dev = { shell = 'python manage.py runserver' }
# Migrations
makemigrations = { shell = 'python manage.py makemigrations' }
migrate = { shell = 'python manage.py migrate' }
# Dependency management
## Lockfiles
lock-dev = { shell = 'pdm lock -G dev,test,cli' }
lock-prod = { shell = 'pdm lock -G production -L pdm-locks/pdm.prod.lock' }
lock-docs = { shell = 'pdm lock -G docs -L pdm-locks/pdm.doc.lock' }
locks = { composite = ['lock-dev', 'lock-prod', 'lock-docs'] }
## Upgrades
upgrade = { shell = 'pdm update -G dev,test,cli -u --no-sync --no-self' }
upgrade-prod = { shell = 'pdm update --no-default -G production -L pdm-locks/pdm.prod.lock -u --no-sync --no-self' }
upgrade-docs = { shell = 'pdm update --no-default -G docs -L pdm-locks/pdm.doc.lock -u --no-sync --no-self' }
upgrade-all = { composite = ['upgrade', 'upgrade-prod', 'upgrade-docs'] }
# Docs
docs = { shell = 'mkdocs serve' }
[lint]
select = [
'B', # flake8-bugbear
'C4', # flake8-comprehensions
'C90', # mccabe
'E', # pycodestyle errors
'ERA', # eradicate
'F', # pyflakes
# 'I', # isort
'INT', # flake8-gettext
'N', # pep8-naming
'PIE', # flake8-pie,
'PLC', # pylint - convention
'PLE', # pylint - error
'PLW', # pylint - warning
'Q', # flake8-quotes
'RET', # flake8-return,
'RUF', # Ruff-specific rules
'SIM', # flake8-simplify
'UP', # pyupgrade
'W', # pycodestyle warnings
]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = 'ov_wag.settings.test'
python_files = ['tests.py', 'test_*.py', '*_tests.py']
testpaths = ['authors', 'exhibits', 'ov_collections', 'ov_wag']