Skip to main content
This section covers environment setup, testing workflows, Cython development, and contribution guidelines for the mySpellChecker project.

Contents

Getting Started

Development Workflow

Contributing

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 feature
  • fix: Bug fix
  • docs: Documentation
  • test: Tests
  • refactor: Refactoring
  • perf: Performance
  • chore: Maintenance

Key Components

Core Components

Algorithms

Cython Modules

Cython Development

Building Extensions

Cython Tips

  1. Profile first: Only optimize hot paths
  2. Use typed memoryviews: For array operations
  3. Release GIL: For parallel operations
  4. 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):
viterbi.py has a Python fallback via flag:

Testing Guide

Test Categories

Running Specific Tests

Test Fixtures

Debugging

Enable Debug Logging

Using Debugger

Common Issues

Benchmarking

Test Fixtures

Test datasets are located in tests/fixtures/benchmarks/:
  • pos_gold_standard.json - POS tagging accuracy evaluation
See test fixtures for sample evaluation data.

Release Process

Version Bump

Building Package

Resources

Documentation