Skip to content

Commit ea1cb43

Browse files
Fix pre-commit issues and URL generation bug
- Fixed exception handling in config/loader.py (proper exception chaining) - Added missing docstring to validate_tag method - Fixed docstring formatting in get_vector_db_path method - Resolved mypy error in docs_mcp/data.py (folder config types) - Fixed critical URL generation bug (double 'reference' in URLs) - Added FolderConfig import and proper type handling
1 parent fcd55e3 commit ea1cb43

25 files changed

Lines changed: 2354 additions & 141 deletions

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
recursive-include holoviz_mcp/docs_mcp/templates *.md
1+
recursive-include holoviz_mcp/config *.yaml *.json

pixi.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ fastmcp = "*"
1414
GitPython = "*"
1515
nbconvert = "*"
1616
panel = "*"
17+
pydantic = ">=2.0"
18+
PyYAML = "*"
1719
sentence-transformers = "*"
1820

1921
[host-dependencies]

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ dependencies = [
4545
"packaging",
4646
"nbconvert",
4747
"panel",
48+
"pydantic>=2.0",
49+
"PyYAML",
4850
"sentence-transformers",
4951
]
5052

src/holoviz_mcp/config/__init__.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"""Configuration package for HoloViz MCP server."""
2+
3+
from .loader import ConfigLoader
4+
from .loader import ConfigurationError
5+
from .loader import get_config
6+
from .loader import get_config_loader
7+
from .loader import reload_config
8+
from .models import DocsConfig
9+
from .models import EnvironmentConfig
10+
from .models import GitRepository
11+
from .models import HoloVizMCPConfig
12+
from .models import PromptConfig
13+
from .models import ResourceConfig
14+
from .models import SecurityConfig
15+
from .models import ServerConfig
16+
17+
__all__ = [
18+
# Loader
19+
"ConfigLoader",
20+
"ConfigurationError",
21+
"get_config",
22+
"get_config_loader",
23+
"reload_config",
24+
# Models
25+
"DocsConfig",
26+
"EnvironmentConfig",
27+
"GitRepository",
28+
"HoloVizMCPConfig",
29+
"PromptConfig",
30+
"ResourceConfig",
31+
"SecurityConfig",
32+
"ServerConfig",
33+
]

src/holoviz_mcp/config/config.yaml

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# Default configuration for HoloViz MCP server
2+
# This file provides the default settings that are used when no user configuration is provided.
3+
4+
server:
5+
name: holoviz-mcp
6+
version: "1.0.0"
7+
description: "Model Context Protocol server for HoloViz ecosystem"
8+
log_level: INFO
9+
transport: stdio
10+
anonymized_telemetry: false
11+
jupyter_server_proxy_url: ""
12+
security:
13+
allow_code_execution: false
14+
15+
docs:
16+
repositories:
17+
panel:
18+
url: https://github.com/holoviz/panel.git
19+
branch: main
20+
folders:
21+
doc:
22+
url_path: ""
23+
examples/reference:
24+
url_path: "/reference"
25+
base_url: https://panel.holoviz.org
26+
reference_patterns:
27+
- "examples/reference/**/*.md"
28+
- "examples/reference/**/*.ipynb"
29+
- "examples/reference/**/*.rst"
30+
panel-material-ui:
31+
url: https://github.com/panel-extensions/panel-material-ui.git
32+
branch: main
33+
folders:
34+
doc:
35+
url_path: ""
36+
examples/reference:
37+
url_path: "/reference"
38+
base_url: https://panel-material-ui.holoviz.org/
39+
reference_patterns:
40+
- "examples/reference/**/*.md"
41+
- "examples/reference/**/*.ipynb"
42+
- "examples/reference/**/*.rst"
43+
hvplot:
44+
url: https://github.com/holoviz/hvplot.git
45+
branch: main
46+
folders:
47+
doc:
48+
url_path: ""
49+
base_url: https://hvplot.holoviz.org
50+
reference_patterns:
51+
- "doc/reference/**/*.md"
52+
- "doc/reference/**/*.ipynb"
53+
- "doc/reference/**/*.rst"
54+
param:
55+
url: https://github.com/holoviz/param.git
56+
branch: main
57+
folders:
58+
doc:
59+
url_path: ""
60+
base_url: https://param.holoviz.org
61+
reference_patterns:
62+
- "doc/reference/**/*.md"
63+
- "doc/reference/**/*.ipynb"
64+
- "doc/reference/**/*.rst"
65+
holoviews:
66+
url: https://github.com/holoviz/holoviews.git
67+
branch: main
68+
folders:
69+
doc:
70+
url_path: ""
71+
examples/reference:
72+
url_path: "/reference"
73+
base_url: https://holoviews.org
74+
reference_patterns:
75+
- "examples/reference/**/*.md"
76+
- "examples/reference/**/*.ipynb"
77+
- "examples/reference/**/*.rst"
78+
datashader:
79+
url: https://github.com/holoviz/datashader.git
80+
branch: main
81+
folders:
82+
doc:
83+
url_path: ""
84+
examples:
85+
url_path: "/examples"
86+
base_url: https://datashader.org
87+
reference_patterns:
88+
- "doc/reference/**/*.md"
89+
- "doc/reference/**/*.ipynb"
90+
- "doc/reference/**/*.rst"
91+
geoviews:
92+
url: https://github.com/holoviz/geoviews.git
93+
branch: main
94+
folders:
95+
doc:
96+
url_path: ""
97+
examples:
98+
url_path: "/examples"
99+
base_url: https://geoviews.org
100+
reference_patterns:
101+
- "doc/reference/**/*.md"
102+
- "doc/reference/**/*.ipynb"
103+
- "doc/reference/**/*.rst"
104+
colorcet:
105+
url: https://github.com/holoviz/colorcet.git
106+
branch: main
107+
folders:
108+
doc:
109+
url_path: ""
110+
base_url: https://colorcet.holoviz.org
111+
reference_patterns:
112+
- "doc/reference/**/*.md"
113+
- "doc/reference/**/*.ipynb"
114+
- "doc/reference/**/*.rst"
115+
lumen:
116+
url: https://github.com/holoviz/lumen.git
117+
branch: main
118+
folders:
119+
doc:
120+
url_path: ""
121+
base_url: https://lumen.holoviz.org
122+
reference_patterns:
123+
- "doc/reference/**/*.md"
124+
- "doc/reference/**/*.ipynb"
125+
- "doc/reference/**/*.rst"
126+
127+
index_patterns:
128+
- "**/*.md"
129+
- "**/*.ipynb"
130+
- "**/*.rst"
131+
132+
exclude_patterns:
133+
- "**/node_modules/**"
134+
- "**/.git/**"
135+
- "**/build/**"
136+
- "**/__pycache__/**"
137+
- "**/.pytest_cache/**"
138+
139+
max_file_size: 1048576 # 1MB
140+
update_interval: 86400 # 24 hours
141+
142+
resources:
143+
search_paths: [] # Additional search paths for user resources
144+
# Default search paths are automatically included:
145+
# - Package default resources (src/holoviz_mcp/config/resources/)
146+
# - User config resources (~/.holoviz_mcp/config/resources/)
147+
148+
prompts:
149+
search_paths: [] # Additional search paths for user prompts
150+
# Default search paths are automatically included:
151+
# - Package default prompts (src/holoviz_mcp/config/prompts/)
152+
# - User config prompts (~/.holoviz_mcp/config/prompts/)

0 commit comments

Comments
 (0)