Contents
Getting Started
- Setup - Development environment setup
- Architecture - System architecture
Development Workflow
- Testing - Running and writing tests
- Cython Development - Working with Cython modules
Contributing
- Contributing Guide - How to contribute
Quick Start
Environment Setup
Running Tests
Code Quality
Project Structure
myspellchecker
src/myspellchecker
core
algorithms
commands
providers
data_pipeline
segmenters
tokenizers
text
training
grammar
rules
schemas
data
utils
tests
integration
e2e
fixtures
test_*.py
scripts
Development Guidelines
Code Style
- Follow PEP 8 with 100-character line length
- Use type hints for all public functions
- Write docstrings for all public APIs
- Use meaningful variable and function names
Testing
- Maintain ≥75% code coverage
- Write unit tests for all new functions
- Add integration tests for new features
- Use pytest fixtures for test data
Documentation
- Update documentation for all changes
- Include docstrings with examples
- Add entries to CHANGELOG.md
Git Workflow
Commit Messages
Follow conventional commits:feat:New featurefix:Bug fixdocs:Documentationtest:Testsrefactor:Refactoringperf:Performancechore:Maintenance
Key Components
Core Components
Algorithms
Cython Modules
Cython Development
Building Extensions
Cython Tips
- Profile first: Only optimize hot paths
- Use typed memoryviews: For array operations
- Release GIL: For parallel operations
- Provide fallbacks: Pure Python for compatibility
Example Cython Pattern
Not all Cython modules use the same import pattern: normalize.py requires Cython directly (no fallback):Testing Guide
Test Categories
Running Specific Tests
Test Fixtures
Debugging
Enable Debug Logging
Using Debugger
Common Issues
Benchmarking
Test Fixtures
Test datasets are located intests/fixtures/benchmarks/:
pos_gold_standard.json- POS tagging accuracy evaluation