-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
236 lines (218 loc) · 6.38 KB
/
pyproject.toml
File metadata and controls
236 lines (218 loc) · 6.38 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
[project]
name = "compose-api"
version = "0.4.0"
description = "An API server for reproducible biological workflows and cosimulations."
authors = [{ name = "Jim Schaff", email = "[email protected]" }]
requires-python = ">=3.13.2,<4.0"
readme = "README.md"
keywords = ['python']
dependencies = [
"uvicorn>=0.35.0,<0.36",
"dotenv>=0.9.9,<0.10",
"fastapi>=0.116.1,<0.117",
"pydantic>=2.11.5,<3",
"asyncssh>=2.21.0,<3",
"pydantic-settings>=2.9.1,<3",
"pyyaml>=6.0.2,<7",
"typing-extensions>=4.14.0,<5",
"pymongo>=4.13.0,<5",
"sqlalchemy[asyncio]>=2.0.41,<3",
"asyncpg>=0.30.0,<0.31",
"nats-py>=2.10.0,<3",
"alembic>=1.16.2,<2",
"async-lru>=2.0.5,<3",
"httpx>=0.28.1,<0.29",
"polars-lts-cpu[pyarrow]>=1.31.0,<2",
"python-multipart>=0.0.20,<0.0.21",
"numpy>=2.3.1,<3",
"ruff>=0.12.2,<0.13",
"nbformat>=5.10.4,<6",
"vl-convert-python>=1.8.0,<2",
"tqdm>=4.67.1,<5",
"seaborn>=0.13.2,<0.14",
"python-dateutil>=2.9.0.post0,<3",
"spython",
"jinja2>=3.1.6",
"python-libsedml>=2.0.33",
"biosimulators-utils>=0.2.3",
"python-libsbml>=5.20.5",
"pbest==0.4.0",
]
[project.urls]
Homepage = "https://biosimulations.github.io/compose-api/"
Repository = "https://github.com/biosimulations/compose-api"
Documentation = "https://biosimulations.github.io/compose-api/"
[dependency-groups]
dev = [
"pytest>=8.3.5,<9",
"pytest-cov>=4.0.0,<5",
"deptry>=0.23.0,<0.24",
"mypy>=1.5.1,<2",
"pre-commit>=3.4.0,<4",
"tox>=4.11.1,<5",
"types-requests>=2.32.0.20250602,<3",
"types-pyyaml>=6.0.12.20250516,<7",
"pytest-asyncio>=1.0.0,<2",
"testcontainers[nats, postgres]>=4.10.0,<5",
"types-tqdm>=4.67.0.20250516,<5",
"openapi-python-client>=0.25.2,<0.26",
"types-python-dateutil>=2.9.0.20250708,<3"
]
docs = [
"mkdocs>=1.4.2,<2",
"mkdocs-material>=9.2.7,<10",
"mkdocstrings[python]>=0.26.1,<0.27",
"sphinx>=8.2.3,<9",
"sphinx-autodoc-typehints>=3.2.0,<4",
"sphinx-rtd-theme>=3.0.2,<4",
]
[tool.uv]
default-groups = [
"dev",
"docs",
]
[tool.uv.sources]
bsander = { git = "https://github.com/biosimulators/bsander.git" }
[tool.hatch.build.targets.sdist]
include = [
"compose_api",
"tests",
]
[tool.hatch.build.targets.wheel]
include = [
"compose_api",
"tests",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.mypy]
files = ["compose_api", "tests"]
strict = true
exclude = ['^compose_api/api/client/.*']
[[tool.mypy.overrides]]
module = ["process_bigraph.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--cov-report=html"
[tool.deptry]
exclude = [".venv/*"]
ignore = ["DEP002", "DEP003", "DEP004"]
[tool.ruff]
target-version = 'py39'
line-length = 120
fix = true
[tool.ruff.lint]
select = [
# flake8-2020
"YTT",
# flake8-bandit
"S",
# flake8-bugbear
"B",
# flake8-builtins
"A",
# flake8-comprehensions
"C4",
# flake8-debugger
"T10",
# flake8-simplify
"SIM",
# isort
"I",
# mccabe
"C90",
# pycodestyle
"E", "W",
# pyflakes
"F",
# pygrep-hooks
"PGH",
# pyupgrade
"UP",
# ruff
"RUF",
# tryceratops
"TRY",
]
ignore = [
# # A001 Variable `sum` is shadowing a Python builtin
# "A001",
# # B008 Do not perform function call `Body` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable
# "B008",
# # B026 Star-arg unpacking after a keyword argument is strongly discouraged
# "B026",
# B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
"B904",
# # C414 Unnecessary `list` call within `tuple()`
# "C414",
# # C416 Unnecessary `list` comprehension (rewrite using `list()`)
# "C416",
# # C417 Unnecessary `map` usage (rewrite using a `list` comprehension)
# "C417",
# # C419 Unnecessary list comprehension
# "C419",
# # E501 Line too long (131 > 120)
# "E501",
# # E722 Do not use bare `except`
# "E722",
# # E731 Do not assign a `lambda` expression, use a `def`
# "E731",
# # F841 Local variable `keys` is assigned to but never used
# "F841",
# # PGH003 Use specific rule codes when ignoring type issues
# "PGH003",
# # RUF009 Do not perform function call `Field` in dataclass defaults
# "RUF009",
# RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
"RUF012",
# # RUF013 PEP 484 prohibits implicit `Optional
# "RUF013",
# # S101 Use of `assert` detected
# "S101",
# # *** S113 Probable use of `requests` call without timeout
# "S113",
# # S301 `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue
# "S301",
# # S307 Use of possibly insecure function
# "S307",
# # S603 `subprocess` call: check for execution of untrusted input
# "S603",
# # S608 Possible SQL injection vector through string-based query construction
# "S608",
# # SIM101 Multiple `isinstance` calls for expression, merge into a single call
# "SIM101",
# # SIM105 Use `contextlib.suppress(KeyError)` instead of `try`-`except`-`pass`
# "SIM105",
# # SIM108 Use ternary operator `source = self.model_source.value if isinstance(self.model_source, ModelFilepath) else self.model_source` instead of `if`-`else`-block
# "SIM108",
# # SIM118 Use `key not in dict` instead of `key not in dict.keys()`
# "SIM118",
# TRY002 Create your own exception
"TRY002",
# TRY003 Avoid specifying long messages outside the exception class
"TRY003",
# # TRY004 Prefer `TypeError` exception for invalid type
# "TRY004",
# TRY201 Use `raise` without specifying exception name
"TRY201",
# TRY300 Consider moving this statement to an `else` block
"TRY300",
# # TRY400 Use `logging.exception` instead of `logging.error`
# "TRY400",
# UP006 Use `dict` instead of `Dict` for type annotation
"UP006",
# # UP035 `typing.Dict` is deprecated, use `dict` instead
# "UP035",
]
exclude = [".venv/*", "compose_api/api/client/*", "documentation/*"]
[tool.ruff.format]
preview = true
[tool.coverage.report]
skip_empty = true
[tool.coverage.run]
branch = true
source = ["compose_api"]
[tool.ruff.per-file-ignores]
"tests/*" = ["S101"]