-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
244 lines (212 loc) · 6.15 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
232
233
234
235
236
237
238
239
240
241
242
243
244
# This is a comment.
# syntax-documentation:
# - https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
#
# NOTE: you have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
#
# > just install
# > uv sync
# > uv sync --all-groups
# > uv sync --with <groupname>
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "autoread_dotenv"
version = "1.0.3"
description = "Automatically set env-vars at the beginning of every python-process in your in-project virtualenv."
readme = "docs/readme.md"
authors = [{ name = "Wouter Vanden Hove", email = "[email protected]" }]
maintainers = [{ name = "Wouter Vanden Hove", email = "[email protected]" }]
requires-python = ">=3.8"
license = { file = "license.md" }
keywords = ["entrypoints", "dotenv", "sitecustomize"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Typing :: Typed",
]
dependencies = [
"python-dotenv>=1.0.0",
"sitecustomize-entrypoints>=1.1.0",
]
[dependency-groups]
dev = [
"autoread-dotenv>=1.0.3",
"pylint>=3.1.0",
"ruff>=0.8.6",
]
ipython = [
"ipython>=8.0",
"rich>=13.9.4",
]
packaging = [
"pyroma>=4.2",
]
pre-commit = [
"pre-commit>=3.5", # 3.5 still supports python3.8
"pre-commit-hooks>=5.0.0",
]
security = [
"bandit>=1.7",
#bandit = { extras = ["toml"], version = ">=1.7" }
"safety>=2.3",
]
testing = [
"pytest>=8.1.1",
"pytest-clarity>=1.0",
"pytest-cov>=5.0.0",
"pytest-dotenv>=0.5.2",
]
typing = [
"mypy>=1.14.1",
]
# https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#advanced-plugins
# https://github.com/Darsstar/sitecustomize-entrypoints/blob/main/src/sitecustomize/__init__.py
[project.entry-points.sitecustomize]
autoread_dotenv = "autoread_dotenv:entrypoint"
[project.urls]
homepage = "https://github.com/libranet/autoread-dotenv"
repository = "https://github.com/libranet/autoread-dotenv"
documentation = "https://autoread-dotenv.readthedocs.io"
[tool.coverage.html]
directory = "var/html/coverage"
[tool.coverage.xml]
output = "var/html/coverage/coverage.xml"
[tool.coverage.report]
# cfr. https://coverage.readthedocs.io/en/coverage-4.2/excluding.html
exclude_lines = [
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
]
include = ["src/*"]
[tool.coverage.run]
branch = true
data_file = "var/cache/coverage/coverage.db"
[tool.hatch]
# https://hatch.pypa.io/latest/
[tool.hatch.build]
#ignore-gitignore = true # ignore .gitignore
# include = [ # include only these files
# "src/**/",
# "docs/**",
# "license.md",
# "pyproject.toml",
# ]
# exclude = [
# # "src/**/__pycache__/**",
# # "src/**/*.pyc",
# ".just/**",
# ".vscode/**",
# "*.lock",
# ".env",
# ".env.*",
# ".gitignore",
# ".pre-commit-config.yaml",
# ".python-version",
# "etc/**",
# "justfile",
# "scripts/**",
# "tests/**",
# "todo.md",
# ]
[tool.mypy]
# cfr https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml-file
cache_dir = "var/cache/mypy"
check_untyped_defs = true
disallow_untyped_defs = true
exclude = "^bin/"
ignore_missing_imports = true
mypy_path = ["src"]
pretty = true
[tool.pylint.design]
# complete pylint-config, see https://github.com/PyCQA/pylint/blob/main/pylintrc
exclude-too-few-public-methods = []
max-attributes = 11 # default is 11
[tool.pylint.format]
max-line-length = 120
good-names = [
"i", # counter in loop
]
max-args = 5 # default is 5
[tool.pylint.messages_control]
disable = [
# wontfix
# "W1203", # logging-fstring-interpolation
# "fixme", # Disable reporting of TODO, FIXME, and XXX comments
]
[tool.pytest.ini_options]
cache_dir = "var/cache/pytest"
log_cli = false # enable to show log-output
log_cli_level = "NOTSET"
filterwarnings = []
markers = [ # avoid warnings about unregistered markers
"unit",
"integration",
"slow",
]
testpaths = ["tests"]
# addopts = "--color=yes --report-dir='var/coverage/html'"
# report-dir = "var/cache/coverage"
[tool.ruff]
# https://beta.ruff.rs/docs/configuration/
# https://docs.astral.sh/ruff/configuration/#using-pyprojecttoml
cache-dir = "var/cache/ruff" # relative to project_root
line-length = 120
[tool.ruff.lint]
ignore = [
# D203 conflicts withs D211
"D203", # 1 blank line required before class docstring
# "D211", # No blank lines allowed before class docstring
# D212 conflicts with D213
"D212", # Multi-line docstring summary should start at the first line
# "D213", # Multi-line docstring summary should start at the second line
"ERA001", # Found commented-out code
]
select = ["ALL"]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
[tool.ruff.lint.isort]
# https://docs.astral.sh/ruff/settings/#lintisort
combine-as-imports = true
force-single-line = false
from-first = false
known-third-party = []
known-first-party = ["autoread_dotenv"]
known-local-folder = ["_helpers"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"ANN001", # Missing type annotation
"D103", # Missing docstring in public function
"INP001", # tests-dir should not be a python-package
"S101", # Use of `assert` detected
]
[tool.uv]
managed = true
package = true
default-groups = [
# "dev",
# "ipython",
# "jupyter",
# "pre-commit",
# "testing",
# "typing",
]