New to FUSION development? This guide gets you productive in 5 minutes!
- Python 3.11+ installed
- Git repository cloned
- Virtual environment activated
Choose your installation method:
# Install everything automatically
./install.sh# Install all dependencies
make install
# Or just development tools
make install-dev# Install core package and dev tools
pip install -e .[dev]The automated installer handles PyTorch Geometric issues automatically!
# Auto-format all code before committing
make formatWhat it does: Fixes code style with ruff automatically
# Fast linting and type checking
make lint-newWhat it does: Finds bugs, style issues, and type problems with ruff + mypy
# Run tests with coverage
make test-newWhat it does: Runs pytest with coverage reporting
# Run everything before submitting PR
make check-allWhat it does: Combines format + lint + test + analysis
| Command | Purpose | When to Use |
|---|---|---|
make format |
Auto-fix code style | Before every commit |
make lint-new |
Check for issues | During development |
make test-new |
Run tests | After code changes |
make check-all |
Full quality check | Before PR submission |
make analyze |
Generate reports | Weekly/monthly analysis |
make profile |
Performance analysis | When optimizing |
Pre-commit hooks run automatically when you commit:
- Code formatting and linting (ruff)
- Type checking (mypy)
- Security scanning (bandit)
- Commit message validation (conventional commits)
If hooks fail: Fix the issues and commit again.
fusion/utils/config.py:42:89 E501 Line too long (94 > 88)
Fix: Shorten the line or use line breaks
fusion/utils/config.py:32: error: Returning Any from function
Fix: Add proper type annotations
TOTAL coverage: 85%
Goal: Maintain >80% coverage
After running make check-all, check these locations:
# View coverage in browser
open reports/coverage/htmlcov/index.html
# View dependency graphs
open reports/diagrams/architecture_overview.png
# View performance profile
snakeviz reports/profiling/profile.prof# Install missing tools
pip install -r requirements-dev.txt# Fix the issue and retry
git commit --amend# Add type hints or ignore specific lines
variable: str = "example" # Add type hint
line_to_ignore # type: ignore # Ignore if needed# Run specific test for debugging
pytest tests/test_specific.py -v- Use
make formatfrequently - Prevents style issues - Run
make lint-newwhile coding - Catches issues early - Check
make test-newafter changes - Ensures nothing breaks - Use
make check-allbefore PRs - Comprehensive validation - Review reports in
reports/- Understand code quality trends
- Makefile commands:
make help - Detailed workflow: See
DEVELOPMENT_WORKFLOW.md - Coding standards: See
CODING_STANDARDS.md - Reports guide: See
reports/README.md - Tool docs: Each tool has official documentation online
- Custom analysis: Edit scripts in
scripts/ - Configuration tuning: Modify
pyproject.toml,mypy.ini - CI/CD integration: Check
.github/workflows/quality.yml
- Ruff: Modern formatter and linter (fast, replaces black, isort, flake8)
- MyPy: Type checker (catches type-related bugs)
- Pytest: Test runner (with coverage reporting)
- Pre-commit: Git hooks (automated quality checks)
You're ready to contribute high-quality code to FUSION!
Run make check-all and ensure everything passes before your first PR.