This repository was archived by the owner on Jan 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsetup.py
144 lines (135 loc) · 4.97 KB
/
setup.py
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
# Blue Brain Search is a text mining toolbox focused on scientific use cases.
#
# Copyright (C) 2020 Blue Brain Project, EPFL.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""The setup script."""
from setuptools import find_packages, setup
DESCRIPTION = (
"Blue Brain text mining toolbox for semantic search and information extraction"
)
LONG_DESCRIPTION = """
Blue Brain Search is a text mining toolbox to perform semantic literature search
and structured information extraction from text sources.
This project originated from the Blue Brain Project efforts on exploring and
mining the CORD-19 dataset."""
CLASSIFIERS = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: General",
]
PYTHON_REQUIRES = ">=3.7"
INSTALL_REQUIRES = [
"Flask",
"SQLAlchemy[mysql,pymysql]",
"boto3",
"catalogue>=2.0.3", # see https://github.com/explosion/catalogue/issues/17
# Required to encrypt mysql password; >= 3.2 to fix RSA decryption vulnerability
"cryptography>=3.2",
"defusedxml",
"elasticsearch>=8",
"google-cloud-storage",
"h5py",
"ipython",
"ipywidgets",
"jupyterlab>=3",
"langdetect",
"luigi",
# Serialization framework on top of dataclasses, e.g. 'Article' to and from JSON.
"mashumaro>=3.0",
"numpy>=1.20.1",
"pandas>=1",
"pg8000",
"python-dotenv",
"requests",
"scikit-learn",
"sentence-transformers",
# >= 3.0.6 to include the fix for https://github.com/explosion/spaCy/pull/7603.
"spacy[transformers]>=3.0.6",
# torch==1.9.0 contains patch allowing reproducible saving of models
"torch>=1.9.0",
]
EXTRAS_REQUIRE = {
"dev": [
"Sphinx",
"docker",
"pytest-benchmark",
"pytest-cov",
"pytest>=4.6",
"responses>=0.19.0",
"sphinx-bluebrain-theme",
"tox",
],
"data_and_models": [
"PyYAML",
"dvc[ssh]>=2",
"matplotlib",
"scipy",
"transformers",
# For using a spaCy lemmatizer with mode='lookup'.
"spacy_lookups_data",
# Installed with spaCy.
"srsly",
# Installed with spaCy. Only for the temporary pipelines/ner/preprocess.py.
"typer",
],
}
CONSOLE_SCRIPTS = [
"bbs_database = bluesearch.entrypoint.database.parent:main",
"compute_embeddings = bluesearch.entrypoint.embeddings:run_compute_embeddings",
"create_database = bluesearch.entrypoint.create_database:run_create_database",
"create_mining_cache = bluesearch.entrypoint.mining_cache:run_create_mining_cache",
"embedding_server = bluesearch.entrypoint.embedding_server:run_embedding_server",
"mining_server = bluesearch.entrypoint.mining_server:run_mining_server",
"search_server = bluesearch.entrypoint.search_server:run_search_server",
]
setup(
name="bluesearch",
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type="text/x-rst",
author="Blue Brain Project, EPFL",
url="https://github.com/BlueBrain/Search",
download_url="https://pypi.python.org/pypi/bluesearch",
project_urls={
"Source": "https://github.com/BlueBrain/Search",
"Documentation": "https://blue-brain-search.readthedocs.io/en/stable/",
"Tracker": "https://github.com/BlueBrain/Search/issues",
},
license="-",
classifiers=CLASSIFIERS,
use_scm_version={
"write_to": "src/bluesearch/version.py",
"write_to_template": '"""The package version."""\n__version__ = "{version}"\n',
"local_scheme": "no-local-version",
},
package_dir={"": "src"},
packages=find_packages("./src"),
package_data={"bluesearch": ["_css/stylesheet.css", "py.typed"]},
zip_safe=False,
python_requires=PYTHON_REQUIRES,
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
entry_points={"console_scripts": CONSOLE_SCRIPTS},
)