Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.21 KB

File metadata and controls

32 lines (24 loc) · 1.21 KB

AGENTS.md

Build/Test Commands

# Run the script
python compare_md_sim.py <file1.md> <file2.md>

# Install dependencies
pip install -r requirements.txt

Currently no automated tests exist. Future tests should use pytest.

Code Style Guidelines

  • Imports: Organize as (stdlib, third-party, local). Use explicit imports, avoid import *.
  • Formatting: Follow PEP 8. Use 4-space indentation.
  • Naming:
    • Functions/variables: snake_case
    • Classes: PascalCase
    • Constants: UPPER_SNAKE_CASE
  • Type hints: Not currently used; add when refactoring.
  • Docstrings: Use triple-quoted format with description of parameters and return values (as shown in existing code).
  • Error handling: Use try/except for external operations (file I/O, model loading); propagate context in error messages.
  • Comments: Use for complex logic and non-obvious intent. Comments are in Chinese; maintain consistency with existing codebase.

Project Structure

  • compare_md.py: Main script that compares semantic similarity of two Markdown files
  • requirements.txt: Python dependencies (markdown-it-py, beautifulsoup4, sentence-transformers, torch)
  • .gitignore: Standard Python ignore patterns