forked from biopragmatics/pyobo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
278 lines (249 loc) · 7.18 KB
/
pyproject.toml
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# See https://setuptools.readthedocs.io/en/latest/build_meta.html
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "pyobo"
version = "0.12.0-dev"
description = "A python package for handling and generating OBO"
readme = "README.md"
authors = [
{ name = "Charles Tapley Hoyt", email = "[email protected]" }
]
maintainers = [
{ name = "Charles Tapley Hoyt", email = "[email protected]" }
]
# See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#classifiers
# Search tags using the controlled vocabulary at https://pypi.org/classifiers
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Framework :: Pytest",
"Framework :: tox",
"Framework :: Sphinx",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Chemistry",
]
keywords = [
"snekpack", # please keep this keyword to credit the cookiecutter-snekpack template
"cookiecutter",
"ontologies",
"biomedical ontologies",
"life sciences",
"natural sciences",
"bioinformatics",
"cheminformatics",
"Open Biomedical Ontologies",
"OBO",
]
# License Information. This can be any valid SPDX identifiers that can be resolved
# with URLs like https://spdx.org/licenses/MIT
# See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
license = { file = "LICENSE" }
requires-python = ">=3.10"
dependencies = [
"obonet>=0.3.0",
"click",
"tqdm",
"pyyaml",
"pandas",
"requests",
"protmapper",
"more_itertools",
"more_click>=0.0.2",
"humanize",
"tabulate",
"cachier",
"pystow>=0.6.0",
"bioversions>=0.5.561",
"bioregistry>=0.11.23",
"bioontologies>=0.5.2",
"zenodo-client>=0.3.6",
"class_resolver",
"psycopg2-binary",
"pydantic>=2.0",
"curies>=0.9.0",
# Resource Downloaders
"drugbank_downloader",
"chembl_downloader",
"umls_downloader>=0.1.3",
"typing_extensions",
"rdflib",
]
[project.optional-dependencies]
tests = [
"pytest",
"coverage",
]
docs = [
"sphinx>=8",
"sphinx-rtd-theme>=3.0",
"sphinx-click",
"sphinx_automodapi",
]
# See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#urls
[project.urls]
"Bug Tracker" = "https://github.com/biopragmatics/pyobo/issues"
Homepage = "https://github.com/biopragmatics/pyobo"
Repository = "https://github.com/biopragmatics/pyobo.git"
Documentation = "https://pyobo.readthedocs.io"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.packages.find]
# this implicitly sets `packages = ":find"`
where = ["src"] # list of folders that contain the packages (["."] by default)
# See https://setuptools.pypa.io/en/latest/userguide/datafiles.html
[tool.setuptools.package-data]
"*" = ["*.*"]
[project.scripts]
pyobo = "pyobo.cli:main"
# TODO add entrypoints
# pyobo.xrefs =
# cbms2019 = pyobo.xrefdb.sources.cbms2019:get_cbms2019_xrefs_df
# chembl = pyobo.xrefdb.sources.chembl:get_chembl_xrefs_df
# compath = pyobo.xrefdb.sources.compath:get_compath_xrefs_df
# famplex = pyobo.xrefdb.sources.famplex:get_famplex_xrefs_df
# gilda = pyobo.xrefdb.sources.gilda:get_gilda_xrefs_df
# intact = pyobo.xrefdb.sources.intact:get_xrefs_df
# ncit = pyobo.xrefdb.sources.ncit:get_ncit_xrefs_df
# pubchem = pyobo.xrefdb.sources.pubchem:get_pubchem_mesh_df
# wikidata = pyobo.xrefdb.sources.wikidata:get_wikidata_xrefs_df
# biomappings = pyobo.xrefdb.sources.biomappings:get_biomappings_df
[tool.cruft]
skip = [
"**/__init__.py",
"tests/*"
]
# MyPy, see https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
plugins = [
"pydantic.mypy",
]
# Doc8, see https://doc8.readthedocs.io/en/stable/readme.html#ini-file-usage
[tool.doc8]
max-line-length = 120
# Pytest, see https://docs.pytest.org/en/stable/reference/customize.html#pyproject-toml
[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
# Coverage, see https://coverage.readthedocs.io/en/latest/config.html
[tool.coverage.run]
branch = true
source = [
"pyobo",
]
omit = [
"tests/*",
"docs/*",
]
[tool.coverage.paths]
source = [
"src/pyobo",
".tox/*/lib/python*/site-packages/pyobo",
]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if __name__ == \"__main__\":",
"if TYPE_CHECKING:",
"def __str__",
"def __repr__",
]
[tool.ruff]
line-length = 100
extend-include = ["*.ipynb"]
[tool.ruff.lint]
# See https://docs.astral.sh/ruff/rules
extend-select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"C90", # mccabe
"I", # isort
"UP", # pyupgrade
"D", # pydocstyle
"DOC", # pydoclint
"B", # bugbear
"S", # bandit
"T20", # print
"N", # pep8 naming
"ERA", # eradicate commented out code
"NPY", # numpy checks
"RUF", # ruff rules
"C4", # comprehensions
]
ignore = [
"D105", # Missing docstring in magic method
"E203", # Black conflicts with the following
# Everything below is TODO
"ERA001",
"S113",
"C901",
"E501",
"RUF012",
"S320",
"S314",
]
# See https://docs.astral.sh/ruff/settings/#per-file-ignores
[tool.ruff.lint.per-file-ignores]
# Ignore security issues in the version.py, which are inconsistent
"src/pyobo/version.py" = ["S603", "S607"]
# Ignore commented out code in Sphinx configuration file
"docs/source/conf.py" = ["ERA001"]
# Prints are okay in notebooks
"notebooks/**/*.ipynb" = ["T201"]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.lint.isort]
relative-imports-order = "closest-to-furthest"
known-third-party = [
"tqdm",
]
known-first-party = [
"pyobo",
"tests",
]
[tool.ruff.format]
# see https://docs.astral.sh/ruff/settings/#format_docstring-code-format
docstring-code-format = true
[tool.bumpversion]
current_version = "0.12.0-dev"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(?:-(?P<release>[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+(?P<build>[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?"
serialize = [
"{major}.{minor}.{patch}-{release}+{build}",
"{major}.{minor}.{patch}+{build}",
"{major}.{minor}.{patch}-{release}",
"{major}.{minor}.{patch}",
]
commit = true
tag = false
[tool.bumpversion.parts.release]
optional_value = "production"
first_value = "dev"
values = [
"dev",
"production",
]
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""
[[tool.bumpversion.files]]
filename = "docs/source/conf.py"
search = "release = \"{current_version}\""
replace = "release = \"{new_version}\""
[[tool.bumpversion.files]]
filename = "src/pyobo/version.py"
search = "VERSION = \"{current_version}\""
replace = "VERSION = \"{new_version}\""