diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8b74783e16..6dbb948158 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,11 +2,10 @@ Prequisites: -* Python 3.7+ -* Node 16.0+ (optional for backend-only changes, but needed for any frontend changes) -* pnpm version 6.x +* [Python 3.7+](https://www.python.org/downloads/) +* [pnpm version 7.x](https://pnpm.io/7.x/installation) (optional for backend-only changes, but needed for any frontend changes) -More than 30 awesome developers have contributed to the `gradio` library, and we'd be thrilled if you would like be the next `gradio` contributor! You can start by forking or cloning the repo (https://github.com/gradio-app/gradio.git) and creating your own branch to work from. +More than 80 awesome developers have contributed to the `gradio` library, and we'd be thrilled if you would like be the next `gradio` contributor! Start by cloning this repo and installing Gradio locally: ### Install Gradio locally from the `main` branch @@ -24,38 +23,39 @@ bash scripts/build_frontend.sh ``` -### Install development and testing requirements +### Install testing requirements -* Navigate to the repo folder and install test requirements (note that it is highly recommended to use a virtual environment since the versions are pinned) +In order to be able to run the Python unit tests, do the following: + +* Navigate to the repo folder and install test requirements (note that it is highly recommended to use a virtual environment running **Python 3.9** since the versions are pinned) ``` bash scripts/install_test_requirements.sh ``` -* It is recommended to use **Python 3.9** for development. If you have a different Python version and conflicting packages during the installation, you can run +* If you have a different Python version and conflicting packages during the installation, please first run: ``` bash scripts/create_test_requirements.sh ``` -``` -bash scripts/install_test_requirements.sh -``` + +### Extra tidbits * You can run gradio scripts in reload mode which will watch for changes in the `gradio` folder and reload the app if changes are made. ``` gradio app.py ``` -* Run the tests - -``` -bash scripts/run_all_tests.sh -``` - * You can also start a local frontend development server (on port 3000 by default) that responds to any changes in the frontend. ``` bash scripts/run_frontend.sh ``` +* To run all of the tests, do: + +``` +bash scripts/run_all_tests.sh +``` + ### Structure of the Repository @@ -79,7 +79,7 @@ All PRs must pass the continuous integration tests before merging. To test local All PRs should be against `main`. Direct commits to main are blocked, and PRs require an approving review to merge into main. By convention, the Gradio maintainers will review PRs when: * An initial review has been requested, and -* A maintainer (@abidlabs, @aliabid94, @aliabd, @AK391, @dawoodkhan82, @pngwn, @farukozderim) is tagged in the PR comments and asked to complete a review +* A maintainer (@abidlabs, @aliabid94, @aliabd, @AK391, @dawoodkhan82, @pngwn, @freddyaboulton) is tagged in the PR comments and asked to complete a review We ask that you make sure initial CI checks are passing before requesting a review. One of the Gradio maintainers will merge the PR when all the checks are passing. diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 69ea0909ff..6136141e37 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -48,7 +48,7 @@ function npm_required() { # None ####################################### function pnpm_required() { - program_required "pnpm" "https://pnpm.io/6.x/installation" + program_required "pnpm" "https://pnpm.io/7.x/installation" } #######################################