-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
186 lines (167 loc) · 4.22 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
[project]
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
name = "lander"
description = "HTML landing page generator for PDF/LaTeX documents"
license = {file = "LICENSE"}
readme= "README.rst"
keywords = [
"rubin",
"lsst",
]
# https://pypi.org/classifiers/
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: POSIX",
"Typing :: Typed",
]
requires-python = ">=3.11"
dependencies = [
"python-dateutil>=2.6.0",
"Jinja2>=2.10.1",
"pydantic >= 2.0.0",
"email-validator", # for pydantic
"bleach",
"pypandoc",
"panflute>=2", # https://github.com/sergiocorreia/panflute#supported-pandoc-versions
"GitPython",
"typer",
"base32-lib",
]
dynamic = ["version"]
[project.optional-dependencies]
dev = [
# Testing
"pytest",
"pytest-asyncio",
"coverage[toml]",
"beautifulsoup4",
"types-bleach",
"types-setuptools",
"types-PyYAML",
"coverage[toml]",
"mypy",
# Documentation
"documenteer[guide]",
"scriv"
]
[project.urls]
Homepage = "https://github.com/lsst-sqre/lander"
Source = "https://github.com/lsst-sqre/lander"
[project.entry-points.'lander.parsers']
article = "lander.parsers.article:ArticleParser"
[project.entry-points.'lander.themes']
base = "lander.themes.base:BaseTheme"
minimalist = "lander.themes.minimalist:MinimalistTheme"
[project.scripts]
lander = "lander.cli:app"
lander-deparagraph = "lander.ext.parser.pandoc.filters.deparagraph:main"
[build-system]
requires = [
"setuptools>=61",
"wheel",
"setuptools_scm[toml]>=6.2"
]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
[tool.black]
line-length = 79
target-version = ["py312"]
exclude = '''
/(
\.eggs
| \.git
| \.mypy_cache
| \.tox
| \.venv
| _build
| build
| dist
)/
'''
# Use single-quoted strings so TOML treats the string like a Python r-string
# Multi-line strings are implicitly treated by black as regular expressions
[tool.coverage.run]
parallel = true
branch = true
source = ["lander"]
[tool.coverage.paths]
source = ["src", ".tox/*/site-packages"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:"
]
[tool.pytest.ini_options]
asyncio_mode = "strict"
python_files = [
"tests/*.py",
"tests/*/*.py"
]
[tool.mypy]
disallow_untyped_defs = true
disallow_incomplete_defs = true
ignore_missing_imports = true
local_partial_types = true
no_implicit_reexport = true
strict_equality = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_ignores = true
plugins = [
"pydantic.mypy"
]
# Use the generic Ruff configuration in ruff.toml and extend it with only
# project-specific settings. Add a [tool.ruff.lint.extend-per-file-ignores]
# section for project-specific ignore rules.
[tool.ruff]
extend = "ruff-shared.toml"
[tool.ruff.lint]
ignore = [
"ANN101",
"ANN102",
]
[tool.ruff.lint.extend-per-file-ignores]
"src/lander/ext/parser/texutils/extract.py" = [
"C901", # allow large functions in this module
"PLR0912", # allow large functions in this module
]
"src/lander/settings.py" = [
"C901", # allow large functions in this module
"PLR0912", # allow large functions in this module
]
"src/lander/cli.py" = [
"T201", # allow print statements in CLI scripts
]
"tests/**/*.py" = [
"T201", # allow print statements in tests
]
[tool.ruff.lint.isort]
known-first-party = ["lander", "tests"]
split-on-trailing-comma = false
[tool.scriv]
categories = [
"Backwards-incompatible changes",
"New features",
"Bug fixes",
"Other changes",
]
entry_title_template = "{{ version }} ({{ date.strftime('%Y-%m-%d') }})"
format = "md"
md_header_level = "2"
new_fragment_template = "file:changelog.d/_template.md.jinja"
skip_fragments = "_template.md.jinja"