-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
113 lines (100 loc) · 3.2 KB
/
pyproject.toml
File metadata and controls
113 lines (100 loc) · 3.2 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
[project]
name = "krewlyzer"
version = "0.7.0"
description = "Feature extraction tools for circulating tumor DNA from GRCh37 aligned BAM files"
authors = [{name = "Ronak Shah", email = "shahr2@mskcc.org"}]
requires-python = ">=3.8"
readme = "README.md"
license = { file = "LICENSE" }
dependencies = [
"typer>=0.15.0",
"pysam>=0.22.0",
"pandas>=2.2.0",
"numpy>=1.20.0",
"rich>=13.9.0",
"pyarrow>=15.0.0"
]
[project.optional-dependencies]
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.5.0"
]
test = [
"pytest>=7.0.0",
"pytest-mock>=3.10.0"
]
dev = [
"pytest>=7.0.0",
"pytest-mock>=3.10.0",
"black==26.1.0",
"ruff==0.15.4",
"mypy==1.19.1",
]
[project.urls]
"Homepage" = "https://github.com/msk-access/krewlyzer"
[project.scripts]
krewlyzer = "krewlyzer.cli:app"
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"
[tool.maturin]
python-source = "src"
manifest-path = "rust/Cargo.toml"
module-name = "krewlyzer._core"
# CRITICAL: Exclude data directory to keep wheel <100MB for PyPI
# Without this, maturin includes ALL source files by default!
exclude = ["src/krewlyzer/data/**/*"]
# Data source by installation method:
# - Docker: bundled in image
# - git clone + pip install -e .: uses source directory directly
# - pip install: requires KREWLYZER_DATA_DIR env var pointing to cloned data
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
markers = [
"unit: Fast unit tests with no I/O",
"integration: Tool integration tests",
"e2e: End-to-end workflow tests",
"slow: Tests that take >10s",
"rust: Tests requiring Rust backend",
]
filterwarnings = [
"ignore::DeprecationWarning",
]
[tool.coverage.run]
source = ["krewlyzer"]
omit = ["*/tests/*"]
[tool.ruff]
line-length = 88 # Match black
target-version = "py310"
[tool.ruff.lint]
# E402: Module-level imports after code — deliberate pattern for CLI modules
# that require typer.Option() / Rich setup before importing submodules.
# F821: Undefined name — forward-reference type annotations for baseline
# dataclasses that are only imported at runtime inside functions.
ignore = ["E402", "F821"]
[tool.ruff.lint.per-file-ignores]
# Availability check pattern: `from krewlyzer import _core` is used to test
# whether the Rust extension is installed, even though _core isn't referenced.
"tests/unit/test_rust_python_equivalence.py" = ["F401"]
"tests/unit/test_bgzf_reader.py" = ["F401"]
"tests/integration/test_region_entropy.py" = ["F401"]
[tool.black]
line-length = 88
target-version = ["py310"]
[tool.mypy]
python_version = "3.10"
# _core is a Rust extension — no stubs available. Suppress all missing import
# errors globally so developers don't need stub files installed.
ignore_missing_imports = true
# Suppress noisy warnings that don't apply to Rust-bridged return types.
warn_return_any = false
warn_unused_ignores = false
no_error_summary = true
[[tool.mypy.overrides]]
# Fully suppress all mypy analysis of the Rust _core extension module.
# The Rust/PyO3 interface is the authoritative source of truth for these types.
module = ["krewlyzer._core", "krewlyzer._core.*"]
ignore_missing_imports = true
ignore_errors = true