Skip to content

Post merge hotfixes#40

Merged
ndaelman-hu merged 7 commits into
mainfrom
post-merge-hotfixes
Nov 28, 2025
Merged

Post merge hotfixes#40
ndaelman-hu merged 7 commits into
mainfrom
post-merge-hotfixes

Conversation

@ndaelman-hu

Copy link
Copy Markdown
Owner

Fixes 2 errors that were not caught during the refactoring. Were noticed during a showcase last week.

  1. sub-server tools not loading
  2. surpressing cclib warning under Python 3.12

For point 2, this is the first time adding such a wide fix, so the procedure has been added to the docs too.

@ndaelman-hu ndaelman-hu self-assigned this Nov 24, 2025
@ndaelman-hu ndaelman-hu added bug Something isn't working documentation Improvements or additions to documentation labels Nov 24, 2025

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses two critical post-merge bugs discovered during a showcase: fixing sub-server tool registration and implementing comprehensive warning suppression for cclib's SyntaxWarning issues under Python 3.12.

Key Changes:

  • Fixed dictionary access bug in __main__.py where getattr() was incorrectly used on dict objects instead of dict.get()
  • Implemented three-layer warning suppression strategy: runtime filters in __init__.py, environment variables in MCP templates, and pytest configuration
  • Added comprehensive documentation explaining the warning suppression approach for different usage contexts

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/parse_patrol/__main__.py Fixed tool registration by changing getattr(config, ...) to config.get(...) for proper dictionary access
src/parse_patrol/parsers/cclib/__init__.py New file that suppresses SyntaxWarning from cclib before module imports using warnings.filterwarnings
src/parse_patrol/parsers/cclib/utils.py Changed to relative import (from . import cclib) to use the warning-filtered cclib from __init__.py
templates/vscode-mcp.json Added PYTHONWARNINGS: "ignore::SyntaxWarning" environment variable for MCP server usage
templates/neovim-mcp.json Added PYTHONWARNINGS: "ignore::SyntaxWarning" environment variable for MCP server usage
templates/claude-desktop-mcp.json Added PYTHONWARNINGS: "ignore::SyntaxWarning" environment variable for MCP server usage
pyproject.toml Added ignore::SyntaxWarning to pytest filterwarnings configuration
README.md Added detailed "Warning Suppression for Dependencies" section documenting the three-pronged suppression approach

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/parse_patrol/parsers/cclib/__init__.py Outdated
@ndaelman-hu

Copy link
Copy Markdown
Owner Author

@Sideboard did you encounter this issue with loading the tools when adding ase? Could you pls check that this works for you and won't hamper your work?

@QuantumChemist QuantumChemist left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the hotfixes. I just have this little suggestion.

Comment thread src/parse_patrol/parsers/cclib/utils.py Outdated
…ernally

Changes to be committed:
	modified:   src/parse_patrol/parsers/cclib/utils.py
@ndaelman-hu
ndaelman-hu merged commit e0b0690 into main Nov 28, 2025
2 checks passed
@QuantumChemist

Copy link
Copy Markdown
Collaborator

yay :D

@ndaelman-hu
ndaelman-hu deleted the post-merge-hotfixes branch December 9, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants