-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (136 loc) · 4.15 KB
/
Copy pathpyproject.toml
File metadata and controls
151 lines (136 loc) · 4.15 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "nf-metro"
version = "1.1.0"
description = "Generate metro-map-style SVG diagrams from Mermaid graph definitions"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
authors = [{ name = "Jonathan Manning", email = "jonathan.manning@seqera.io" }]
maintainers = [{ name = "Jonathan Manning", email = "jonathan.manning@seqera.io" }]
keywords = [
"nextflow",
"nf-core",
"bioinformatics",
"visualization",
"metro-map",
"mermaid",
"svg",
"pipeline",
"workflow",
"diagram",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Visualization",
]
dependencies = [
"click>=8.0",
"drawsvg>=2.0",
"lark>=1.1",
"networkx>=3.0",
"pillow>=9.0",
]
[project.urls]
Homepage = "https://github.com/pinin4fjords/nf-metro"
Repository = "https://github.com/pinin4fjords/nf-metro"
Issues = "https://github.com/pinin4fjords/nf-metro/issues"
[project.scripts]
nf-metro = "nf_metro.cli:cli"
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"pytest-split>=0.9",
"pytest-xdist>=3.0",
"ruff>=0.4",
"mypy>=1.8",
"types-networkx",
"numpy<2.5",
"jsonschema>=4.0",
]
# Docs site is Astro/Starlight (see docs/package.json). This extra only provides
# cairosvg, used by scripts/build_render_diff.py and the PR render-diff workflow
# to rasterise gallery SVGs to PNG.
docs = [
"cairosvg>=2.5",
"pyyaml>=6.0",
]
font = [
"fonttools[woff]>=4.0",
]
[tool.hatch.build.targets.wheel]
packages = ["src/nf_metro"]
[tool.hatch.build.targets.sdist]
# Ship what is needed to build and audit the package: src, packaging metadata,
# README/LICENSE/CHANGELOG. Everything below is development or CI material that
# no installing user needs. `tests` and `examples` are excluded together because
# 31 test modules read fixtures out of `examples/`.
exclude = [
"datasets",
"tests",
"examples",
"docs",
"website",
"scripts",
".claude",
".github",
".test_durations",
"CLAUDE.md",
"DESIGN.md",
"prek.toml",
".pre-commit-config.yaml",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src", "tests"]
xfail_strict = true
addopts = "-rxX -n auto"
[tool.ruff]
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "W", "ANN", "C901"]
[tool.ruff.lint.mccabe]
# Keep function branch complexity readable; functions above this are
# decomposed into named helpers rather than allowed to grow.
max-complexity = 30
[tool.ruff.lint.per-file-ignores]
# Type-annotation rules are enforced on the library only; tests favour
# brevity over fully annotated fixtures and helpers.
"tests/**" = ["ANN"]
"scripts/**" = ["ANN"]
# Self-contained triage tooling: emits long literal HTML/JS template lines
# (wrapping them would distort the produced markup) and favours brevity over
# fully annotated engine-glue helpers, matching the scripts/ convention.
".claude/skills/nf-metro-layout-triage/build_review.py" = ["E501", "ANN"]
[tool.mypy]
files = ["src"]
mypy_path = "src"
explicit_package_bases = true
python_version = "3.11"
ignore_missing_imports = false
strict_optional = true
disallow_any_generics = true
# drawsvg ships no type information; jsonschema is an optional, test-only
# dependency imported lazily by `nf-metro validate-svg`. Everything else (click,
# Pillow, networkx via types-networkx) is typed once the package is installed.
[[tool.mypy.overrides]]
module = ["drawsvg", "jsonschema"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["fontTools", "fontTools.*"]
ignore_missing_imports = true
# Fully-annotated core: the data model and the layout phases pass data
# between split modules, so require complete signatures there.
[[tool.mypy.overrides]]
module = ["nf_metro.parser.model", "nf_metro.layout.phases.*"]
disallow_untyped_defs = true
disallow_incomplete_defs = true