-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
285 lines (272 loc) · 8.35 KB
/
pyproject.toml
File metadata and controls
285 lines (272 loc) · 8.35 KB
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
[project]
name = "example-rabbit-mq"
version = "0.3.3"
description = 'Example tool to recursively search a file system from a given point and message rabbit mq'
authors = [
{name="raj-open", email="raj-open@users.noreply.github.com"},
]
urls = {homepage = 'https://github.com/raj-open/example-rabbit-mq'}
maintainers = [
{name="raj-open", email="raj-open@users.noreply.github.com"},
]
license = 'LICENCE'
readme = 'README.md'
keywords = [
"python",
"rabbit-mq"
]
# 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.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
requires-python = ">=3.11,<3.15"
dependencies = [
# --------------------------------
# compiler
# --------------------------------
"pip>=25.3",
# --------------------------------
# code - general
# --------------------------------
"pathlib>=1.0.1",
"pathspec>=0.12.1",
"codetiming>=1.4.0",
"safetywrap>=1.5.0",
# --------------------------------
# code - async, distr. system
# --------------------------------
"asyncio>=4.0.0",
"lazy-load>=0.8.3",
# --------------------------------
# web
# --------------------------------
"certifi>=2025.10.5",
# --------------------------------
# config
# --------------------------------
"toml>=0.10.2",
"argparse>=1.4.0",
"python-dotenv>=1.2.1",
"jsonschema>=4.25.1",
"pyyaml>=6.0.3",
# "lxml>=6.0.2",
# --------------------------------
# models
# --------------------------------
"pydantic[email]>=2.12.3",
"pydantic-yaml>=1.6.0",
# "sqlalchemy>=2.0.44",
# "pyodbc>=5.3.0",
# --------------------------------
# maths + data
# --------------------------------
# "numpy>=2.3.3",
# "pandas>=2.3.2",
# "polars>=1.33.1",
# "polars-lts-cpu>=1.33.1", # use instead of polars so that it works on docker
# "pyarrow>=22.0.0",
# "openpyxl>=3.1.5",
# "fastexcel>=0.16.0",
# "xlsxwriter>=3.2.9",
# "pint>=0.25",
# --------------------------------
# rendering
# --------------------------------
"tabulate>=0.9.0",
# --------------------------------
# miscellaneous
# --------------------------------
"croniter>=6.0.0",
"datetime>=5.5",
"python-dateutil>=2.9.0.post0",
"tzdata>=2025.2", # NOTE: necessary to ensure that OS has access to timezones
"tzlocal>=5.3.1",
"pytz>=2025.2",
"lorem-text>=3.0",
"flatDict>=4.0.1",
"strip-ansi>=0.1.1",
# --------------------------------
# web + API
# --------------------------------
"httpx>=0.28.1", # NOTE: recommended over requests/urllib(3)
"fastapi[all]>=0.120.4",
"fastapi-offline>=1.7.5",
"uvicorn>=0.38.0",
# "Office365-REST-Python-Client>=2.6.2",
# --------------------------------
# rabbit mq
# --------------------------------
"pika>=1.3.2",
]
[dependency-groups]
dev = [
# --------------------------------
# testing
# --------------------------------
"pytest>=8.4.2",
"coverage[toml]>=7.11.0",
"pytest-cov>=7.0.0",
"pytest-order>=1.3.0",
"testfixtures>=10.0.0",
"behave>=1.3.3",
# --------------------------------
# model
# --------------------------------
"datamodel-code-generator>=0.35.0",
"openapi-generator-cli>=7.17.0",
"openapi-generator>=1.0.6",
# --------------------------------
# data, mocks
# --------------------------------
# "faker>=25.5.0",
"mimesis[factory]>=18.0.0",
# --------------------------------
# hooks and linting
# --------------------------------
# "pre-commit>=4.1.0",
"uv>=0.9.7",
"ruff>=0.14.3",
]
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
include-package-data = true
[tool.pip]
extra-index-url = [
"https://pypi.org/project/ifcopenshell"
]
[tool.setuptools.package-data]
# NOTE: depends on name of project!
example-rabbit-mq = [
'models/*.yaml',
]
[tool.setuptools.packages.find]
where = [ 'src' ]
# NOTE: depends on name of project!
include = [ 'example-rabbit-mq*' ]
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
"RUF018", # allow assignment expressions in asserts
"RUF028", # allow suppression comments within parts
"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.4.2"
testpaths = [
"tests",
]
python_files = [
"**/tests_*.py", # <- pattern for file names to be tested
]
asyncio_mode = "auto"
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
]
markers = [
"remote: tests that require credentials and for connection to remote services in order to run",
"rabbit: tests that require rabbit mq to be started in order to run",
]
# 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
"-m",
"not (remote or rabbit)",
]