Windows fixes#100
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements Windows-specific fixes and improvements to code execution in the HoloViz MCP display server. The changes introduce a new module execution pattern, add concurrency protection for database operations, and include comprehensive test coverage for the new functionality.
Changes:
- Implements
execute_in_module()utility to properly execute Python code in module namespaces, fixing issues with Panel decorators (@pn.cache, @pn.depends) on Windows - Adds async locking to DocumentationIndexer to prevent database corruption from concurrent access
- Fixes attribute access bug in add_page.py (dict access on Snippet object)
- Adds 369 lines of comprehensive tests for the new execution utilities
- Updates documentation with ECharts formatter guidance and tutorial improvements
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/display_mcp/test_utils.py | Adds extensive test coverage for execute_in_module, including cleanup behavior, decorator support, and integration tests with _execute_code |
| src/holoviz_mcp/holoviz_mcp/data.py | Adds async lock initialization and wraps database query methods (search, get_document, list_projects, search_get_reference_guide) with lock protection |
| src/holoviz_mcp/display_mcp/utils.py | Introduces execute_in_module function to properly execute code in module namespace, updates validate_code to use it |
| src/holoviz_mcp/display_mcp/pages/view_page.py | Refactors _execute_code to use execute_in_module with proper cleanup logic for both jupyter and panel methods |
| src/holoviz_mcp/display_mcp/pages/add_page.py | Fixes bug: changes result["id"] to result.id for correct Snippet object attribute access |
| src/holoviz_mcp/config/resources/skills/panel.md | Adds critical documentation about ECharts JSON serialization limitations and proper formatter usage |
| docs/tutorials/stock-analysis.md | Minor documentation improvements to tutorial prompts |
Owner
Author
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Contributor
|
@MarcSkovMadsen I've opened a new pull request, #101, to work on those changes. Once the pull request is ready, I'll request review from you. |
…x asyncio.Lock init, protect index_documentation with lock, remove useless try-except Co-authored-by: MarcSkovMadsen <42288570+MarcSkovMadsen@users.noreply.github.com>
Address code review feedback: fix exception handling, async lock initialization, and concurrency protection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.