---
description: User preferences and development conventions for TinyTorch, including module naming patterns, commit frequency, testing standards, and NBDev integration workflow.
alwaysApply: false
---


# User Preferences and Conventions

## Development Preferences

- **Module naming**: Use `{module_name}_dev.py` for development files (e.g., `tensor_dev.py`)
- **Commit frequency**: Check code into repo at good milestone stages
- **README focus**: Keep main project README focused on overarching goals, not module details
- **Component terminology**: Call code components 'modules' instead of 'parts'
- **Testing framework**: Always use pytest for all tests - no manual testing or other frameworks

## Educational Workflow

- **Self-contained modules**: Each module under `modules/` should be self-contained
- **Local testing first**: Students run and pass all tests locally within the module before exporting
- **Progressive learning**: Start simple, build complexity gradually
- **Notebook conversion**: Prefer writing Python files with markdown syntax, convert to Jupyter afterwards

## File Organization

- **Source-first approach**: Start with Python source files, generate notebooks from them
- **Clean structure**: Remove experimental/temporary files before committing
- **Consistent patterns**: Follow established patterns across all modules

## NBDev Integration

- **Export workflow**: Use `#| export` directives to mark code for package export
- **Educational directives**: Use `#| hide` for instructor solutions, visible sections for student work
- **Package structure**: Code exports from `modules/` to `tinytorch/` package

## Testing Standards

- **pytest only**: All tests must use pytest framework with proper test classes
- **Comprehensive coverage**: Tests should cover functionality, edge cases, and integration
- **Professional structure**: Use test classes, fixtures, and descriptive test names
- **CLI integration**: Tests must be compatible with `python bin/tito.py test --module {name}`

These preferences ensure consistency across the TinyTorch educational framework and smooth development workflow.
 
- **Package structure**: Code exports from `modules/` to `tinytorch/` package

These preferences ensure consistency across the TinyTorch educational framework and smooth development workflow.
 