Development Guide¶
This guide provides information for contributing to and developing AI Dev Local.
Development Environment Setup¶
Prerequisites¶
- Python 3.10+ with uv package manager
- Docker & Docker Compose for containerized services
- Git for version control
- pipx for isolated Python package installation
- pre-commit for code quality hooks
Initial Setup¶
-
Clone the repository:
-
Install in development mode:
-
Install pre-commit hooks:
-
Initialize development configuration:
Project Structure¶
The project follows Python best practices with the root folder for code in src/:
ai-dev-local/
├── src/ # Main source code
├── docs/ # Documentation (MkDocs)
├── tests/ # Unit tests
├── configs/ # Configuration templates
├── docker/ # Docker configurations
├── scripts/ # Utility scripts
├── mkdocs.yml # Documentation configuration
├── pyproject.toml # Python project configuration
└── README.md # Project overview
Development Workflow¶
Git Workflow¶
The project uses conventional commits and follows these practices:
-
Use conventional commit format:
-
Pre-commit hooks automatically run:
- Code formatting and linting
- Type checking
-
Documentation validation
-
Create tags for releases:
Running Tests¶
Unit tests are created by default using pytest:
# Run all tests
pytest
# Run with coverage
pytest --cov=src
# Run specific test file
pytest tests/test_specific.py
Documentation¶
Documentation is managed with MkDocs and Material theme:
# Serve documentation locally
mkdocs serve
# Build documentation
mkdocs build
# Deploy to GitHub Pages
mkdocs gh-deploy
Code Quality¶
The project uses several tools for code quality:
- Linting: flake8, pylint
- Formatting: black, isort
- Type checking: mypy
- Security: bandit
Pre-commit hooks ensure all checks pass before commits.
Packaging and Distribution¶
Package Management¶
- Package engine: uv
- CLI management: Click
- Deployment: pipx
Building and Publishing¶
Contributing Guidelines¶
Issue Management¶
- GitHub labels map to conventional commit standards
- Issues are assigned to @me by default
- GitHub Pages is enabled for documentation
Pull Request Process¶
- Create a feature branch
- Make changes following coding standards
- Add/update tests as needed
- Update documentation
- Ensure all checks pass
- Submit pull request
GitHub Actions¶
The project includes workflows for:
- MkDocs publishing to GitHub Pages
- Continuous integration testing
- Automated releases and packaging
Security Considerations¶
- Never commit sensitive data like API keys
- Use environment variables for configuration
- Follow security best practices for Docker containers
- Keep dependencies up to date
Support and Community¶
- GitHub Issues: Report bugs or request features
- GitHub Discussions: Community support
- Documentation: Latest docs
For questions or contributions, please refer to the project's GitHub repository.