Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
183 lines (164 loc) · 5.58 KB
/
Copy pathpyproject.toml
File metadata and controls
183 lines (164 loc) · 5.58 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
[build-system]
# CI installs setuptools-scm with the same bound to compute the version of
# images (`.github/workflows/ci.yml`)
requires = ["setuptools>=77", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
[tool.ruff]
line-length = 88
target-version = "py313"
[tool.ruff.lint]
# The rule set shared by FOCA and FOCA apps: FOCA's rules plus `G` and `S`;
# unlike in FOCA, `D` applies everywhere, also to the tests and docs hooks
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle (docstrings)
"E", # pycodestyle errors
"F", # Pyflakes
"G", # flake8-logging-format
"I", # isort
"PL", # Pylint
"RUF", # Ruff-specific rules
"S", # flake8-bandit (security)
"SIM", # flake8-simplify
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = [
# Complexity limits, as in FOCA: some functions mirror the API's
# operations or take many test fixtures, and splitting them would obscure
# them
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0915", # too-many-statements
"PLR0917", # too-many-positional-arguments
# Flags HTTP status codes and other literals (e.g., lengths), which are
# clear as is
"PLR2004", # magic-value-comparison
]
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = ["pro_tes", "tests"]
[tool.ruff.lint.per-file-ignores]
# pytest checks with `assert`
"tests/**" = ["S101"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.mypy]
files = ["pro_tes", "docs/hooks.py", "scripts", "tests"]
python_version = "3.13"
# Complete type hints: all functions annotated, generic types parametrized
# (instead of ruff's `ANN` rules, which report missing hints only, without
# checking them)
disallow_untyped_defs = true
disallow_any_generics = true
warn_unused_ignores = true
# Connexion 2 ships no type information
[[tool.mypy.overrides]]
module = ["connexion", "connexion.*"]
ignore_missing_imports = true
# geopy ships no type information (distance-based middleware)
[[tool.mypy.overrides]]
module = ["geopy", "geopy.*"]
ignore_missing_imports = true
# py-tes ships no type information
[[tool.mypy.overrides]]
module = ["tes", "tes.*"]
ignore_missing_imports = true
# Gunicorn ships no type information (used by the tests only)
[[tool.mypy.overrides]]
module = ["gunicorn", "gunicorn.*"]
ignore_missing_imports = true
[tool.coverage.run]
source = ["pro_tes", "scripts"]
[tool.coverage.report]
exclude_also = ['if __name__ == "__main__":']
# `coverage report` and `coverage xml` (CI) fail below 100%; Codecov's
# targets are the same (`codecov.yml`)
fail_under = 100
[project]
name = "pro-tes"
authors = [
{name = "ELIXIR On-Cloud", email = "cloud-service@elixir-europe.org"},
{name = "Alexander Kanitz"},
]
keywords = [
"ga4gh", "tes", "proxy", "gateway", "elixir", "cloud", "rest", "restful",
"api", "app", "server", "openapi", "swagger", "mongodb", "python", "flask"
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
]
# The Python version of the base image in the `Dockerfile`, the only one the
# app is tested with
requires-python = ">=3.13"
description = "Proxy for GA4GH Task Execution Service (TES) instances by ELIXIR On-Cloud"
license = "Apache-2.0"
dynamic = ["version"]
dependencies = [
"connexion>=2.15.1,<3.0.0",
# FOCA minors are bumped by hand, together with the base image in the
# `Dockerfile` (`.github/dependabot.yml`).
"foca>=0.17.0,<0.18",
"geopy>=2.2.0,<3",
"gunicorn>=26.2.0,<27",
"py-tes>=1.1,<2",
# Used directly (TES backends, geolocation services); 2.33.0 fixes
# CVE-2026-25645
"requests>=2.33.0,<3",
# Used directly (errors that show whether requests to TES backends were
# sent)
"urllib3>=2,<3",
]
[project.optional-dependencies]
# Local hooks of `.pre-commit-config.yaml` use these too
dev = [
"ast-grep-cli>=0.51",
"build>=1.6",
"celery-types>=0.20.0",
"coverage>=7.16",
"mongomock>=4.3",
"mypy>=2.4",
"packaging>=26.3",
"pre-commit>=4.6",
"pytest>=9.1",
# Used by the tests; builds use `build-system.requires`
"setuptools-scm>=10.3",
"types-PyYAML>=6.0.12",
"types-requests>=2.28.5",
]
# Documentation (`mkdocs.yml`), built by Read the Docs (`.readthedocs.yaml`)
# and in CI. The packages that add warnings, which fail the strict build, are
# listed too, to bound their major versions (new warnings of minor releases
# still fail it)
docs = [
"griffelib>=2.4,<3",
"mkdocs>=1.6.1,<2",
"mkdocs-autorefs>=1.4.4,<2",
"mkdocs-material>=9.7.7,<10",
# 1.0.6 and earlier fail with pymdown-extensions 12
"mkdocstrings>=1.0.8,<2",
"mkdocstrings-python>=2.0.10,<3",
"pymdown-extensions>=12.3,<13",
]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
homepage = "https://github.com/elixir-cloud-aai/proTES"
Tracker = "https://github.com/elixir-cloud-aai/proTES/issues"
Documentation = "https://protes.readthedocs.io"
[tool.setuptools_scm]
# Version from Git tags (`vX.Y.Z`), the only place it is stored; builds
# without Git metadata (e.g., Docker builds, which get no `.git`) report the
# fallback unless `SETUPTOOLS_SCM_PRETEND_VERSION` is set
fallback_version = "0.0.0.dev0"
[tool.setuptools.packages.find]
include = ["pro_tes*"]
[tool.setuptools.package-data]
pro_tes = ["config.yaml", "api/*.yaml", "access_control/*.conf"]