-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
231 lines (202 loc) · 5.42 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
[project]
name = "django-anvil-consortium-manager"
# Version needs to be updated such that the canonical version is only stored in one place.
# version = "0.19"
authors = [
{name="Adrienne Stilp", email="[email protected]"},
]
description = "A Django app to manage Consortium AnVIL groups, workspaces, and access."
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Framework :: Django",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
dependencies = [
"Django >= 4.2",
"pytz >= 0",
"crispy-bootstrap5 >= 0.6",
"django-crispy-forms >= 1.12",
"google-auth >= 2.6",
"fontawesomefree >= 6.1",
"django-autocomplete-light >= 3.9",
"django-filter >= 23.0",
"django-tables2 >= 2.4",
"django-simple-history >= 3.1.1",
"django-extensions >= 3.1.5",
"plotly >= 5.11.0",
"networkx >= 2.8.2",
"numpy >= 1.26; python_version >= '3.12'",
"numpy >= 1.24; python_version < '3.12'",
"requests",
]
dynamic = ["version"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project.urls]
"Homepage" = "https://github.com/UW-GAC/django-anvil-consortium-manager"
"Bug Tracker" = "https://github.com/UW-GAC/django-anvil-consortium-manager/issues"
[tool.setuptools.dynamic]
version = {attr = "anvil_consortium_manager.__version__"}
[tool.setuptools.packages.find]
include = ["anvil_consortium_manager*"]
[tool.ruff]
exclude = [
".git",
"*/migrations/*",
"*/static/CACHE/*",
"docs",
"node_modules",
"venv",
]
ignore = []
line-length = 120
[tool.ruff.lint]
extend-select = [
"E",
"F",
"W", # pycodestyle warnings
"I", # isort
"DJ", # flake8-django
"E501", # line-too-long
]
[tool.ruff.lint.isort]
known-first-party = ["anvil_consortium_manager", "example_site"]
[tool.coverage.run]
include = ["anvil_consortium_manager/*"]
omit = ["*migrations*", "*tests*"]
plugins = ["django_coverage_plugin"]
[tool.coverage.report]
exclude_lines = ["@abstractproperty"]
[tool.pytest.ini_options]
addopts = "--ignore=anvil_consortium_manager/tests/test_app --ds=anvil_consortium_manager.tests.settings.test"
python_files = ["anvil_consortium_manager/tests/test*.py"]
python_classes = ["!TestWorkspaceDataFactory"]
# HATCH
# ------------------------------------------------------------------------------
[tool.hatch]
[tool.hatch.version]
path = "anvil_consortium_manager/__init__.py"
[tool.hatch.build]
include = [
"anvil_consortium_manager/",
]
[tool.hatch.envs.default]
dependencies = [
"Django >= 3.2,<=6.0",
"django-debug-toolbar",
# Process a .env file for environment variables
"django-environ",
# Interactive debugging
"ipdb",
# Pre-commit hooks
"pre-commit",
]
[tool.hatch.envs.default.scripts]
dj = "python manage.py {args}"
tests = "hatch run test-sqlite.py3.12-4.2:test {args}"
all = [
"hatch run lint:run",
"rm -f .coverage.*",
"hatch run test-sqlite:cov",
"hatch run test-mysql:cov",
"hatch run cov:combine",
"hatch run cov:html",
]
printenv = [
"echo DBBACKEND=$DBBACKEND",
"echo DBNAME=$DBNAME"
]
lint = "hatch run lint:run"
[tool.hatch.envs.testing]
dependencies = [
# Coverage for django templates
"django-coverage-plugin",
"django-debug-toolbar",
# Process a .env file for environment variables
"django-environ",
# For testing migrations
"django-test-migrations", # https://github.com/wemake-services/django-test-migrations
# Test coverage
"coverage[toml]>=6.5",
# Model factories
"factory-boy",
# Set the system time in tests
"freezegun", # https://github.com/spulec/freezegun
# For interactive debugging if necessary.
"ipdb",
"pytest >= 6.0",
"pytest-django",
# Mocked responses in tests
"responses", # https://github.com/getsentry/responses
]
[tool.hatch.envs.testing.scripts]
test = [
"pytest {args}"
]
cov = [
"coverage run -p -m pytest",
]
[tool.hatch.envs.test-sqlite]
template = "testing"
[tool.hatch.envs.test-sqlite.env-vars]
DBBACKEND = "sqlite3"
DBNAME = ":memory:"
[[tool.hatch.envs.test-sqlite.matrix]]
python = ["3.8", "3.10", "3.12"]
django = ["4.2", "5.0"]
[tool.hatch.envs.test-sqlite.overrides]
matrix.django.extra-dependencies = [
{ value = "django ~= 4.2.0", if = ["4.2"] },
{ value = "django ~= 5.0.0", if = ["5.0"] },
]
[tool.hatch.envs.test-mysql]
template = "testing"
extra-dependencies = [
"mysqlclient"
]
[tool.hatch.envs.test-mysql.env-vars]
DBBACKEND = "mysql"
[[tool.hatch.envs.test-mysql.matrix]]
python = ["3.8", "3.10", "3.12"]
django = ["4.2", "5.0"]
[tool.hatch.envs.test-mysql.overrides]
matrix.django.extra-dependencies = [
{ value = "django ~= 4.2.0", if = ["4.2"] },
{ value = "django ~= 5.0.0", if = ["5.0"] },
]
[tool.hatch.envs.cov]
skip-install = true
dependencies = [
# Coverage for django templates
"django-coverage-plugin",
"Django ~= 4.2",
"coverage[toml]>=6.5"
]
[tool.hatch.envs.cov.scripts]
combine = [
# Clean up old files first.
"rm -f .coverage",
"coverage combine",
]
report = ["coverage report"]
html = ["coverage html"]
xml = ["coverage xml"]
[tool.hatch.envs.lint]
detached = true
python = "3.12"
dependencies = [
"pre-commit"
]
[tool.hatch.envs.lint.scripts]
run = "pre-commit run --all-files"
[tool.hatch.envs.docs]
extra-dependencies = [
"sphinx",
"sphinx-rtd-theme",
"sphinx-autobuild"
]