Skip to content

Commit e6d6acd

Browse files
committed
recommend uv
1 parent 867b0dc commit e6d6acd

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

.github/CONTRIBUTING.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -111,40 +111,34 @@ ______________________________________________________________________
111111

112112
### Development environment
113113

114-
To set up a local development environment, begin by cloning the repository:
114+
To set up a local development environment, we recommend using `uv`, which can be installed following their [instructions](https://docs.astral.sh/uv/getting-started/installation/).
115+
116+
Once `uv` has been installed, begin by cloning the repository:
115117

116118
```bash
117119
git clone https://github.com/Lightning-AI/lightning.git
118120
cd lightning
119121
```
120122

121-
Once in root level of the repository, install the dependencies using a package manager of your choice:
123+
Once in root level of the repository, create a new virtual environment and install the project dependencies.
122124

123125
```bash
124-
# pip
125-
python -m venv .venv
126-
source .venv/bin/activate
127-
pip install ".[dev, examples]"
128-
129-
# uv
130126
uv venv
131-
source .venv/bin/activate
127+
# uv venv --python 3.11 # use this instead if you need a specific python version
128+
129+
source .venv/bin/activate # command may differ based on your shell
132130
uv pip install ".[dev, examples]"
133131
```
134132

135133
Once the dependencies have been installed, install pre-commit and set up the git hook scripts:
136134

137135
```bash
138-
# pip
139-
pip install pre-commit
140-
141-
# uv
142136
uv pip install pre-commit
143-
144-
# Install git hook scripts
145137
pre-commit install
146138
```
147139

140+
If you would like more information regarding the uv commands, please refer to uv's documentation for more information on their [pip interface](https://docs.astral.sh/uv/pip/).
141+
148142
### Developments scripts
149143

150144
To build the documentation locally, simply execute the following commands from project root (only for Unix):

0 commit comments

Comments
 (0)