Developer Guide
Purpose
This section explains how to contribute to the RDEToolKit project and set up a development environment. We welcome various forms of contribution, including bug fixes, new feature additions, and documentation improvements.
Types of Contributions
Code Contributions
- Bug Fixes: Resolving existing issues
- New Feature Development: Adding and extending functionality
- Performance Improvements: Optimizing processing speed and memory usage
- Test Additions: Improving coverage
Documentation Contributions
- Documentation Improvements: Enhancing quality of existing documentation
- Translation: Expanding multilingual support
- Tutorial Creation: Enriching learning resources
Community Contributions
- Bug Reports: Finding and reporting issues
- Feature Requests: Proposing new features
- Answering Questions: Community support
Development Environment Setup
Prerequisites
- Python: 3.9 or higher
- Git: Version control
- Rye: Package management tool
Setup Steps
-
Clone Repository
terminal 1 2
git clone https://github.com/nims-dpfc/rdetoolkit.git cd rdetoolkit
-
Install Rye
terminal 1 2
curl -sSf https://rye-up.com/get | bash source ~/.rye/env
-
Install Dependencies
terminal 1
rye sync
-
Activate Development Environment
terminal 1
source .venv/bin/activate
-
Setup pre-commit
terminal 1
pre-commit install
Development Workflow
Branch Strategy
- main: Stable main branch
- feature/: New feature development branches
- bugfix/: Bug fix branches
- docs/: Documentation update branches
Development Process
- Create or Check Issue
- Clarify work content in GitHub Issues
-
Check if existing Issue exists
-
Create Branch
terminal 1
git checkout -b feature/your-feature-name
-
Development and Testing
terminal 1 2 3 4 5 6 7 8 9
# Make code changes # Run tests rye test # Lint check rye lint # Format rye fmt
-
Commit and Push
terminal 1 2 3
git add . git commit -m "feat: add new feature description" git push origin feature/your-feature-name
-
Create Pull Request
- Create pull request on GitHub
- Include detailed description and test results
Coding Standards
Python Style
- PEP 8: Comply with Python standard style guide
- Type Hints: Add type annotations to all functions
- docstring: Use Google-style docstrings
example_function.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
Writing Tests
test_example.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
Quality Assurance
Automated Checks
- pre-commit: Automatic checks before commit
- GitHub Actions: CI/CD pipeline
- codecov: Test coverage measurement
Check Items
- Lint: flake8, pylint
- Format: black, isort
- Type Check: mypy
- Test: pytest
- Security: bandit
Release Process
Versioning
Adopts Semantic Versioning (SemVer):
- MAJOR: Breaking changes
- MINOR: Backward-compatible feature additions
- PATCH: Backward-compatible bug fixes
Release Steps
- Update Changelog
- Update Version Number
- Create Tag
- Publish to PyPI
- Create GitHub Release
Community Guidelines
Communication
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Questions and discussions
- Pull Request: Code review and discussion
Code of Conduct
- Respect: Respect all participants
- Constructive: Provide constructive feedback
- Collaborative: Value teamwork
- Inclusive: Welcome diversity
Next Steps
To participate in development:
- Contributing - Detailed contribution guidelines
- Documentation Creation - How to create documentation
- GitHub Issues - Check available tasks
For First-time Contributors
If you're contributing for the first time, we recommend starting with Issues labeled "good first issue".