Thank you for your interest in contributing to DynVision! This document provides guidelines and workflows for contributing to the project.
- Code of Conduct
- Getting Started
- Development Workflow
- Pull Request Process
- Coding Standards
- Testing
- Documentation
- Issue Tracking
DynVision adopts the Contributor Covenant Code of Conduct. By participating in this project, you agree to abide by its terms. Please report unacceptable behavior to the project maintainers.
- Python 3.11 or higher
- Git
- A GitHub account
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/dynvision.git cd dynvision - Add the original repository as a remote:
git remote add upstream https://github.com/original-owner/dynvision.git
- Create a virtual environment:
conda create -n dynvision-dev python=3.12 conda activate dynvision-dev
- Install the package in development mode:
pip install -e ".[dev]"
This will install all development dependencies along with DynVision itself.
- Ensure your master branch is up-to-date:
git checkout master git pull upstream master
- Create a feature branch:
git checkout -b feature/your-feature-name
- Make your changes, adhering to the Coding Standards
- Write or update tests as needed
- Run tests locally:
pytest
- Update documentation as needed
- Commit your changes with a clear commit message:
git commit -m "Add feature: brief description of changes" - Push your branch to your fork:
git push origin feature/your-feature-name
- Open a pull request from your fork to the main repository
- Ensure your PR addresses a specific issue. If no issue exists, create one first.
- Include a clear description of the changes and their purpose
- Update relevant documentation
- Ensure all tests pass
- Request a review from at least one maintainer
- Address any feedback or requested changes
- Once approved, your PR will be merged by a maintainer
DynVision follows these coding standards:
- PEP 8 for Python code style
- Type Hints for function signatures
- Docstrings following the NumPy docstring format
- Imports organized in the following order: standard library, third-party packages, local modules
- Line Length limited to 88 characters (using Black formatter)
We use several tools to enforce these standards:
- Black for code formatting
- isort for import sorting
- flake8 for style guide enforcement
- mypy for type checking
You can run these tools locally:
# Format code
black dynvision tests
# Sort imports
isort dynvision tests
# Check code style
flake8 dynvision tests
# Type checking
mypy dynvisionGood documentation is crucial for the usability of DynVision. When contributing, please:
- Update or add docstrings to all public functions, classes, and methods
- Update relevant user guides, tutorials, and reference documentation
- Add examples for new features
- Ensure documentation builds correctly
The documentation follows the "Diátaxis" system with four types of documentation:
- Tutorials: Learning-oriented guides for beginners
- How-to Guides: Task-oriented guides for specific problems
- Reference: Information-oriented technical descriptions
- Explanation: Understanding-oriented conceptual discussions
We use GitHub Issues to track bugs, feature requests, and other project tasks.
When reporting bugs, please include:
- A clear, descriptive title
- Steps to reproduce the bug
- Expected behavior
- Actual behavior
- System information (OS, Python version, PyTorch version, etc.)
- Any relevant logs or screenshots
When suggesting features, please include:
- A clear, descriptive title
- Detailed description of the proposed feature
- Rationale: why this feature would be useful
- Example use cases
- Any references to similar implementations, if applicable
DynVision is designed to be modular and extensible. If you'd like to add a new model or component:
- Follow the existing patterns in similar modules
- Ensure proper integration with the rest of the codebase
- Add comprehensive documentation
- Include tests that verify functionality
- Update relevant configuration files if needed
When adding new model components:
- Implement the component following the existing architecture
- Add type hints and docstrings
- Write unit tests
- Document the component in the API reference
- Add examples in tutorials or how-to guides
- Update the model zoo if applicable
Thank you for contributing to DynVision!