2021-12-17 00:25:09 +08:00
|
|
|
# Contributing to Gradio
|
2021-12-28 02:41:42 +08:00
|
|
|
You can start by forking or cloning the repo (https://github.com/gradio-app/gradio.git) and creating your own branch to work from.
|
|
|
|
|
|
|
|
Next, to install the local development version of Gradio:
|
|
|
|
* Navigate to the `/gradio` subfolder and run `pip install -e .`.
|
|
|
|
|
|
|
|
When installing locally, you may also need to build the front end:
|
|
|
|
* Navigate to the `/frontend` subfolder and run `npm install`.
|
|
|
|
* Then run `npm run build`.
|
2021-12-29 12:54:57 +08:00
|
|
|
* Then you can run `npm run start` to start a local development server (on port 3000) that responds to any changes in the frontend
|
2021-12-17 00:25:09 +08:00
|
|
|
|
|
|
|
### Structure of the Repository
|
|
|
|
|
|
|
|
It's helpful to know the overall structure of the repository so that you can focus on the part of the source code you'd like to contribute to
|
|
|
|
|
|
|
|
* `/gradio`: contains the source code for the actual Python library
|
2021-12-17 00:29:05 +08:00
|
|
|
* `/gradio/interface.py`: contains the source code for the core `Interface` class
|
2021-12-17 00:25:09 +08:00
|
|
|
* `/test`: contains unit tests for the Python library
|
|
|
|
|
|
|
|
* `/website`: contains the code for the Gradio website (www.gradio.app). See the README in the `/website` folder for more details
|
|
|
|
|
2020-06-19 00:59:45 +08:00
|
|
|
|
|
|
|
### Continuous Integration and Testing
|
2021-12-28 02:41:42 +08:00
|
|
|
All PRs must pass the continuous integration tests before merging. To test locally, you can run `python -m unittest` from the `/gradio` subfolder.
|
2020-06-19 00:59:45 +08:00
|
|
|
|
|
|
|
### Submitting PRs
|
|
|
|
|
|
|
|
All PRs should be against `master`. Direct commits to master are blocked, and PRs require an approving review
|
2021-12-08 09:20:50 +08:00
|
|
|
to merge into master. By convention, the Gradio maintainers will review PRs when:
|
|
|
|
* An initial review has been requested, and
|
2021-12-17 00:25:09 +08:00
|
|
|
* A maintainer (@abidlabs, @aliabid94, @aliabd, @AK391, or @dawoodkhan82) is tagged in the PR comments and asked to complete a review
|
2020-06-19 00:59:45 +08:00
|
|
|
|
|
|
|
We ask that you make sure initial CI checks are passing before requesting a review.
|
2021-12-08 09:20:50 +08:00
|
|
|
One of the Gradio maintainers will merge the PR when all the checks are passing.
|
2021-12-28 10:22:58 +08:00
|
|
|
|
2021-12-28 10:23:15 +08:00
|
|
|
*Could these guidelines be clearer? Feel free to open a PR to help us faciltiate open-source contributions!*
|