Contributing to Python ROS Engine¶
Thank you for your interest in contributing to the Python ROS Engine! We welcome contributions from the community to help improve this pure Python implementation of ROS2 functionality.
Table of Contents¶
- Code of Conduct
- Getting Started
- How to Contribute
- Development Setup
- Coding Standards
- Testing
- Documentation
- Pull Request Process
- Reporting Bugs
- Requesting Features
Code of Conduct¶
This project adheres to a Code of Conduct adapted from the Contributor Covenant. By participating, you are expected to uphold this code. Please report unacceptable behavior to pyros@example.com.
Getting Started¶
- Fork the repository on GitHub
- Clone your fork locally
- Set up the development environment (see Development Setup)
How to Contribute¶
There are several ways you can contribute to this project:
- Report bugs and issues
- Suggest new features
- Improve documentation
- Write code to implement new features or fix bugs
- Review pull requests from other contributors
Development Setup¶
- Ensure you have Python 3.8 or higher installed
- Create a virtual environment:
- Install the package in development mode:
- Install test dependencies:
Coding Standards¶
We follow the PEP 8 style guide for Python code. Additionally:
- Use type hints for all function parameters and return values
- Write docstrings for all public classes and methods using the Google Python Style Guide
- Keep functions and classes focused on a single responsibility
- Use dataclasses for message types when possible
- Ensure code is readable and well-commented where necessary
Testing¶
All contributions must include appropriate tests. We use pytest for testing.
To run all tests:
To run tests with coverage:
Documentation¶
We maintain documentation in the docs/
directory. When adding new features or modifying existing functionality, please update the relevant documentation files.
- API documentation:
docs/api.md
- Usage guide:
docs/usage.md
- Bridging documentation:
docs/bridging.md
Documentation can be built and served locally using the build_docs.py
script. See project_structure.md for details on how to use this script.
Pull Request Process¶
- Ensure any install or build dependencies are removed before the end of the layer when doing a build
- Update the README.md and documentation files with details of changes to the interface, including new environment variables, exposed ports, useful file locations, and container parameters
- Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is SemVer
- Your Pull Request will be reviewed by maintainers, who may request changes
- Once approved, your Pull Request will be merged
Reporting Bugs¶
Please use the GitHub issue tracker to report bugs. When filing an issue, please include:
- A clear and descriptive title
- Steps to reproduce the bug
- Expected behavior
- Actual behavior
- Any relevant error messages or logs
- Information about your environment (Python version, OS, etc.)
Requesting Features¶
We welcome feature requests! Please use the GitHub issue tracker and include:
- A clear and descriptive title
- A detailed description of the proposed feature
- The motivation for the feature
- How the feature would be used