-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (124 loc) · 4.39 KB
/
Copy pathpyproject.toml
File metadata and controls
143 lines (124 loc) · 4.39 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
[project]
name = "babel-pipeline"
version = "1.17"
description = "Babel creates cliques of equivalent identifiers across many biomedical vocabularies. "
readme = "README.md"
license = "MIT"
requires-python = ">=3.11,<3.14"
dependencies = [
"apybiomart",
"beautifulsoup4>=4.14.2",
"biopython>=1.85",
"bmt>=1.4.6",
"curies>=0.12.1",
"duckdb>=1.4.1",
"humanfriendly>=10.0",
"jsonlines>=4.0.0",
"more-itertools>=10.8.0",
"psutil>=7.1.1",
"psycopg2-binary>=2.9.12",
"pyoxigraph>=0.5.8",
"pytest>=8.4.2",
"pytest-cov>=7.0.0",
"pytest-timeout>=2.3",
"pytest-xdist>=3",
"pyyaml>=6.0.3",
"requests>=2.32.5",
"snakemake>=9.21.1",
"snakemake-executor-plugin-slurm>=2.7.1",
"sparqlwrapper>=2.0.0",
"tqdm>=4.67.1",
"xmltodict>=1.0.2",
]
[project.urls]
Homepage = "https://github.com/NCATSTranslator/Babel"
Repository = "https://github.com/NCATSTranslator/Babel"
Issues = "https://github.com/NCATSTranslator/Babel/issues"
[dependency-groups]
dev = [
"ipykernel>=7.1.0",
"py-spy>=0.4.2",
"ruff>=0.14.14",
"rumdl>=0.2.4",
"snakefmt>=2.0.3",
]
[project.scripts]
babel-slurm-errors = "src.tools.slurm.errors:main"
babel-slurm-resources = "src.tools.slurm.resources:main"
babel-clique-diff = "src.tools.clique_diff.cli:main"
source-impact-report = "src.tools.source_impact_report.cli:main"
babel-overused-xrefs = "src.tools.overused_xrefs.cli:main"
[tool.uv]
package = true
[build-system]
requires = ["setuptools>=83.0.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["src", "src.*"]
# Linting/formatting configuration
[tool.ruff]
line-length = 120
# Ruff 0.16 began formatting Python inside Markdown code blocks. Our snippets are illustrative
# fragments, not runnable modules, and Ruff mangles them (it wraps a trailing-comma list element in
# tests/pipeline/README.md into a single-element tuple). rumdl owns the Markdown files instead.
extend-exclude = ["*.md"]
[tool.ruff.lint]
# Enable all rules that ruff format would normally apply
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort (import sorting)
"UP", # pyupgrade
]
# Optional but common
ignore = [
"E501", # let Ruff handle wrapping consistently
]
fixable = ["ALL"]
unfixable = []
[tool.ruff.format]
# Ruff 0.16.0 began formatting Python code fences inside Markdown, which overlaps with the
# dedicated rumdl Markdown check and broke CI when astral-sh/ruff-action@v3 floated to 0.16.0
# (pyproject pins only a floor, >=0.14.14). Keep ruff's formatter scoped to Python source and
# leave Markdown to rumdl so formatting CI stays deterministic across ruff releases.
exclude = ["*.md"]
[tool.snakefmt]
line_length = 120
include = '\.snakefile$|^Snakefile'
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
addopts = "--dist=loadgroup" # required for xdist_group marks to route pipeline tests to one worker
timeout = 30 # global fallback (seconds); overridden per mark in conftest.py
# Canonical marker definitions — conftest.py intentionally does NOT re-register these.
markers = [
"unit: fast offline tests with no external dependencies",
"network: requires live internet access (use --network to run)",
"slow: genuinely long-running (a full-file scan, a multi-GB load); raises the timeout to an hour",
"pipeline: invokes Snakemake rules; requires babel_downloads/ (use --pipeline to run)",
"min_memory_gb(n): test needs at least n GiB of system RAM; auto-skipped on smaller machines",
]
[tool.coverage.run]
source = ["src"]
omit = ["tests/*"]
[tool.coverage.report]
show_missing = true
precision = 1
[tool.coverage.html]
directory = "htmlcov"
[tool.rumdl]
flavor = "gfm"
disable = [
"MD014", # Allow '$ shell command' without displaying the output -- we have some long outputs!
]
# Captured verbatim tool output, not authored prose -- regenerated by re-running the tool, so it
# must not be reflowed or held to line-length/heading rules. `releases/*/reports/` is the same case
# one step further: those files are copied byte-for-byte out of a build (see releases/ARTIFACTS.md),
# and reflowing one would make the archive disagree with the build it claims to be a subset of.
exclude = ["docs/tools/examples/", "releases/*/reports/"]
[tool.rumdl.MD013]
line-length = 100
code-blocks = false
tables = false
reflow = true # Enable automatic line wrapping (required for --fix)