-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
145 lines (125 loc) · 2.82 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
[tool.poetry]
name = "mrproject"
version = "0.2.0"
description = "`mrproject` - make projects from templates"
authors = ["Stefan Otte <stefan.otte@gmail.com>"]
readme = "README.md"
license = "MIT"
homepage = "https://github.com/sotte/mrproject/"
keywords = ["mrproject", "template", "scaffold"]
packages = [{ include = "mrproject", from = "." }]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
mrproject = "mrproject.__main__:main"
[tool.poetry.dependencies]
python = "^3.11"
appeal = ">=0.6.2"
rich = ">=13.7.0"
tomli = ">=2.0.1"
platformdirs = ">=4.1.0"
[tool.poetry.group.dev.dependencies]
pytest = ">=8.0"
pre-commit = ">=3.5"
pytest-watcher = ">=0.3"
pyright = ">=1.1.337"
mkdocs = ">=1.5"
mkdocstrings = { extras = ["python"], version = ">=0.24.0" }
mkdocs-material = ">=9.4.13"
ruff = ">=0.2"
cogapp = ">=3.3.0"
poethepoet = ">=0.24.4"
[tool.pytest.ini_options]
minversion = "8.0"
addopts = """
-ra
--doctest-modules
--ignore dummy/
"""
[tool.ruff]
# https://docs.astral.sh/ruff/configuration/
target-version = "py311"
[tool.ruff.format]
preview = true
[tool.ruff.lint]
preview = true
# Check available linters with `ruff linter`
select = [
"B", # flake8-bugbear
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"PD", # pandas-vet
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"UP", # pyupgrade
"W", # pydocstyle
]
ignore = [
"D100",
"D101",
"D102",
"D103",
"D104",
# "D105",
# "D106",
# "D107",
# "D202",
# "D301",
# "D419",
# "E501",
# "PD901",
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"D103", # Missing docstring in public function
]
[tool.ruff.lint.pycodestyle]
max-line-length = 120 # more relaxed settings for doctests
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.pyright]
venvPath = "."
venv = ".venv"
################################################################################
# POE TASK DEFINITIONS
# the order matters
[tool.poe.tasks]
[tool.poe.tasks.chores]
help = "Run all chores on the code base"
sequence = ["lint", "format", "types", "test"]
[tool.poe.tasks.test]
help = "Run tests"
cmd = "pytest"
[tool.poe.tasks.format]
help = "Format the code"
cmd = "ruff format"
[tool.poe.tasks.lint]
help = "Lint the code"
cmd = "ruff check --fix"
[tool.poe.tasks.types]
help = "Type check the code"
cmd = "pyright mrproject tests"
[tool.poe.tasks.pre-commit]
help = "Run all pre-commit checks"
cmd = "pre-commit run --all-files"
[tool.poe.tasks.docs]
help = "Build the docs"
cwd = "./docs"
cmd = "echo 'not implemented yet'"
[tool.poe.tasks.clean]
help = "Remove generated files"
cmd = """
rm -rf
.coverage
.mypy_cache
.pytest_cache
./mrproject/**/__pycache__
./mrproject/**/*.pyc
./mrproject/templates/**/.venv
./tests/**/*.pyc
dist
htmlcov
"""