-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
132 lines (118 loc) · 3.14 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 = "django-pgcron"
version = "0.1.0"
description = "Manage pgcron jobs from Django"
readme = "README.md"
requires-python = ">=3.10, <3.14"
dependencies = [
"django>=5.0.0"
]
authors = [{ name = "Maxwell Muoto", email = "[email protected]" }]
license = { file = "LICENSE" }
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.coverage.run]
source = ["pgcron"]
[tool.hatch.build.targets.sdist]
exclude = ["*/tests/"]
[tool.hatch.build.targets.wheel]
include = ["pgcron"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"pass",
"pytest.mark.skip",
"@(typing\\.)?overload",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
"class .*\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
show_missing = true
fail_under = 100
omit = ["*/tests/*"]
[tool.pytest.ini_options]
xfail_strict = true
testpaths = "pgcron/tests"
norecursedirs = ".venv"
addopts = "--reuse-db"
DJANGO_SETTINGS_MODULE = "settings"
[dependency-groups]
dev = [
"pytest >=8.1.1,<9",
"pytest-cov>=6.0.0,<7",
"pyright ~=1.1.364",
"ruff ~=0.8.4",
"pytest-django>=4.9.0",
"ipdb~=0.13.13",
"dj-database-url>=2.3.0",
"psycopg[binary]>=3.2.3",
"django-types==0.20.0",
"mkdocs>=1.6.1",
"mkdocs-material>=9.5.42",
"mkdocstrings-python>=1.12.2",
"black>=24.0.0", # Required for mkdocs
]
[tool.ruff]
target-version = "py310"
line-length = 100
lint.select = [
"I", # isort
"F", # pyflakes
"ANN", # flake8-annotations
"Q", # flake8-quotes
"TD", # flake8-todos
"ASYNC", # flake8-async
"TID", # flake8-tidy
"RSE", # flake8-raise
"G", # flake8-logging-format
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"ICN", # flake8-import-conventions
"E", # pycodestyle errors
"W", # pycodestyle warnings
"PIE", # flake8-pie
"S", # flake8-bandit
"SIM", # flake8-simplify
"RUF", # Ruff-specific rules
"PERF", # Perflint
"PLC", # Pylint
"UP", # pyupgrade
"NPY", # NumPy-specific rules
"INP", # flake8-no-pep420
"T20", # flake8-print
"PYI", # flake8-pyi
"TCH", # Flake-8 type checking
"TRY", # tryceratops
"PT", # flake8-pytest-style
"DJ013", # Receiver decorator must proceed other decorators
"T10", # flake-8 debugger - prevent leftover breakpoints
"PT009", # Use bare assert statements.
]
lint.ignore = [
"ANN401", # Allow any type for annotations
"S105", # False positive.
"TRY003",
]
[tool.ruff.lint.extend-per-file-ignores]
"**/tests/**/*.py" = ["PYI", "B", "S", "ANN"]
"**/migrations/**/*.py" = ["ANN", "RUF012"]
"**/management/**/*.py" = ["RUF012"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
[tool.pyright]
include = ["pgcron"]
exclude = [
"**/node_modules",
"**/__pycache__",
"src/experimental",
"src/typestubs",
"**/venv",
]
pythonVersion = "3.10"
typeCheckingMode = "strict"