Skip to content

Add CLAUDE.md documentation and maintenance tools#114

Merged
ncfrey merged 10 commits intomainfrom
n/claude-md
Jun 23, 2025
Merged

Add CLAUDE.md documentation and maintenance tools#114
ncfrey merged 10 commits intomainfrom
n/claude-md

Conversation

@ncfrey
Copy link
Contributor

@ncfrey ncfrey commented Jun 19, 2025

Summary

• Add CLAUDE.md file with comprehensive guidance for Claude Code instances
• Add pre-commit hook to remind about CLAUDE.md updates
• Add optional script to detect when CLAUDE.md needs updating

Test plan

  • Pre-commit hooks pass
  • CLAUDE.md contains essential project information
  • Maintenance tools work as expected

@ncfrey ncfrey temporarily deployed to test.pypi.org June 19, 2025 14:30 — with GitHub Actions Inactive
@ncfrey ncfrey temporarily deployed to test.pypi.org June 19, 2025 14:40 — with GitHub Actions Inactive
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ncfrey ncfrey temporarily deployed to test.pypi.org June 19, 2025 17:43 — with GitHub Actions Inactive
- Implement FastMCP-based MCP server with protein model inference tools
- Add automated setup script for both Claude Desktop and Cursor
- Support sequence representations, concept interventions, and naturalness scoring
- Include comprehensive documentation and test coverage

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ncfrey ncfrey temporarily deployed to test.pypi.org June 19, 2025 23:21 — with GitHub Actions Inactive
- Add MCP integration section to README with setup instructions
- Update .gitignore to exclude claude_desktop_config.json
- Update uv.lock with new MCP dependencies
- Add git commit guidelines to CLAUDE.md
@ncfrey ncfrey temporarily deployed to test.pypi.org June 19, 2025 23:24 — with GitHub Actions Inactive
@ncfrey ncfrey requested review from Copilot and karinazad June 19, 2025 23:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces the CLAUDE.md documentation and several maintenance tools to help keep project documentation and configuration in sync. Key changes include:

  • Added a comprehensive CLAUDE.md file with guidelines for Claude Code.
  • Integrated pre-commit hooks and scripts (e.g., check_claude_md.py) to remind contributors to update CLAUDE.md.
  • Extended tests and MCP server components to support new project configuration and integration.

Reviewed Changes

Copilot reviewed 15 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/lobster/model/test__ume.py Added test for disabling flash-attn during CPU inference.
tests/lobster/mcp/test_simple_server.py Added basic import and device detection tests for MCP server.
tests/lobster/mcp/test_inference_server.py Added extensive tests for model inference and error handling.
tests/lobster/mcp/init.py Introduced package initialization for MCP tests.
src/lobster/mcp/simple_test_server.py Provided a helper script for debugging MCP server connectivity.
src/lobster/mcp/setup.py Implemented setup procedures for Claude Desktop and Cursor integration.
src/lobster/mcp/inference_server.py Added FastMCP server implementation and Pydantic models for validation.
src/lobster/mcp/example_server.py Provided an example script for testing the MCP server functionality.
src/lobster/mcp/init.py Updated module initialization for MCP integration.
scripts/check_claude_md.py Added a script to detect changes that might require a CLAUDE.md update.
pyproject.toml Updated entry points and optional dependencies for MCP support.
docs/MCP_INTEGRATION.md Added detailed documentation for MCP integration with Lobster.
README.md Updated instructions to include MCP integration steps.
CLAUDE.md New documentation guiding Claude Code interactions with the repository.
.pre-commit-config.yaml Added a local hook to remind contributors to update CLAUDE.md as needed.
Comments suppressed due to low confidence (2)

src/lobster/mcp/example_server.py:16

  • The import statement appears to reference 'lobster_inference_server', which may not align with the project structure. Please update it to 'from lobster.mcp.inference_server import LobsterInferenceServer' to ensure correct module resolution.
from lobster_inference_server import LobsterInferenceServer

CLAUDE.md:7

  • There appears to be a typo in the project description. 'LBSTER' should be corrected to 'Lobster'.
LBSTER (Lobster) is a "batteries included" language model library for proteins and biological sequences built with PyTorch Lightning and Hydra configuration management. The project uses a modular architecture with clear separation between data handling, model definitions, training, and evaluation.

- Convert test_imports() to use raise AssertionError() with proper exception chaining
- Add separate _check_imports() helper for script usage
- Fixes CI/CD error: Expected None, but test returned True
@ncfrey ncfrey temporarily deployed to test.pypi.org June 20, 2025 16:57 — with GitHub Actions Inactive
return 0

if __name__ == "__main__":
sys.exit(main()) No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

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

is sys exit needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think so, since we're running this as a pre-commit hook, to return an exit code to see if the hook passes

def get_lobster_path():
"""Get the absolute path to the Lobster repository"""
# From src/lobster/mcp/setup.py -> lobster root
return os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this could be Path(__file__).resolve().parents[3]

return os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))


def get_claude_desktop_config_path():
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice! this is the most annoying part

@ncfrey ncfrey temporarily deployed to test.pypi.org June 20, 2025 17:45 — with GitHub Actions Inactive
@ncfrey ncfrey merged commit 1afa12a into main Jun 23, 2025
5 checks passed
@ncfrey ncfrey deleted the n/claude-md branch June 23, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants