-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathpyproject.toml
More file actions
231 lines (215 loc) · 7.39 KB
/
pyproject.toml
File metadata and controls
231 lines (215 loc) · 7.39 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
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
[build-system]
requires = ["setuptools>=67.4.0", "gitpython>=3.1.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."] # list of folders that the contains the packages. We need it to be at root due to flat-layout
include = ["biothings*"] # package names should match these glob patterns
exclude = ["tests*"] # exclude packages matching these glob patterns
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
[tool.setuptools.package-data]
"*" = ["*.md", "*.tpl", "*.json", "*.html", "config.py.sample", ".git_info"]
[tool.setuptools.dynamic]
version = {attr = "biothings.__version__"}
[project]
name="biothings"
dynamic = ["version"] # version is dynamically generated from setup.py
authors = [
{name = "The BioThings Team", email="dev@biothings.io"},
]
requires-python = ">=3.8"
description = "a toolkit for building high-performance data & knowledge APIs in biology"
readme = "README.md"
# license = "Apache-2.0" # when we drop Python 3.8 support, we can use this new format
license = {text = "Apache-2.0"} # this is an old format, but works for Python 3.8+
keywords = [
"biology",
"medicine",
"annotation",
"data",
"knowledge",
"web",
"service",
"api",
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 5 - Production/Stable",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Utilities",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
dependencies = [
"requests>=2.21.0",
'tornado==6.1.0; python_version < "3.7.0"',
'tornado==6.2.0; python_version == "3.7.0"',
'tornado==6.4.2; python_version >= "3.8.0"',
"gitpython>=3.1.0",
"elasticsearch[async]>=7, <8; python_version < '3.7.0'",
"elasticsearch-dsl>=7, <8; python_version < '3.7.0'",
"elasticsearch[async]>=8, <9; python_version >= '3.7.0'",
"elasticsearch-dsl>=8, <9; python_version >= '3.7.0'",
'singledispatchmethod; python_version < "3.8.0"',
'dataclasses; python_version < "3.7.0"',
"jmespath>=0.7.1,<2.0.0", # support jmespath query parameter
"PyYAML>=5.1",
"orjson>=3.6.1", # a faster json lib supports inf/nan and datetime, v3.6.1 is the last version supports Python 3.6
]
[project.optional-dependencies]
# extra requirements for biothings.web
web_extra = [
"msgpack>=0.6.1", # support format=msgpack
"sentry-sdk>=1.5.3", # new sentry package
]
# extra requirements for biothings.web to use AWS OpenSearch
opensearch = [
"boto3", # for AWS OpenSearch connection
"requests-aws4auth", # for AWS OpenSearch connection
]
# minimal requirements for running biothings.hub, e.g. in CLI mode
hubcore = [
"pymongo>=4.1.0,<5.0", # support MongoDB 5.0 since v3.12.0
]
# extra requirements to run a full biothings.hub
hub = [
"pymongo>=4.1.0,<5.0",
"beautifulsoup4", # used in dumper.GoogleDriveDumper
"aiocron==1.8", # setup scheduled jobs
# "aiohttp==3.8.4", # elasticsearch requires aiohttp>=3,<4
"asyncssh>=2.19.0", # needs libffi-dev installed (apt-get)
# "pymongo>=4.1.0,<5.0", # support MongoDB 5.0 since v3.12.0
"psutil",
"jsonpointer", # for utils.jsonpatch
"IPython", # for interactive hub console
"multiprocessing_on_dill", # can replace pickler in concurrent.futures
"dill", # a pickle alternative with extra object type support
"prettytable", # diff report renderer
"sockjs-tornado==1.0.7", # websocket server for HubServer
"jsonschema>=2.6.0",
"pip", # auto-install requirements from plugins
# 'pandas==1.0.1', # json with inf/nan and more to come (replaced by orjson below now)
# 'orjson>=3.5.2', # this is a faster json lib support inf/nan and datetime
# "yapf", # code reformatter, better results than autopep8
"black", # code formatter
"boto3", # for aws S3 access
"requests-aws4auth", # aws s3 auth requests for autohub
'networkx>=2.1,<3.0; python_version >= "3.7.0"', # datatransform
'networkx>=2.1,<2.6; python_version < "3.7.0"', # datatransform
"biothings_client>=0.2.6", # datatransform (api client)
"cryptography>=38.0.3", # for generate ssh keys, ssl cert.
"pytest", # to run hub api pytests
"pydantic>=2.0", # for source data validation
]
# minimal requirements for to run biothings CLI
cli = [
"pymongo>=4.1.0,<5.0", # support MongoDB 5.0 since v3.12.0
"psutil",
"jsonschema>=2.6.0",
"typer>=0.12.1", # required for CLI, also installs rich package
]
# if DockerContainerDumper is used, requires this Docker SDK for Python
docker = [
"docker>=6.0.1",
]
# if DockerContainerDumper is used to connect to docker using ssh:// protocol, needs to install paramiko package
docker_ssh = [
"docker[ssh]>=6.0.1",
]
# extra requirements to develop biothings
dev = [
"aioresponses",
"mongomock",
"pytest-asyncio",
"pytest-mock",
]
# extra requirements for building docs
docs = ["sphinx>=5.3.0", "sphinx_rtd_theme>=2.0.0", "sphinx_reredirects>=0.1.3"]
[project.urls]
homepage = "https://biothings.io"
source = "https://github.com/biothings/biothings.api"
documentation = "https://docs.biothings.io"
changelog = "https://github.com/biothings/biothings.api/blob/master/CHANGES.txt"
issues = "https://github.com/biothings/biothings.api/issues"
[project.scripts]
biothings-cli = "biothings.cli:main"
[tool.black]
line-length = 120
target-version = ['py38', 'py39', 'py310', 'py311', 'py312', 'py313']
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
(
# 3rd party code, don't touch
"biothings/utils/jsondiff.py",
"biothings/utils/jsonpatch.py",
# deprecated code, don't touch
"biothings/utils/parallel.py",
"biothings/utils/parallel_mp.py",
"biothings/utils/shelve.py",
"biothings/hub/dataload/sync.py",
"biothings/hub/dataload/validator.py",
)
'''
[tool.isort]
profile = "black"
combine_as_imports = true
line_length = 120
src_paths = ["."]
[tool.pytest.ini_options]
minversion = "6.2.5"
# Options
addopts = [
"-rA",
"-vv",
"--doctest-modules",
"--setup-show",
"--capture=tee-sys",
"--tb=line",
"--durations=0",
"--showlocals",
"--strict-markers",
"--color=yes",
"--code-highlight=yes",
]
# Path
norecursedirs = [
".svn",
".git",
"_build",
"tmp*",
"lib",
"lib64",
"tools",
"tests/hub/dataplugin/data",
"tests/hub/config/data",
"tests/web/handlers/data",
]
testpaths = [
"tests"
]
# Environment
env = []
markers = [
"ReleaseNoteSrcBuildReaderAdapter",
"ReleaseNoteSrcBuildReader",
"ReleaseNoteSource",
"ReleaseNoteTxt",
]
# Logging
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)] %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"