-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
99 lines (93 loc) · 2.48 KB
/
setup.py
File metadata and controls
99 lines (93 loc) · 2.48 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
"""
Setup script for TinySearch
"""
from setuptools import setup, find_packages
# Read version from __init__.py
version = {}
with open("tinysearch/__init__.py") as f:
for line in f:
if line.startswith("__version__"):
exec(line, version)
break
# Read README.md
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
# Define dependencies
install_requires = [
"numpy>=1.19.0",
"pyyaml>=5.1.0",
"tqdm>=4.60.0",
"watchdog>=2.1.0",
"loguru>=0.6.0",
]
extras_require = {
"api": [
"fastapi>=0.68.0",
"uvicorn>=0.15.0",
"pydantic>=1.8.0",
],
"embedders": [
"torch>=1.9.0",
"transformers>=4.5.0",
"sentence-transformers>=2.0.0",
],
"adapters": [
"pymupdf>=1.18.0",
"pypdf2>=1.26.0",
],
"indexers": [
"faiss-cpu>=1.7.0",
],
"hybrid": [
"bm25s>=0.1.0",
"jieba>=0.42.0",
],
"reranker": [
"FlagEmbedding>=1.0.0",
],
"dev": [
"pytest>=6.0.0",
"black>=21.5b2",
"isort>=5.9.0",
"mypy>=0.812",
"flake8>=3.9.0",
],
"docs": [
"sphinx>=4.0.0",
"sphinx-rtd-theme>=0.5.0",
"myst-parser>=0.15.0",
],
}
# Full dependencies
extras_require["full"] = sum(extras_require.values(), [])
setup(
name="tinysearch",
version=version.get("__version__", "0.1.0"),
author="TinySearch Team",
author_email="tinysearch@example.com",
description="A lightweight hybrid search and retrieval system (Vector + BM25 + Substring)",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/yourusername/tinysearch",
packages=find_packages(),
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
python_requires=">=3.8",
install_requires=install_requires,
extras_require=extras_require,
entry_points={
"console_scripts": [
"tinysearch=tinysearch.cli:main",
"tinysearch-api=tinysearch.api:start_api",
],
},
)