Thank you for your interest in contributing to the Semantic Foragecast Engine! This document provides guidelines and instructions for contributing.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Project Structure
- Coding Standards
- Testing Guidelines
- Pull Request Process
- Community
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to conduct@semanticintent.com.
Before creating bug reports, please check the issue tracker to avoid duplicates.
When creating a bug report, include:
- Clear title and description
- Steps to reproduce the issue
- Expected behavior vs. actual behavior
- Environment details (OS, Python version, Blender version)
- Configuration file you used
- Error messages and stack traces
- Sample files if applicable
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:
- Clear title and description
- Use case - why is this needed?
- Expected behavior - what should happen?
- Alternative solutions you've considered
- Related work - links to similar features
Unsure where to begin? Look for issues labeled:
good first issue- Easy issues for newcomershelp wanted- Issues where we need community helpdocumentation- Improvements to docs
We welcome pull requests! Here's the process:
- Fork the repository
- Create a feature branch from
develop - Make your changes with tests
- Run the test suite to ensure nothing breaks
- Update documentation as needed
- Submit a pull request to
developbranch
- Python 3.9 or higher
- Blender 4.0 or higher
- FFmpeg 4.4 or higher
- Git
# 1. Clone your fork
git clone https://github.com/YOUR-USERNAME/semantic-foragecast-engine.git
cd semantic-foragecast-engine
# 2. Add upstream remote
git remote add upstream https://github.com/semanticintent/semantic-foragecast-engine.git
# 3. Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 4. Install dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt
# 5. Install pre-commit hooks (optional but recommended)
pre-commit install
# 6. Verify setup
python tests/test_prep_audio.py# Run all tests
python -m unittest discover tests/
# Run specific test file
python tests/test_prep_audio.py
python tests/test_export_video.py
python tests/test_e2e_pipeline.py
# Run with coverage
pytest tests/ --cov=. --cov-report=html
# Run quick integration test
python quick_test.py# Check code style
black --check .
flake8 .
isort --check-only .
# Auto-format code
black .
isort .
# Type checking
mypy *.pysemantic-foragecast-engine/
├── main.py # Pipeline orchestrator
├── prep_audio.py # Phase 1: Audio analysis
├── blender_script.py # Phase 2: Blender automation
├── grease_pencil.py # 2D animation mode
├── export_video.py # Phase 3: Video export
├── config.yaml # Configuration files
├── tests/ # Test suite
│ ├── test_prep_audio.py
│ ├── test_export_video.py
│ └── test_e2e_pipeline.py
├── docs/ # Documentation
└── .github/ # GitHub configuration
├── workflows/ # CI/CD pipelines
└── ISSUE_TEMPLATE/ # Issue templates
We follow PEP 8 with these modifications:
- Line length: 100 characters (not 79)
- String quotes: Double quotes preferred
- Imports: Sorted with
isort(black profile)
- Type hints: Use type hints for function signatures
- Docstrings: All public functions must have docstrings (Google style)
- Comments: Explain why, not what
- Naming:
- Functions/variables:
snake_case - Classes:
PascalCase - Constants:
UPPER_SNAKE_CASE
- Functions/variables:
def process_audio(
audio_path: str,
lyrics_path: Optional[str] = None,
output_json: str = "prep_data.json"
) -> Dict[str, Any]:
"""
Process audio file and extract beats, phonemes, and lyrics.
Args:
audio_path: Path to audio file (WAV or MP3)
lyrics_path: Optional path to lyrics file
output_json: Output path for prep data
Returns:
Dictionary containing audio analysis results
Raises:
FileNotFoundError: If audio file doesn't exist
ValueError: If audio format is unsupported
"""
# Implementation here
pass- Unit tests for all new functions
- Integration tests for new features
- E2E tests for new modes/workflows
- Minimum 80% code coverage for new code
class TestNewFeature(unittest.TestCase):
"""Test suite for new feature."""
@classmethod
def setUpClass(cls):
"""Set up test fixtures once for all tests."""
pass
def setUp(self):
"""Set up before each test."""
pass
def test_basic_functionality(self):
"""Test basic feature behavior."""
# Arrange
input_data = "test"
# Act
result = new_feature(input_data)
# Assert
self.assertEqual(result, expected_value)
def tearDown(self):
"""Clean up after each test."""
pass# Run single test file
python tests/test_prep_audio.py
# Run single test class
python -m unittest tests.test_prep_audio.TestAudioPreprocessor
# Run single test method
python -m unittest tests.test_prep_audio.TestAudioPreprocessor.test_load_audio- Update documentation if you changed APIs
- Add tests for new functionality
- Run full test suite locally
- Update CHANGELOG.md with your changes
- Ensure CI passes on your fork
## Description
Brief description of changes
## Related Issue
Fixes #123
## Type of Change
- [ ] Bug fix (non-breaking change fixing an issue)
- [ ] New feature (non-breaking change adding functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing completed
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex logic
- [ ] Documentation updated
- [ ] Tests pass locally
- [ ] No new warnings generated- Automated checks must pass (CI, linting, tests)
- Code review by at least one maintainer
- Documentation review if docs changed
- Final approval and merge by maintainer
- Your PR will be included in the next release
- You'll be added to CONTRIBUTORS.md (if not already)
- Thank you for contributing!
See DEVELOPER_GUIDE.md for detailed tutorials on:
- Adding new animation modes
- Creating custom effects
- Extending audio analysis
- Building plugins
When adding new files:
- Core modules → Root directory
- Tests →
tests/directory - Documentation → Root
.mdfiles ordocs/for detailed guides - Examples →
examples/directory (create if needed) - Utilities → Root directory with clear naming
Update README.md if you:
- Add new features
- Change configuration options
- Modify installation process
- Add dependencies
- Docstrings: All public APIs
- Comments: Complex algorithms
- Type hints: Function signatures
- Examples: In docstrings for non-obvious usage
For major features, create a new guide in root:
- Follow existing guide structure
- Include Quick Start section
- Add examples and troubleshooting
- Link from README.md
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Questions and general discussion
- Email: support@semanticintent.com
- GitHub Issues: Technical discussions
- GitHub Discussions: General community chat
- Pull Requests: Code reviews and feedback
Contributors are recognized in:
- CONTRIBUTORS.md file
- GitHub contributors page
- Release notes
- Project README (for major contributions)
This contribution guide is adapted from open source contribution guides from:
Thank you for contributing to Semantic Foragecast Engine! 🎉