-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
251 lines (240 loc) · 7.17 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
245
246
247
248
249
250
251
[project]
name = "phpytex"
version = "1.6.1a"
description = 'A transpiler which converts python augmented latex to latex'
urls = {homepage = 'https://github.com/RLogik/phpytex'}
authors = [
{name="RLogik", email="rlogik@users.noreply.github.com>"},
]
maintainers = [
{name="RLogik", email="rlogik@users.noreply.github.com>"},
]
license = "LICENCE"
readme = "README.md"
keywords = [
"python",
"latex",
"transpiler",
"lark",
]
# cf. https://pypi.org/classifiers
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
requires-python = ">=3.10,<=3.13"
dependencies = [
# --------------------------------
# compiler
# --------------------------------
# python = ">=3.10,<4.0"
"pip>=24.3.1",
# "poetry>=2.0.0",
"wheel>=0.45.1",
"setuptools>=75.8.0",
# --------------------------------
# code - general
# --------------------------------
"pathlib>=1.0.1",
"pathspec>=0.12.1",
"codetiming>=1.4.0",
"safetywrap>=1.5.0",
# --------------------------------
# code - async, distr. system
# --------------------------------
"asyncio>=3.4.3",
"anyio>=4.8.0",
# --------------------------------
# config
# --------------------------------
"toml>=0.10.2",
"argparse>=1.4.0",
"python-dotenv>=1.0.1",
"jsonschema>=4.23.0",
"lazy-load>=0.8.3",
"pyyaml>=6.0.2",
# --------------------------------
# models
# --------------------------------
"pydantic>=2.10.4",
"pydantic-yaml>=1.4.0",
# --------------------------------
# data
# --------------------------------
"numpy>=2.2.1",
# "polars>=1.19.0",
# "pyarrow>=18.1.0",
# --------------------------------
# parsing
# --------------------------------
"lark[regex]>=1.2.2",
"lark-parser[regex]>=0.12.0",
# --------------------------------
# miscellaneous
# --------------------------------
"datetime>=5.5",
# "pendulum>=3.0.0",
"pytz>=2024.2",
"tzdata>=2024.2", # NOTE: ensures that OS has access to timezones
"lorem-text>=2.1",
"flatDict>=4.0.1",
"codetiming>=1.4.0",
]
[dependency-groups]
dev = [
# --------------------------------
# testing
# --------------------------------
"coverage[toml]>=7.6.10",
"pytest-cov>=6.0.0",
# "pytest-lazy-fixture>=0.6.3",
"pytest-order>=1.3.0",
"pytest>=8.3.4",
"testfixtures>=8.3.0",
"behave>=1.2.6",
# --------------------------------
# data, mocks
# --------------------------------
# "faker>=25.5.0",
"mimesis[factory]>=18.0.0",
# --------------------------------
# model
# --------------------------------
"datamodel-code-generator>=0.26.4",
"openapi-generator-cli>=7.10.0",
"openapi-generator>=1.0.6",
# --------------------------------
# hooks and linting
# --------------------------------
"pre-commit>=4.0.1",
"ruff>=0.8.6",
"uv>=0.5.16",
# "black[d,jupyter]>=24.10.0",
]
[tool.setuptools]
include-package-data = true
[tool.setuptools.package-data]
# NOTE: depends on name of project!
phpytex = [
'models/*.yaml',
]
[tool.setuptools.packages.find]
where = [ 'src' ]
# NOTE: depends on name of project!
include = [ 'phpytex*' ]
namespaces = true
[tool.uv]
managed = true
package = false
# cf. https://docs.astral.sh/ruff/configuration
# and https://docs.astral.sh/ruff/settings
[tool.ruff]
include = ["pyproject.toml", "src/**/*.py", "tests/**/*.py", "*.ipynb", "*.pyi"]
exclude = ["src/models/generated/**/*.py"]
respect-gitignore = true
line-length = 96
indent-width = 4
target-version = "py311"
fix = true
[tool.ruff.lint]
fixable = ["ALL"]
select = ["D", "E", "F", "I", "RUF"]
ignore = [
"ARG001", # allow unused arguments
"BLE001", # allow blind exceptions
"D100", # do not require docstring for module
"D101", # do not require docstring for module
"D102", # do not reuire docstring
"D103", # do not reuire docstring
"D104", # do not reuire docstring
"D105", # do not reuire docstring
"D106", # do not reuire docstring
"D107", # do not reuire docstring
"D200", # prevent docstrings from being forced to fit one-line
"D203",
"D205", # do not require blank line between summary and description in docstring
"D211",
"D212", # prevent first newline from being removed in docstrings
"D400", # prevent grammatical constraints (full stop)
"D401", # prevent grammatical constraints (imperative mood)
"D403", # prevent case changes in Docstrings.
"D404", # allow freedom of expression in docstrings
"D415", # do not require punctuation in docstring
"EXE001", # allow unused shebangs
"E402", # allow module level import to be not at top of file
"E501", # ignore "line too long" errors in case "fmt: skip" pragma is used
# "E703",
"E712", # turn off, as sometimes variables have mixed boolean + string/null types
"E731", # allow lambda expressions
"F403", # disable as conflicts with *-imports
"F405", # disable as conflicts with *-imports
# "F541", # allow f-string without placeholders
"F841", # unused variables - need to switch off e.g. for decorators
"F811", # allow redefinition of methods
# "I100", # disable imports from same library being forced into a single ,-separated statement
# "I102", # disable multiple import formatting
"S110", # allow try-except-pass
"TID252", # allow relative imports from parent modules
"UP009", # allow utf-8 shebangs
]
[tool.ruff.lint.isort]
relative-imports-order = "furthest-to-closest"
no-sections = false
from-first = false
combine-as-imports = false
case-sensitive = true
force-single-line = true
# known-local-folder = ["src", "tests"]
known-first-party = ["src", "tests"]
forced-separate = [
"tests",
"src._core",
"src.setup",
"src.models",
"src",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
skip-magic-trailing-comma = false # false = allow trailing comma
docstring-code-format = false
docstring-code-line-length = "dynamic"
[tool.pytest.ini_options]
minversion = "8.3.4"
testpaths = [
"tests",
]
python_files = [
"**/tests_*.py", # <- pattern for file names to be tested
]
asyncio_mode = "auto"
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
]
# NOTE: appends (not prepends) flags:
addopts = [
"--order-dependencies",
"--order-group-scope=module",
"--cache-clear",
"--verbose",
"--maxfail=1",
"-k test_", # <- pattern for methods to count as tests
"-k tests_", # <- pattern for methods to count as tests
# NOTE: will be ignored, if --cov not used (e.g. integration tests):
"--no-cov-on-fail",
"--cov-report=term",
"--cov-config=.coveragerc",
# NOTE: for development purposes only:
# "-s", # verbose print/err capturing disabled
"--capture=tee-sys", # verbose print/err capturing enabled
]