Thank you for your interest in contributing to pywire! 🧡
pywire is an open-source project, and we welcome contributions of all forms, whether it's reporting bugs, improving documentation, or writing code.
We strive to be an inclusive and welcoming community. Please be professional and respectful in all interactions.
- Reporting Bugs: If you find a bug, please create an issue in the relevant repository within the pywire organization.
- Suggesting Features: We love hearing new ideas! Please open a discussion or issue to discuss the design before writing code.
- Documentation: Improvements to docs are just as important as code.
- Code: Help us maintain and improve the pywire framework.
pywire is a polyrepo organization. These instructions generally apply to the pywire core repository and related repositories in the workspace.
- Python: You need Python 3.11 through 3.14.
- uv: We use uv for dependency management.
- pnpm: You may need pnpm (v9+) for working with the pywire client and websites.
- Git: Version control.
-
Fork the repository you want to work on (e.g.,
pywire/pywire) to your own GitHub account. -
Clone your fork to your local machine:
git clone https://github.com/your-username/pywire.git cd pywire -
Set up your environment. We use
uvto manage the workspace and dependencies:./scripts/install
-
Initialize the project. Ensure you have the necessary tools installed (like
pnpmfor documentation and client work).We provide several helper scripts in the
scripts/directory to make development easier. Here are the most common ones (available inpywireand most sub-repositories):scripts/docs: Runs the documentation development server (requirespnpm).scripts/build: Builds the client and documentation (requirespnpm).scripts/check: Runs the full suite of checks (formatting, linting, type checking, and tests).scripts/lint: Automatically formats code and fixes linting errors.scripts/test: Runs the test suite.
We enforce strict code style to keep the codebase clean and readable. We use Ruff for both formatting and linting, and mypy for static type checking.
- Format/Fix: Run
./scripts/lintto automatically format and fix linting errors. - Verify: Run
./scripts/checkto verify that everything (formatting, types, tests) is correct.
We use pytest for testing. Please ensure all tests pass before submitting a Pull Request.
./scripts/testIf you are adding a new feature, please add a corresponding test case in the tests/ directory.
Documentation is built using Starlight/Astro. If you are contributing to the documentation (usually in the docs folder or a separate pywire-docs repo):
- Navigate to the docs directory (or use
scripts/docsfrom the root ofpywire). - Install dependencies via
pnpm. - Run the development server to preview changes.
pywire is licensed under the Apache 2.0 License.
To ensure that you have the right to contribute your code, we require all changes to be "Signed-off". This certifies that you wrote the code or have the right to contribute it (Developer Certificate of Origin).
You can sign off your commits by adding the -s flag:
git commit -s -m "feat: add new signal handling to server"- Create a branch for your changes:
git checkout -b my-new-feature
- Make your changes. We prefer uses of Conventional Commits for commit messages (e.g.,
feat: add new signal handling to server). - Commit them (remember to sign-off!).
- Push your branch to your fork.
- Open a Pull Request against the
mainbranch of the upstream repository.
- The code follows the code style (run
./scripts/lint). - You have added tests for new features.
- All tests pass (run
./scripts/check). - You have updated the documentation (if applicable).
- You have signed off your commits.
Thank you for contributing!