Contributing
Contributions to the eTracer project are welcome! Here’s how you can contribute:
Setting Up Development Environment
To set up the development environment:
# Clone the repository
git clone https://github.com/emmanuelkasulani/etracer.git
cd etracer
# Install development dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
Pre-commit Hooks
The project uses pre-commit hooks to ensure code quality before each commit. These hooks automatically run:
Code formatting with Black
Import sorting with isort
Linting with Flake8
Type checking with MyPy
Unit tests with pytest
Various other code quality checks
The hooks will prevent committing if any of these checks fail.
Code Quality Tools
The project uses several code quality tools that can be run via Make commands:
# Format code with Black
make format
# Run linting with Flake8
make lint
# Run type checking with MyPy
make typecheck
# Run unit tests with pytest
make test
# Run tests with coverage report
make test-coverage
# Open coverage report in browser
make coverage-report
# Run all quality checks (format, lint, typecheck, test)
make all
Makefile Commands
The following Make commands are available:
Pull Request Process
Fork the repository and create a branch from main
Update the tests if necessary
Ensure your code passes all tests and quality checks
Submit a pull request
Building the Documentation
To build the documentation:
# Install documentation dependencies
pip install -e ".[docs]"
# Build documentation
make docs-html
# View documentation
make docs-open