Contributing to Jina¶
Thanks for your interest in contributing to Jina. We’re grateful for your initiative! ❤️
I’m Alex C-G, Open Source Evangelist for Jina. I’m all about getting our new contributors up-to-speed, and that’s what we’ll do below. If you have any feedback or questions, ping me on Twitter or get in touch on Slack.
In this guide we’re going to go through how the steps for each kind of contribution, and good and bad examples of what to do. We look forward to your contributions!
Before you Start¶
Bugs and Issues¶
We love to get issue reports. But we love it even more if they’re in the right format. For any bugs you encounter, we need you to:
Describe your problem: What exactly is the bug. Be as clear and concise as possible
Why do you think it’s happening? If you have any insight, here’s where to share it
There are also a couple of nice to haves:
Environment: You can find this with
Screenshots: If they’re relevant
Making Your First Submission¶
Associate your local git config with your github account. If this is your first time using git you can follow the steps.
Fork the Jina repo and clone onto your computer.
Create a new branch, for example
Work on this branch to do the fix/improvement.
Commit the changes with the correct commit style.
Make a pull request.
Submit your pull request and wait for all checks to pass.
Request reviews from one of the code owners.
Get a LGTM 👍 and PR gets merged.
Note: If you’re just fixing a typo or grammatical issue, you can go straight to a pull request.
Associate with github account¶
Confirm username and email on your profile page.
Set git config on your computer.
git config user.name "YOUR GITHUB NAME" git config user.email "YOUR GITHUB EMAIL"
(Optional) Reset the commit author if you made commits before you set the git config.
git checkout YOUR-WORKED-BRANCH git commit --amend --author="YOUR-GITHUB-NAME <YOUR-GITHUB-EMAIL>" --no-edit git log # to confirm the change is effective git push --force
What happens after the merge? Understand the development stage and release cycles here.
For branches, commits, and PRs we follow some basic naming conventions:
Use all lower-case
Include one of our specified types
Short (under 70 characters is best)
In general, follow the Conventional Commit guidelines
For each branch, commit, or PR, we need you to specify the type to help us keep things organized:
Naming your Branch¶
Your branch name should follow the format
typeis one of the types above
scopeis optional, and represents the module your branch is working on.
issue_idis the GitHub issue number. Having the correct issue number will automatically link the Pull Request on this branch to that issue.
fix-executor-loader-113 chore-update-version docs-add-cloud-section-33
||Not descriptive enough, all caps, doesn't follow spec|
||Should be lower case, not descriptive|
||No type, not descriptive|
Writing your Commit Message¶
A good commit message helps us track Jina’s development. A Pull Request with a bad commit message will be rejected automatically in the CI pipeline.
Commit messages should stick to our naming conventions outlined above, and use the format
typeis one of the types above.
scopeis optional, and represents the module your commit is working on.
subjectexplains the commit, without an ending period
For example, a commit that fixes a bug in the executor module should be phrased as:
fix(executor): fix the bad naming in init function
fix(indexer): fix wrong sharding number in indexer feat: add remote api
||All letters should be in lowercase|
||Missing space after
Naming your Pull Request¶
We don’t enforce naming of PRs and branches, but we recommend you follow the same style. It can simply be one of your commit messages, just copy/paste it, e.g.
fix(readme): improve the readability and move sections.
Testing Jina Locally and on CI¶
Locally you can do unittest via:
pip install ".[match-py-ver]" python -m unittest -v
When you add an executor or a driver, you may introduce new dependencies to Jina. You can verify the dependencies via:
, and via Docker container:
docker run jinaai/jina:my-local-version check
It prints a list of components the current version of Jina supports, and then exits. Make sure yours are not in red.
Once you submit the PR, your code will be tested in the environment of Python 3.7 and 3.8 with full exta dependencies (
pip install .[all]) installed.
Building Documentation Locally¶
To build documentation locally, you need Docker installed. Clone this repository and run the following command:
bash ./make-doc.sh serve 8080
The documentation is then available in your browser at
We’re always happy to lend a hand, answer questions, or listen to feedback. You find us here:
We’re also looking at starting online developer hangouts, so you can catch up with us over chat and video, and get to meet your fellow Jina contributors.
And you can find me, Jina’s Open Source Evangelist on Twitter. Feel free to @ me if there’s anything you want to know!
Once again, thanks so much for your interest in contributing to Jina. We’re excited to have you on board!