Sebastiangmz commited on
Commit
9e101ef
·
1 Parent(s): d557d77

Fix: add pyproject.toml for package installation

Browse files
Files changed (2) hide show
  1. pyproject.toml +128 -0
  2. requirements.txt +3 -0
pyproject.toml ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "coderag"
7
+ version = "0.1.0"
8
+ description = "RAG-based Q&A system for code repositories with verifiable citations"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.11"
12
+ authors = [
13
+ { name = "Sebastian", email = "[email protected]" }
14
+ ]
15
+ keywords = ["rag", "code", "qa", "llm", "embeddings", "chromadb"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ ]
23
+
24
+ dependencies = [
25
+ "fastapi>=0.115.0",
26
+ "uvicorn[standard]>=0.32.0",
27
+ "pydantic>=2.10.0",
28
+ "pydantic-settings>=2.6.0",
29
+ "gradio>=4.44.0",
30
+ "transformers>=4.46.0",
31
+ "accelerate>=1.1.0",
32
+ "bitsandbytes>=0.44.0",
33
+ "torch>=2.5.0",
34
+ "sentence-transformers>=3.3.0",
35
+ "chromadb>=0.5.0",
36
+ "tree-sitter>=0.23.0",
37
+ "tree-sitter-python>=0.23.0",
38
+ "gitpython>=3.1.0",
39
+ "python-dotenv>=1.0.0",
40
+ "structlog>=24.4.0",
41
+ "pyyaml>=6.0.0",
42
+ "httpx>=0.27.0",
43
+ "einops>=0.8.0",
44
+ "openai>=1.50.0",
45
+ "mcp>=1.0.0",
46
+ "click>=8.1.0",
47
+ ]
48
+
49
+ [project.optional-dependencies]
50
+ dev = [
51
+ "pytest>=8.3.0",
52
+ "pytest-asyncio>=0.24.0",
53
+ "pytest-cov>=6.0.0",
54
+ "black>=24.10.0",
55
+ "ruff>=0.8.0",
56
+ "mypy>=1.13.0",
57
+ "pre-commit>=4.0.0",
58
+ ]
59
+
60
+ [project.scripts]
61
+ coderag = "coderag.cli:main"
62
+ coderag-mcp = "coderag.mcp.cli:main"
63
+
64
+ [project.urls]
65
+ Homepage = "https://github.com/Sebastiangmz/CodeRAG"
66
+ Repository = "https://github.com/Sebastiangmz/CodeRAG"
67
+
68
+ [tool.hatch.build.targets.wheel]
69
+ packages = ["src/coderag"]
70
+
71
+ [tool.black]
72
+ line-length = 100
73
+ target-version = ["py311"]
74
+ include = '\.pyi?$'
75
+ exclude = '''
76
+ /(
77
+ \.git
78
+ | \.hatch
79
+ | \.mypy_cache
80
+ | \.venv
81
+ | _build
82
+ | build
83
+ | dist
84
+ | __pycache__
85
+ )/
86
+ '''
87
+
88
+ [tool.ruff]
89
+ line-length = 100
90
+ target-version = "py311"
91
+
92
+ [tool.ruff.lint]
93
+ select = [
94
+ "E", # pycodestyle errors
95
+ "W", # pycodestyle warnings
96
+ "F", # pyflakes
97
+ "I", # isort
98
+ "B", # flake8-bugbear
99
+ "C4", # flake8-comprehensions
100
+ "UP", # pyupgrade
101
+ "ARG", # flake8-unused-arguments
102
+ "SIM", # flake8-simplify
103
+ ]
104
+ ignore = [
105
+ "E501", # line too long (handled by black)
106
+ "B008", # do not perform function calls in argument defaults
107
+ "B009", # do not call getattr with a constant attribute value
108
+ ]
109
+
110
+ [tool.ruff.lint.isort]
111
+ known-first-party = ["coderag"]
112
+
113
+ [tool.mypy]
114
+ python_version = "3.11"
115
+ strict = true
116
+ warn_return_any = true
117
+ warn_unused_ignores = true
118
+ disallow_untyped_defs = true
119
+ disallow_incomplete_defs = true
120
+ check_untyped_defs = true
121
+ ignore_missing_imports = true
122
+
123
+ [tool.pytest.ini_options]
124
+ asyncio_mode = "auto"
125
+ testpaths = ["tests"]
126
+ python_files = ["test_*.py"]
127
+ python_functions = ["test_*"]
128
+ addopts = "-v --tb=short"
requirements.txt CHANGED
@@ -19,3 +19,6 @@ openai>=1.50.0
19
 
20
  # Note: torch is pre-installed on HF Spaces
21
  # Note: accelerate and bitsandbytes not needed for CPU-only inference
 
 
 
 
19
 
20
  # Note: torch is pre-installed on HF Spaces
21
  # Note: accelerate and bitsandbytes not needed for CPU-only inference
22
+
23
+ # Install the coderag package from local source
24
+ -e .