Skip to content

Commit

Permalink
docs: update contributing (#2000)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahwooders authored Nov 7, 2024
1 parent a18b5c4 commit fcf122f
Showing 1 changed file with 5 additions and 29 deletions.
34 changes: 5 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,62 +16,38 @@ First things first, let's get you a personal copy of Letta to play with. Think o
Now, let's bring your new playground to your local machine.

```shell
git clone https://github.com/your-username/MemGPT.git
git clone https://github.com/your-username/letta.git
```

### 🧩 Install Dependencies

**Installing dependencies with poetry** (recommended):

First, install Poetry using [the official instructions here](https://python-poetry.org/docs/#installation).

Once Poetry is installed, navigate to the Letta directory and install the Letta project with Poetry:
```shell
cd Letta
poetry shell
poetry install -E dev -E postgres -E local
poetry install --all-extras
```

Now when you want to use `letta`, make sure you first activate the `poetry` environment using poetry shell:
```shell
$ poetry shell
(pyletta-py3.10) $ letta run
(pyletta-py3.12) $ letta run
```

Alternatively, you can use `poetry run` (which will activate the `poetry` environment for the `letta run` command only):
```shell
poetry run letta run
```

**Installing dependencies with pip**:

First you should set up a dedicated virtual environment. This is optional, but is highly recommended:
```shell
cd Letta
python3 -m venv venv
. venv/bin/activate
```

Once you've activated your virtual environment and are in the Letta project directory, you can install the dependencies with `pip`:
```shell
pip install -e '.[dev,postgres,local]'
```

Now, you should be able to run `letta` from the command-line using the downloaded source code (if you used a virtual environment, you have to activate the virtual environment to access `letta`):
```shell
$ . venv/bin/activate
(venv) $ letta run
```

If you are having dependency issues using `pip`, we recommend you install the package using Poetry. Installing Letta from source using Poetry will ensure that you are using exact package versions that have been tested for the production build.


#### (Optional) Installing pre-commit
#### Installing pre-commit
We recommend installing pre-commit to ensure proper formatting during development:
```
poetry run pre-commit install
poetry run pre-commit run --all-files
```
If you don't install pre-commit, you will need to run `poetry run black .` before submitting a PR.

## 2. 🛠️ Making Changes

Expand Down

0 comments on commit fcf122f

Please sign in to comment.