Thank you for your interest in contributing! We welcome contributions of all kinds, whether it’s fixing bugs, adding new features, improving documentation, or writing tests. To ensure a smooth process, please follow these guidelines.
By participating in this project, you agree to abide by the Code of Conduct. Please read it to understand the expectations for behaviour and how to report unacceptable conduct.
If you find a bug, or something doesn’t work as expected, please open an issue with:
- A descriptive title (e.g. “IOPi.get_pin_direction() fails when channel > 7”)
- A clear description of the problem
- Steps to reproduce
- The version of the library
- Environment details (Raspberry Pi version, OS version, Python version)
- Any error messages, stack traces, or logs
Before opening, please search existing issues to avoid duplicates.
If you have ideas for improvements or new features, open an issue labelled enhancement. Provide:
- The motivation for the change
- A proposed design change or addition
- Any potential backwards compatibility impact
We welcome discussion before you start coding so we can ensure alignment.
We’d love to help you get started. Here’s how:
- Fork the repository
- Clone your fork locally
- Create a feature branch (e.g.
feature/xyzorfix/abc) - Make your changes, ensuring adherence to style and existing patterns
- Add or update tests and documentation
- Push your branch to your fork
- Open a Pull Request (PR) against the
masterbranch - In the PR description, reference any relevant issue(s) and explain your change
Your PR will be reviewed by maintainers; you may get feedback or requests for changes. Please be patient and responsive to feedback.
- Branching: Always branch off
masterfor new work - Rebase or merge? Use rebase to keep your commit history clean (or merge, depending on project preference)
- Commit messages: Use clear, imperative style (e.g. “Fix I2C read error when buffer full”)
- Pull Requests: Should ideally contain only one logical change; avoid mixing unrelated changes
This library supports Python 3 only (as stated in README).
If support for additional Python versions is desired, it should be treated as a separate effort (or branch).
- Follow PEP 8 conventions
- Use meaningful variable and function names
- Avoid overly long functions — refactor where appropriate
- Add inline comments for tricky logic
We encourage use of linters (e.g. flake8, pylint) and formatters (e.g. black, isort) — maintainers may run these checks during CI.
- Provide tests for new features or bug fixes
- Use the existing test framework / structure
- Ensure new tests pass locally before opening PR
- Aim for good coverage, particularly for edge cases
If your change cannot be tested automatically (e.g. hardware-specific behaviour), document how to test it manually.
- Update README.md, CHANGELOG.md, or module-level docstrings to reflect your changes
- If you add a new class or module, include usage examples
- Keep written style consistent with the existing docs
Good documentation is as important as good code.
- Releases are made by maintainers (often via GitHub Releases)
- Before a release:
- Bump version number in
setup.py/pyproject.toml - Update CHANGELOG with notable changes
- Ensure all tests pass
- Bump version number in
- Tag the release and create a GitHub release entry
If your PR merits inclusion in the next release, it's helpful to mention it in your PR.
By contributing, you agree that your contributions will be licensed under the same licence as the project (GPL-2.0).
(See the LICENSE file.)
Thank you for helping improve ABElectronics_Python_Libraries! Your efforts are appreciated.
If in doubt, feel free to open an issue or ask maintainers for guidance before diving in.