Developer Documentation
Technical documentation for extending and contributing to EiplGrader.
Documentation Sections
🏗️ Architecture Overview
Understand the system design and component relationships.
- System architecture diagrams
- Core design principles
- Component interactions
- Data flow patterns
🧩 Core Components
Deep dive into the main components.
- CodeGenerator - Natural language to code
- CodeTester - Code execution and testing
🌐 Language System
Learn how language support works.
- Architecture - Language system design
- Adding Languages - Step-by-step guide
- Executors - Execution models
📚 API Reference
Complete API documentation.
- Class methods and signatures
- Parameter descriptions
- Return value formats
- Usage examples
🧪 Testing
Quality assurance and testing strategies.
- Unit test structure
- Integration testing
- Language-specific tests
- Performance benchmarks
🤝 Contributing
How to contribute to EiplGrader.
- Development setup
- Code style guidelines
- Pull request process
- Release procedures
Architecture at a Glance
┌─────────────────┐ ┌─────────────────┐
│ CodeGenerator │ │ CodeTester │
└────────┬────────┘ └────────┬────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│Language Adapters│ │Language Executors│
└────────┬────────┘ └────────┬────────┘
│ │
└───────────┬───────────┘
▼
┌─────────────────┐
│Language Registry│
└─────────────────┘
Key Concepts for Developers
Separation of Concerns
- Adapters: Handle language-specific code generation
- Executors: Handle language-specific code execution
- Registry: Central registration and discovery
Extension Points
- New Languages: Add adapter + executor + register
- New LLM Providers: Implement ModelRequest interface
- Custom Test Runners: Extend CodeTester class
- New Generation Types: Extend prompt templates
Type System
- Dynamic Languages: Automatic type inference
- Static Languages: Explicit type validation
- Type Mappers: Generic to language-specific types
Development Workflow
Setting Up
# Clone repository
git clone https://github.com/hamiltonfour/eiplgrader.git
cd eiplgrader
# Install development dependencies
pip install -e ".[dev]"
# Run tests
python -m pytest
# Run linting
./lint.sh
Adding a Feature
- Create feature branch
- Implement with tests
- Update documentation
- Submit pull request
Testing Changes
# Run unit tests
python -m pytest tests/unit/
# Run integration tests
python -m pytest tests/integration/
# Run specific language tests
python -m pytest tests/ -k "python"
Performance Considerations
Optimization Points
- Parallel test execution
- Executor pooling and reuse
- Compilation caching
- LLM response caching
Resource Management
- Temporary file cleanup
- Process isolation
- Memory limits
- Timeout enforcement
Security Model
Code Execution Isolation
- Subprocess execution
- Filesystem isolation
- Network restrictions
- Resource limits
Best Practices
- Never execute in main process
- Always validate inputs
- Clean up temporary files
Getting Started
New to the codebase? Follow this path:
- Read Architecture Overview
- Explore Core Components
- Understand Language System
- Set up Development Environment
Ready to contribute? Check out our open issues or propose a new feature!