Skip to content

Commit d8684be

Browse files
authored
Recommend uv in contributing guide
1 parent 570ca78 commit d8684be

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

CONTRIBUTING.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,28 @@ git clone git@github.com:YOUR-USERNAME/narwhals.git
4747

4848
### 4. Setting up your environment
4949

50-
Here's how you can set up your local development environment to contribute:
51-
52-
1. Make sure you have Python3.8+ installed (for example, Python 3.11)
53-
2. Create a new virtual environment with `python3.11 -m venv .venv` (or whichever version of Python3.9+ you prefer)
54-
3. Activate it: `. .venv/bin/activate`
55-
4. Install Narwhals: `pip install -e .`
56-
5. Install test requirements: `pip install -r requirements-dev.txt`
57-
6. Install docs requirements: `pip install -r docs/requirements-docs.txt`
50+
Here's how you can set up your local development environment to contribute.
51+
52+
1. Make sure you have Python3.8+ installed (for example, Python 3.11), create a virtual environment,
53+
and activate it. If you're new to this, here's one way that we recommend:
54+
1. Install uv: https://github.com/astral-sh/uv?tab=readme-ov-file#getting-started
55+
2. Install some version of Python greater than Python3.8. For example, to install
56+
Python3.11:
57+
```
58+
uv python install 3.11
59+
```
60+
3. Create a virtual environment:
61+
```
62+
uv venv -p 3.11 --seed
63+
```
64+
4. Activate it. On Linux, this is `. .venv/bin/activate`, on Windows `.\.venv\Scripts\activate`.
65+
5. Install Narwhals: `uv pip install -e .`
66+
6. Install test requirements: `uv pip install -r requirements-dev.txt`
67+
7. Install docs requirements: `uv pip install -r docs/requirements-docs.txt`
5868
5969
You should also install pre-commit:
6070
```
61-
pip install pre-commit
71+
uv pip install pre-commit
6272
pre-commit install
6373
```
6474
This will automatically format and lint your code before each commit, and it will block the commit if any issues are found.

0 commit comments

Comments
 (0)