Skip to content

Commit 22f621c

Browse files
authored
fix: tempaltes directory not found after building (#15)
1 parent 8e49c40 commit 22f621c

File tree

6 files changed

+35
-18
lines changed

6 files changed

+35
-18
lines changed

pyproject.toml

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
15
[project]
26
name = "greptimedb-mcp-server"
3-
packages = [{ include = "src/greptimedb_mcp_server" }]
4-
version = "0.2.0"
7+
version = "0.2.1"
58
description = "A Model Context Protocol (MCP) server that enables secure interaction with GreptimeDB databases. This server allows AI assistants to list tables, read data, and execute SQL queries through a controlled interface, making database exploration and analysis safer and more structured."
69
readme = "README.md"
710
license = "MIT"
@@ -11,30 +14,44 @@ dependencies = [
1114
"mysql-connector-python>=9.1.0",
1215
"pyyaml>=6.0.2",
1316
]
17+
1418
[[project.authors]]
1519
name = "dennis zhuang"
1620
1721

18-
[build-system]
19-
requires = ["hatchling"]
20-
build-backend = "hatchling.build"
22+
[project.scripts]
23+
greptimedb-mcp-server = "greptimedb_mcp_server:main"
24+
25+
[tool.hatch.build.targets.wheel]
26+
packages = ["src/greptimedb_mcp_server"]
2127

2228
[tool.hatch.build]
2329
exclude = [
24-
"venv",
25-
".git",
26-
".gitignore"
30+
"venv/",
31+
".git/",
32+
".gitignore",
33+
"*.pyc",
34+
"__pycache__/",
35+
".pytest_cache/",
36+
".coverage",
37+
"tests/",
38+
"docs/",
39+
]
40+
41+
include = [
42+
"src/**",
43+
"templates/**/*.md",
44+
"templates/**/*.yaml",
45+
"README.md",
46+
"LICENSE*",
2747
]
2848

2949
[tool.uv]
3050
dev-dependencies = [
31-
"pyright",
32-
"black",
33-
"flake8",
34-
"pytest",
35-
"pytest-asyncio",
36-
"pytest-cov",
51+
"pyright",
52+
"black",
53+
"flake8",
54+
"pytest",
55+
"pytest-asyncio",
56+
"pytest-cov",
3757
]
38-
39-
[project.scripts]
40-
greptimedb-mcp-server = "greptimedb_mcp_server:main"

src/greptimedb_mcp_server/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def security_gate(query: str) -> tuple[bool, str]:
3737

3838
def templates_loader() -> dict[str, dict[str, str]]:
3939
templates = {}
40-
template_dir = os.path.join(os.path.dirname(__file__), "..", "..", "templates")
40+
template_dir = os.path.join(os.path.dirname(__file__), "templates")
4141

4242
for category in os.listdir(template_dir):
4343
category_path = os.path.join(template_dir, category)

0 commit comments

Comments
 (0)