We are happy to accept your contributions to make FlagAI
better and more awesome! To avoid unnecessary work on either
side, please stick to the following process:
- Check if there is already an issue for your concern.
- If there is not, open a new one to start a discussion. We hate to close finished PRs!
- If we decide your concern needs code changes, we would be happy to accept a pull request. Please consider the commit guidelines below.
Before you can contribute to FlagAI, you will need to sign the Contributor License Agreement.
If there is already a ticket, use this number at the start of your commit message. Use meaningful commit messages that described what you did.
Example: GH-42: Added new type of embeddings: DocumentEmbedding.
Example: ISSUE#123: Fix typo in README.
For contributors looking to get deeper into the API we suggest cloning the repository and checking out the unit tests for examples of how to call methods. Nearly all classes and methods are documented, so finding your way around the code should hopefully be easy.
You can either use Pipenv for this:
or create a python environment of your preference and run
python setup.py install
Install pytest
for testing
pip install pytest
To run all basic tests execute:
pytest
To ensure a standardized code style we use the formatter yapf.
You can automatically format the code via yapf flagai/ -i
in the flair root folder.