-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
128 lines (115 loc) · 2.76 KB
/
pyproject.toml
File metadata and controls
128 lines (115 loc) · 2.76 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
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
[project]
name = "imperial_coldfront_plugin"
version = "0.1.0"
description = "A plugin for the Coldfront HPC management platform."
authors = [
{ name = "Christopher Cave-Ayland", email = "c.cave-ayland@imperial.ac.uk" },
{ name = "Imperial College London RSE Team", email = "ict-rse-team@imperial.ac.uk" },
]
requires-python = "~=3.11"
dependencies = [
"coldfront==v1.1.6",
"django",
"mozilla_django_oidc",
"django-stubs-ext",
"requests",
"uplink",
"ldap3",
"pint",
]
[project.optional-dependencies]
dev = [
"ruff",
"mypy",
"pip-tools",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-mypy",
"pytest-mock",
"pytest-django",
"django-stubs",
"types-requests",
"types-ldap3",
"beautifulsoup4",
]
doc = [
"mkdocs",
"mkdocstrings",
"mkdocstrings-python",
"mkdocs-material",
"mkdocs-gen-files",
"mkdocs-literate-nav",
"mkdocs-section-index",
]
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
exclude = [
"htmlcov",
] # Exclude the coverage report file from setuptools package finder
[tool.mypy]
disallow_any_explicit = true
disallow_any_generics = true
warn_unreachable = true
warn_unused_ignores = true
disallow_untyped_defs = true
exclude = [".venv/", "docs/", "migrations/", "site/"]
plugins = ["mypy_django_plugin.main"]
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"mozilla_django_oidc.*",
"coldfront.*",
"django_q.*",
"uplink.*",
"crispy_forms.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["imperial_coldfront_plugin.forms"]
disallow_any_explicit = false
[tool.pytest.ini_options]
addopts = [
"-v",
"-p",
"no:warnings",
"--cov=imperial_coldfront_plugin",
"--cov-report=html",
"--doctest-modules",
"--ignore=docs",
"--ignore=site",
"--ignore=makemigrations.py",
"--ignore=imperial_coldfront_plugin/migrations",
"--mypy",
]
[tool.ruff]
exclude = ["*/migrations"]
target-version = "py311"
[tool.ruff.lint]
select = [
"D", # pydocstyle
"E", # pycodestyle
"F", # Pyflakes
"I", # isort
"UP", # pyupgrade
"RUF", # ruff
]
pydocstyle.convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"D100",
"D104",
] # Missing docstring in public module, Missing docstring in public package
[tool.djlint]
profile = "django"
indent = 2
ignore = "H021"
extend_exclude = "imperial_coldfront_plugin/templates/imperial_coldfront_plugin/overrides/*"
[tool.django-stubs]
# use a dummy settings module that ensures we get all of the coldfront and plugin
# settings together
django_settings_module = "imperial_coldfront_plugin._mypy_settings"