-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Updated contributing docs (#653)
* reorganized + revised landing * more docs * added pic * updated contributing * diff * move asset links * hard links
- Loading branch information
Showing
7 changed files
with
172 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,25 @@ | ||
--- | ||
title: Contributing to the codebase | ||
excerpt: How to contribute to the MemGPT repo | ||
category: 6580dabb585483000f0e6c7c | ||
title: How to contribute | ||
excerpt: Learn how to contribute to the MemGPT project! | ||
category: 6581eaa89a00e6001012822c | ||
--- | ||
|
||
## Installing from source | ||
![memgpt llama](https://raw.githubusercontent.com/cpacker/MemGPT/main/docs/assets/llama_library.webp) | ||
|
||
To install MemGPT from source, start by cloning the repo: | ||
```sh | ||
git clone git@github.com:cpacker/MemGPT.git | ||
``` | ||
MemGPT is an active [open source](https://en.wikipedia.org/wiki/Open_source) project and we welcome community contributions! There are many ways to contribute for both programmers and non-programmers alike. | ||
|
||
### Installing dependencies with poetry (recommended) | ||
> 📘 Discord contributor role | ||
> | ||
> Contributing to the codebase gets you a **contributor role** on [Discord](https://discord.gg/9GEQrxmVyE). If you're a contributor and we forgot to assign you the role, message the MemGPT team [on Discord](https://discord.gg/9GEQrxmVyE)! | ||
First, install Poetry using [the official instructions here](https://python-poetry.org/docs/#installation). | ||
## 👋 Community issues (requested contributions) | ||
|
||
Once Poetry is installed, navigate to the MemGPT directory and install the MemGPT project with Poetry: | ||
```shell | ||
cd MemGPT | ||
poetry shell | ||
poetry install -E dev -E postgres -E local | ||
``` | ||
If you're looking for a place to get started, you can see a list of potential contributions that the MemGPT team has marked as "help wanted" [on this GitHub page](https://github.com/cpacker/MemGPT/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). | ||
|
||
Now when you want to use `memgpt`, make sure you first activate the `poetry` environment using poetry shell: | ||
```shell | ||
$ poetry shell | ||
(pymemgpt-py3.10) $ memgpt run | ||
``` | ||
## 📖 Editing the MemGPT docs | ||
|
||
Alternatively, you can use `poetry run` (which will activate the `poetry` environment for the `memgpt run` command only): | ||
```shell | ||
poetry run memgpt run | ||
``` | ||
We're always looking to improve our docs (like the page you're reading right now!). Proposing edits to the docs is easy and can even be done without ever having to set up the source code - [check our guide for instructions](contributing_docs). | ||
|
||
### Installing dependencies with pip | ||
## 🦙 Editing the MemGPT source code | ||
|
||
First you should set up a dedicated virtual environment. This is optional, but is highly recommended: | ||
```shell | ||
cd MemGPT | ||
python3 -m venv venv | ||
. venv/bin/activate | ||
``` | ||
|
||
Once you've activated your virtual environment and are in the MemGPT project directory, you can install the dependencies with `pip`: | ||
```shell | ||
pip install -e '.[dev,postgres,local]' | ||
``` | ||
|
||
Now, you should be able to run `memgpt` from the command-line using the downloaded source code (if you used a virtual environment, you have to activate the virtual environment to access `memgpt`): | ||
```shell | ||
$ . venv/bin/activate | ||
(venv) $ memgpt run | ||
``` | ||
|
||
If you are having dependency issues using `pip`, we recommend you install the package using Poetry. Installing MemGPT from source using Poetry will ensure that you are using exact package versions that have been tested for the production build. | ||
|
||
## Contributing to the MemGPT project | ||
|
||
We welcome pull requests! Please see [our contributing guide](https://github.com/cpacker/MemGPT/blob/main/CONTRIBUTING.md) for instructions on how to contribute to the project. | ||
If you're interested in editing the MemGPT source code, [check our guide on building and contributing from source](contributing_code). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: Contributing to the codebase | ||
excerpt: How to modify code and create pull requests | ||
category: 6581eaa89a00e6001012822c | ||
--- | ||
|
||
If you plan on making big changes to the codebase, the easiest way to make contributions is to install MemGPT directly from the source code (instead of via `pypi`, which you do with `pip install ...`). | ||
|
||
Once you have a working copy of the source code, you should be able to modify the MemGPT codebase an immediately see any changes you make to the codebase change the way the `memgpt` command works! Then once you make a change you're happy with, you can open a pull request to get your changes merged into the official MemGPT package. | ||
|
||
> 📘 Instructions on installing from a fork and opening pull requests | ||
> | ||
> If you plan on contributing your changes, you should create a fork of the MemGPT repo and install the source code from your fork. | ||
> | ||
> Please see [our contributing guide](https://github.com/cpacker/MemGPT/blob/main/CONTRIBUTING.md) for instructions on how to install from a fork and open a PR. | ||
## Installing MemGPT from source | ||
|
||
**Reminder**: if you plan on opening a pull request to contribute your changes, follow our [contributing guide's install instructions](https://github.com/cpacker/MemGPT/blob/main/CONTRIBUTING.md) instead! | ||
|
||
To install MemGPT from source, start by cloning the repo: | ||
```sh | ||
git clone git@github.com:cpacker/MemGPT.git | ||
``` | ||
|
||
### 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 MemGPT directory and install the MemGPT project with Poetry: | ||
```shell | ||
cd MemGPT | ||
poetry shell | ||
poetry install -E dev -E postgres -E local | ||
``` | ||
|
||
Now when you want to use `memgpt`, make sure you first activate the `poetry` environment using poetry shell: | ||
```shell | ||
$ poetry shell | ||
(pymemgpt-py3.10) $ memgpt run | ||
``` | ||
|
||
Alternatively, you can use `poetry run` (which will activate the `poetry` environment for the `memgpt run` command only): | ||
```shell | ||
poetry run memgpt run | ||
``` | ||
|
||
### Installing dependencies with pip | ||
|
||
First you should set up a dedicated virtual environment. This is optional, but is highly recommended: | ||
```shell | ||
cd MemGPT | ||
python3 -m venv venv | ||
. venv/bin/activate | ||
``` | ||
|
||
Once you've activated your virtual environment and are in the MemGPT project directory, you can install the dependencies with `pip`: | ||
```shell | ||
pip install -e '.[dev,postgres,local]' | ||
``` | ||
|
||
Now, you should be able to run `memgpt` from the command-line using the downloaded source code (if you used a virtual environment, you have to activate the virtual environment to access `memgpt`): | ||
```shell | ||
$ . venv/bin/activate | ||
(venv) $ memgpt run | ||
``` | ||
|
||
If you are having dependency issues using `pip`, we recommend you install the package using Poetry. Installing MemGPT from source using Poetry will ensure that you are using exact package versions that have been tested for the production build. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: Contributing to the documentation | ||
excerpt: How to add to the MemGPT documentation | ||
category: 6581eaa89a00e6001012822c | ||
--- | ||
|
||
There are two ways to propose edits to the MemGPT documentation: editing the documentation files directly in the GitHub file editor (on the GitHub website), or cloning the source code and editing the documentation files (in your text/markdown editor of chocie). | ||
|
||
# Editing directly via GitHub | ||
|
||
> 📘 Requires a GitHub account | ||
> | ||
> Before beginning, make sure you have an account on [github.com](https://github.com) and are logged in. | ||
The easiest way to edit the docs is directly via the GitHub website: | ||
|
||
1. Open the documentation section of the MemGPT source code on GitHub: https://github.com/cpacker/MemGPT/tree/main/docs | ||
2. Find the file you want to edit using the name on the docs page - for example, if you wanted to edit `https://memgpt.readme.io/docs/contributing_docs`, you would look for the `contributing_docs.md` on [GitHub](https://github.com/cpacker/MemGPT/tree/main/docs) | ||
3. Click on the file, then click the edit icon on the top right (the edit icon is a pencil and will say "Edit this file" when you hover over it) | ||
4. If you haven't made a fork of the repository yet, you'll see a notice "You need to fork this repository to propose changes" - click "Fork this repository" and you should immediately be put in a file editor view that says "You’re making changes in a project you don’t have write access to" | ||
5. Make your edits to the file, then click "Commit changes", then click "Propose changes" | ||
6. Confirm that your edits look good, then click "Create pull request" to go to the PR creation screen | ||
7. Add the necessary details describing the changes you've made, then click "Create pull request" | ||
8. ✅ That's it! A MemGPT team member will then review your PR and if it looks good merge it into the main branch, at which point you'll see the changes updated on the docs page! | ||
|
||
# Editing via the source code | ||
|
||
Editing documentation via the source code follows the same process as general source code editing - forking the repository, cloning your fork, editing a branch of your fork, and opening a PR from your fork to the main repo. See our [source code editing guide](contributing_code) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters