-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathpyproject.toml
More file actions
203 lines (176 loc) · 4.81 KB
/
Copy pathpyproject.toml
File metadata and controls
203 lines (176 loc) · 4.81 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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# Build system configuration
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
# Project metadata
[project]
name = "flexidot"
description = "Flexible dotplotting of genomic sequences."
readme = "README.md"
requires-python = ">=3.8"
license = { text = "GNU Lesser General Public License v3 (LGPLv3)" }
authors = [
{ name = "Kathrin M. Seibt" },
{ name = "Thomas Schmidt" },
{ name = "Tony Heitkam" },
]
# Classifiers for project categorization
classifiers = [
"Programming Language :: Python :: 3",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
]
# Project dependencies
dependencies = [
"biopython",
"colormap>=1.3.0",
"colour",
"easydev",
"matplotlib",
"numpy",
"regex",
"rich",
]
# Dynamic versioning
dynamic = ["version"]
# Project URLs
[project.urls]
homepage = "https://github.com/flexidot-bio/flexidot"
documentation = "https://github.com/flexidot-bio/flexidot"
repository = "https://github.com/flexidot-bio/flexidot"
# Command-line script entry point
[project.scripts]
flexidot = "flexidot.app:main"
# Hatch build configuration
[tool.hatch.build]
source = "src"
# Exclude files and directories from the build
exclude = ["environment.yml", ".github", ".vscode"]
# Hatch versioning configuration
[tool.hatch.version]
source = "vcs"
# Version control system (VCS) versioning
[tool.hatch.version.vcs]
tag-pattern = "v*" # Git tags starting with 'v' will be used for versioning
fallback-version = "0.0.0"
# Version file location for VCS
[tool.hatch.build.hooks.vcs]
version-file = "src/flexidot/_version.py"
# Optional dependencies for testing and development
[project.optional-dependencies]
tests = ["pytest", "pytest-cov", "hatch"]
dev = [
"hatch",
"isort",
"mkdocs-jupyter",
"mkdocs-material",
"mkdocs",
"mkdocstrings-python",
"mkdocstrings",
"notebook",
"numpydoc-validation",
"pre-commit",
"pymdown-extensions",
"pytest-cov",
"pytest",
"ruff",
"seaborn",
]
[tool.pytest.ini_options]
addopts = "-v --cov=flexidot --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]
known-third-party = [
"Bio",
"colormap",
"colour",
"easydev",
"matplotlib",
"numpy",
"regex",
]
known-first-party = ["flexidot"]
force-sort-within-sections = true
[tool.isort]
profile = "black"
known_third_party = [
"Bio",
"colormap",
"colour",
"easydev",
"matplotlib",
"numpy",
"regex",
]
known_first_party = ["flexidot"]
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'