Thank you for your interest in contributing to the Decentralized Reliability Engineering (DRE) project. This guide will help you set up your development environment and understand our contribution process.
- Development Environment Setup
- Project Structure
- Code Style Guidelines
- Development Workflow
- Pull Request Process
- Running Tests
- Common Issues
- Getting Help
Rye is our preferred Python environment manager. It provides a unified experience for managing Python installations, dependencies, and virtual environments.
curl -sSf https://rye.astral.sh/get | bash
source "$HOME/.rye/env" # Add to your shell's RC file
rye sync # Install all dependencies
rye run <command> # Run a command with project dependencies
rye show # Show current environment info
rye toolchain list --include-downloadable # List available Python versions
Configure your IDE to use the Python interpreter from .venv/bin/python
. This ensures consistent development settings across the team.
If you encounter issues:
- Update Rye:
rye self update
- Verify Python path:
which python3
- Check environment:
rye show
- List toolchains:
rye toolchain list --include-downloadable
We use pre-commit hooks to ensure code quality and consistency.
rye run pre-commit install
For more information, visit the pre-commit documentation.
If you plan to work on Rust components:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
For Linux:
sudo apt install -y clang mold protobuf-compiler
For macOS:
brew install mold protobuf
Add Cargo to your PATH:
export PATH="$HOME/.cargo/bin:$PATH" # Add to your shell's RC file
cd rs
cargo check
Required for frontend development:
- Install NVM:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
- Install Node.js:
nvm install 14
nvm use 14
- Install Yarn:
npm install --global yarn
The DRE repository is organized into several key components:
/dashboard
- Internal DRE dashboard (frontend and backend)/rs
- Rust implementations/pylib
- Python libraries/docs
- Project documentation/k8s
- Kubernetes configurations/scripts
- Utility scripts
- Follow PEP 8 style guide
- Use type hints for function arguments and return values
- Document functions and classes using docstrings
- Maximum line length: 100 characters
- Follow the official Rust Style Guide
- Use
rustfmt
for code formatting - Run
clippy
for linting
- Follow the project's ESLint configuration
- Use TypeScript for new code
- Follow the Angular commit message format
-
Fork the repository and create your branch from
main
:git checkout -b feature/your-feature-name
-
Set up development environment:
rye sync rye run pre-commit install
-
Make your changes:
- Write tests for new functionality
- Update documentation as needed
- Follow code style guidelines
-
Commit your changes:
git commit -m "feat: add new feature"
Follow the conventional commits specification
-
Push to your fork and create a pull request
- Ensure all tests pass locally
- Update documentation if needed
- Add a clear description of the changes
- Link any related issues
- Request review from maintainers
- Address review feedback
- Ensure CI checks pass
- feat: Add new feature
- fix: Fix bug
- docs: Update documentation
- test: Add tests
- refactor: Code refactoring
- chore: Maintenance tasks
rye run pytest
cd dashboard
yarn test
cd dashboard
yarn install
yarn dev # Starts development server
dre --dev subnet replace --id <subnet-id> -o1
If you encounter inotify issues:
sudo sysctl -w fs.inotify.max_user_watches=1048576
-
Permission Denied Errors
sudo chown -R $(whoami) .
-
Node Version Mismatch
nvm use 14 # Ensure correct Node version
-
Bazel Cache Issues
bazel clean --expunge
- Check existing GitHub Issues
- Join our developer community
- Review our documentation
- Reach out to maintainers on Discord
- Search existing issues
- Check the documentation
- Try troubleshooting steps
- Provide relevant details when asking
Remember: Good code is not just about functionality—it's about maintainability, readability, and collaboration. Thank you for contributing to DRE! 🚀