From 0cdb5e969f14bdf5914f96bf151915a935896e6c Mon Sep 17 00:00:00 2001 From: Avasam Date: Sat, 8 Mar 2025 04:59:07 -0500 Subject: [PATCH] Mention uv for the initial install in CONTRIBUTING.md (#13595) --- CONTRIBUTING.md | 76 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e4f95ca4e..4cf190229 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,37 +50,67 @@ please refer to this Note that some tests require extra setup steps to install the required dependencies. -### Linux/Mac OS/WSL + + + + + + + + + + + + + + + +
Linux / macOS / WSL -On Linux and Mac OS, you will be able to run the full test suite on Python -3.9-3.12. -To install the necessary requirements, run the following commands from a -terminal window: + On Linux and macOS, you will be able to run the full test suite on Python + 3.9-3.12. + To install the necessary requirements, run the following commands from a + terminal window: -```bash -$ python3 -m venv .venv -$ source .venv/bin/activate -(.venv)$ pip install -U pip -(.venv)$ pip install -r requirements-tests.txt -``` + ```bash + $ python3 -m venv .venv + $ source .venv/bin/activate + (.venv)$ pip install -U pip + (.venv)$ pip install -r requirements-tests.txt + ``` -### Windows +
Windows -Run the following commands from a Windows terminal to install all requirements: + Run the following commands from a Windows terminal to install all requirements: -```powershell -> python -m venv .venv -> .venv\Scripts\activate -(.venv) > pip install -U pip -(.venv) > pip install -r "requirements-tests.txt" -``` + ```powershell + > python -m venv .venv + > .venv\Scripts\activate + (.venv) > pip install -U pip + (.venv) > pip install -r requirements-tests.txt + ``` -To be able to run pytype tests, you'll also need to install it manually + To be able to run pytype tests, you'll also need to install it manually as it's currently excluded from the requirements file: -```powershell -(.venv) > pip install -U pytype -``` + ```powershell + (.venv) > pip install -U pytype + ``` + +
Using uv + + If you already have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed, you can simply replace the commands above with: + + ```shell + uv venv + uv pip install -r requirements-tests.txt + ``` + + ```shell + uv pip install -U pytype + ``` + +
## Code formatting