We welcome contributions from the community. There are several ways to contribute:
- Improvements in documentation.
- Contributing to OpenFL's code-base: via bug-fixes or feature additions.
- Answering questions on our discussions page.
- Participating in our roadmap discussions.
We have a slack channel and we host regular community meetings.
Before you start making any changes, it is always good to open an issue first (assuming one does not already exist), outlining your proposed changes. We can give you feedback, and potentially validate the proposed changes.
For minor changes (akin to a documentation or bug fix), proceed to opening a Pull Request (PR) directly.
To modify code, you need to fork the repository. Set up a development environment as covered in the section "Setup environment" below.
Once the change is ready, open a PR from your branch in your fork, to the develop
branch in securefederatedai/openfl. OpenFL follows standard recommendations of PR formatting. Find more details here.
Signoff your patch commits using your real name. We discourage anonymous contributions.
Signed-off-by: Joe Smith <[email protected]>
If you set your user.name
and user.email
git configs, you can sign your
commits using git commit --signoff
.
Your signature certifies that you wrote the patch, or, you otherwise have the right to pass it on as an open-source patch.
OpenFL is licensed under the Apache 2.0 license. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
Verify that your contribution passes all tests in our CI/CD pipeline. In case of a failure, like shown below, look into the error messages and try to fix them.
Meanwhile, a reviewer will review the pull request and provide comments. Post few iterations of reviews and changes (depending on the complexity of the changes), PR will be approved for merge.
We recommend setting up a local dev environment. Clone your forked repo to your local machine and install the dependencies.
git clone https://github.com/YOUR_GITHUB_USERNAME/openfl.git
cd openfl
pip install -U pip setuptools wheel
pip install .
pip install -r requirements-linters.txt
OpenFL uses black, isort and precommit to format the code.
Run the following command at the root directory of the repo to format your code.
sh shell/format.sh
You may need to resolve errors that could not be resolved by autoformatting. To only show lint errors, run sh shell/lint.sh
at the root directory of the repo.
Since docstrings cannot be checked or standardized, if you do write/edit any docstring, make sure to check them manually. OpenFL docstrings should follow the conventions below:
A class or a function docstring may contain:
- A one-line description of the class/function.
- Paragraph(s) of detailed information.
- Optional
Examples
section. Args
section for arguments under__init__()
.