-
Andrew Morgan authoredAndrew Morgan authored
Contributing
This document aims to get you started with contributing to Synapse!
1. Who can contribute to Synapse?
Everyone is welcome to contribute code to matrix.org projects, provided that they are willing to license their contributions under the same license as the project itself. We follow a simple 'inbound=outbound' model for contributions: the act of submitting an 'inbound' contribution means that the contributor agrees to license the code under the same terms as the project's overall 'outbound' license - in our case, this is almost always Apache Software License v2 (see LICENSE).
2. What do I need?
If you are running Windows, the Windows Subsystem for Linux (WSL) is strongly recommended for development. More information about WSL can be found at https://docs.microsoft.com/en-us/windows/wsl/install. Running Synapse natively on Windows is not officially supported.
The code of Synapse is written in Python 3. To do pretty much anything, you'll need a recent version of Python 3.
The source code of Synapse is hosted on GitHub. You will also need a recent version of git.
For some tests, you will need a recent version of Docker.
3. Get the source.
The preferred and easiest way to contribute changes is to fork the relevant project on GitHub, and then create a pull request to ask us to pull your changes into our repo.
Please base your changes on the develop
branch.
git clone git@github.com:YOUR_GITHUB_USER_NAME/synapse.git
git checkout develop
If you need help getting started with git, this is beyond the scope of the document, but you can find many good git tutorials on the web.
4. Install the dependencies
Once you have installed Python 3 and added the source, please open a terminal and setup a virtualenv, as follows:
cd path/where/you/have/cloned/the/repository
python3 -m venv ./env
source ./env/bin/activate
pip install -e ".[all,dev]"
pip install tox
This will install the developer dependencies for the project.
5. Get in touch.
Join our developer community on Matrix: #synapse-dev:matrix.org!