-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
168 lines (142 loc) · 4.12 KB
/
Copy pathpyproject.toml
File metadata and controls
168 lines (142 loc) · 4.12 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "tirmite"
description = "Map profile HMMs of transposon termini to genomic sequences for annotation of cryptic transposon variants."
readme = "README.md"
requires-python = ">=3.9"
license = { text = "GPL-3.0-or-later" }
authors = [{ name = "Adam Taranto", email = "adam.p.taranto@gmail.com" }]
classifiers = [
"Programming Language :: Python :: 3",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
dependencies = [
'biopython>=1.70',
"pandas>=0.23.4",
"pyfaidx",
"pyhmmer",
"rich",
]
dynamic = ["version"]
# Optional dependencies for testing
[project.optional-dependencies]
dev = [
"hatch",
"isort",
"ipykernel",
"mypy",
"pydocstyle",
"numpydoc-validation",
"pre-commit",
"pytest",
"pytest-cov",
"ruff",
]
test = [
"pytest",
"pytest-cov",
]
docs = [
"mkdocs-material>=9.0",
"pymdown-extensions>=10.0",
]
[project.urls]
homepage = "https://adamtaranto.github.io/TIRmite"
documentation = "https://adamtaranto.github.io/TIRmite"
repository = "https://github.com/adamtaranto/TIRmite"
[project.scripts]
tirmite = "tirmite.cli.cli:main"
[tool.hatch.build]
source = "src"
exclude = ["environment.yml", ".github", ".vscode"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.vcs]
tag-pattern = "v*" # Git tags starting with 'v' will be used for versioning
fallback-version = "0.0.0"
[tool.hatch.build.hooks.vcs]
version-file = "src/tirmite/_version.py"
[tool.pytest.ini_options]
addopts = "-v --cov=tirmite --cov-branch --cov-report=xml --cov-report=term"
testpaths = ["tests"]
python_files = ["test_*.py"]
[tool.ruff]
target-version = "py310"
line-length = 88
fix = true
[tool.ruff.lint]
select = [
"C", # mccabe rules
"F", # pyflakes rules
"E", # pycodestyle error rules
"W", # pycodestyle warning rules
"B", # flake8-bugbear rules
"I", # isort rules
#"D", # pydocstyle rules
]
ignore = [
"C901", # max-complexity-10
"E501", # line-too-long
"I001", # isort-imports
"B905", # `zip()` without an explicit `strict=` parameter
]
# Don't auto-fix docstring issues - they're too fragile
unfixable = ["D"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D"] # Ignore all pydocstyle rules in tests
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
indent-style = "space"
quote-style = "single"
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = ["tirmite"]
known-third-party = ["Bio", "pandas", "pyhmmer"]
[tool.isort]
profile = "black"
known_third_party = ["Bio", "pandas", "pyhmmer"]
known_first_party = ["tirmite"]
default_section = "THIRDPARTY"
force_sort_within_sections = true
[tool.numpydoc_validation]
checks = [
"all", # report on all checks
"ES01", # but don't require an extended summary
"EX01", # or examples
"SA01", # or a see also section
"SS06", # and don't require the summary to fit on one line
]
exclude = [ # don't report on checks for these
'\.__init__$',
'\.__repr__$',
'\.__str__$',
]
override_SS05 = [ # allow docstrings to start with these words
'^Process ',
'^Assess ',
'^Access ',
]
# Don't process filepaths that match these regex patterns
exclude_files = [
'^_version\\.py$',
]
[tool.mypy]
# Type hint strictness settings
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
# Disable specific error codes for false positives and external library type issues
# arg-type: Path vs str conversions for functions expecting str in other modules
# attr-defined: Attribute access on objects from external libraries (pandas, pyhmmer)
# union-attr: Pandas DataFrame operations that mypy can't fully type check
# index: Indexing operations on Union types from pandas
disable_error_code = ["arg-type", "attr-defined", "union-attr", "index"]
[tool.pydocstyle]
convention = "numpy"
match-dir = "[^\\.].*" # matches all dirs that don't start with a dot
match = "(?!test_).*\\.py" # matches files that don't start with 'test_' but end with '.py'