Skip to content

Commit b5e6ba8

Browse files
mamoodiMahmoud Work
andauthored
docs: Update Development and CONTRIBUTING docs (OpenHands#2453)
* docs: Update Development and CONTRIBUTING docs * Explain the PR process in simpler terms * Fix formatting --------- Co-authored-by: Mahmoud Work <[email protected]>
1 parent 2d82494 commit b5e6ba8

2 files changed

Lines changed: 58 additions & 58 deletions

File tree

CONTRIBUTING.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
11
# Contributing
2-
3-
Thanks for your interest in contributing to OpenDevin! We welcome and appreciate contributions.
4-
To report bugs, create a [GitHub issue](https://github.com/OpenDevin/OpenDevin/issues/new/choose).
2+
Thanks for your interest in contributing to OpenDevin! We welcome and appreciate contributions.
3+
If you are only looking to setup a development workflow, check out [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md).
54

65
## Contribution Guide
76
### 1. Fork the Official Repository
8-
9-
Fork [OpenDevin repository](https://github.com/OpenDevin/OpenDevin) into your own account.
10-
Clone your own forked repository into your local environment.
7+
Fork the [OpenDevin repository](https://github.com/OpenDevin/OpenDevin) into your own account.
8+
Clone your own forked repository into your local environment:
119

1210
```shell
1311
git clone [email protected]:<YOUR-USERNAME>/OpenDevin.git
1412
```
1513

1614
### 2. Configure Git
17-
1815
Set the official repository as your [upstream](https://www.atlassian.com/git/tutorials/git-forks-and-upstreams) to synchronize with the latest update in the official repository.
19-
Add the original repository as upstream
16+
Add the original repository as upstream:
2017

2118
```shell
2219
cd OpenDevin
2320
git remote add upstream [email protected]:OpenDevin/OpenDevin.git
2421
```
2522

26-
Verify that the remote is set.
23+
Verify that the remote is set:
24+
2725
```shell
2826
git remote -v
2927
```
28+
3029
You should see both `origin` and `upstream` in the output.
3130

3231
### 3. Synchronize with Official Repository
33-
Synchronize latest commit with official repository before coding.
32+
Synchronize latest commit with official repository before coding:
3433

3534
```shell
3635
git fetch upstream
@@ -40,24 +39,32 @@ git push origin main
4039
```
4140

4241
### 4. Create a New Branch And Open a Pull Request
43-
After you finish implementation, open forked repository. The source branch is your new branch, and the target branch is `OpenDevin/OpenDevin` `main` branch. Then PR should appears in [OpenDevin PRs](https://github.com/OpenDevin/OpenDevin/pulls).
44-
45-
Then OpenDevin team will review your code.
42+
1. Create a new branch with your changes
43+
2. On Github, go to the page of your forked repository
44+
3. Create a Pull Request
45+
- Click on `Branches`
46+
- Click on the `...` beside your branch and click on `New pull request`
47+
- Set `base repository` to `OpenDevin/OpenDevin`
48+
- Set `base` to `main`
49+
- Click `Create pull request`
50+
51+
The PR should appear in [OpenDevin PRs](https://github.com/OpenDevin/OpenDevin/pulls).
52+
53+
Then the OpenDevin team will review your code.
4654

4755
## PR Rules
48-
4956
### 1. Pull Request title
50-
51-
As described in [here](https://github.com/commitizen/conventional-commit-types/blob/master/index.json), a valid PR title should begin with one of the following prefixes:
57+
As described [here](https://github.com/commitizen/conventional-commit-types/blob/master/index.json), a valid PR title should begin with one of the following prefixes:
5258

5359
- `feat`: A new feature
5460
- `fix`: A bug fix
55-
- `doc`: Documentation only changes
61+
- `docs`: Documentation only changes
62+
- `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
5663
- `refactor`: A code change that neither fixes a bug nor adds a feature
57-
- `style`: A refactoring that improves code style
5864
- `perf`: A code change that improves performance
5965
- `test`: Adding missing tests or correcting existing tests
60-
- `ci`: Changes to CI configuration files and scripts (example scopes: `.github`, `ci` (Buildkite))
66+
- `build`: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
67+
- `ci`: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
6168
- `chore`: Other changes that don't modify src or test files
6269
- `revert`: Reverts a previous commit
6370

@@ -67,24 +74,21 @@ For example, a PR title could be:
6774

6875
You may also check out previous PRs in the [PR list](https://github.com/OpenDevin/OpenDevin/pulls).
6976

70-
As described in [here](https://github.com/OpenDevin/OpenDevin/labels), we create several labels. Every PR should be tagged with the corresponding labels.
77+
As described [here](https://github.com/OpenDevin/OpenDevin/labels), we have created several labels. Every PR should be tagged with the corresponding labels.
7178

7279
### 2. Pull Request description
73-
7480
- If your PR is small (such as a typo fix), you can go brief.
75-
- If it is large and you have changed a lot, it's better to write more details.
76-
81+
- If it contains a lot of changes, it's better to write more details.
7782

78-
## How to begin
83+
## How to Begin
7984
Please refer to the README in each module:
8085
- [frontend](./frontend/README.md)
8186
- [agenthub](./agenthub/README.md)
8287
- [evaluation](./evaluation/README.md)
8388
- [opendevin](./opendevin/README.md)
8489
- [server](./opendevin/server/README.md)
85-
- [mock server](./opendevin/mock/README.md)
8690

8791
## Tests
88-
Please navigate to `tests` folder to see existing test suites.
92+
Please navigate to the `tests` folder to see existing test suites.
8993
At the moment, we have two kinds of tests: `unit` and `integration`. Please refer to the README for each test suite. These tests also run on CI to ensure quality of
9094
the project.

Development.md

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Development Guide
22
This guide is for people working on OpenDevin and editing the source code.
3+
If you wish to contribute your changes, check out the [CONTRIBUTING.md](https://github.com/OpenDevin/OpenDevin/blob/main/CONTRIBUTING.md) on how to clone and setup the project initially before moving on.
4+
Otherwise, you can clone the OpenDevin project directly.
35

46
## Start the server for development
5-
67
### 1. Requirements
78
* Linux, Mac OS, or [WSL on Windows](https://learn.microsoft.com/en-us/windows/wsl/install)
89
* [Docker](https://docs.docker.com/engine/install/) (For those on MacOS, make sure to allow the default Docker socket to be used from advanced settings!)
@@ -27,42 +28,41 @@ mamba install conda-forge::poetry
2728
```
2829

2930
### 2. Build and Setup The Environment
31+
Begin by building the project which includes setting up the environment and installing dependencies. This step ensures that OpenDevin is ready to run on your system:
3032

31-
- **Build the Project:** Begin by building the project, which includes setting up the environment and installing dependencies. This step ensures that OpenDevin is ready to run smoothly on your system.
32-
```bash
33-
make build
34-
```
33+
```bash
34+
make build
35+
```
3536

3637
### 3. Configuring the Language Model
37-
3838
OpenDevin supports a diverse array of Language Models (LMs) through the powerful [litellm](https://docs.litellm.ai) library. By default, we've chosen the mighty GPT-4 from OpenAI as our go-to model, but the world is your oyster! You can unleash the potential of Anthropic's suave Claude, the enigmatic Llama, or any other LM that piques your interest.
3939

40-
To configure the LM of your choice, follow these steps:
41-
42-
1. **Using the Makefile: The Effortless Approach**
43-
With a single command, you can have a smooth LM setup for your OpenDevin experience. Simply run:
40+
To configure the LM of your choice, run:
41+
4442
```bash
4543
make setup-config
4644
```
45+
4746
This command will prompt you to enter the LLM API key, model name, and other variables ensuring that OpenDevin is tailored to your specific needs. Note that the model name will apply only when you run headless. If you use the UI, please set the model in the UI.
48-
Set `persist_sandbox` to false if you want to use clean sandbox for each task. If `persist_sandbox` is set to true, you will need to set the `ssh_password` as well.
47+
Set `persist_sandbox` to false if you want to use a clean sandbox for each task. If `persist_sandbox` is set to true, you will need to set the `ssh_password` as well.
48+
49+
Note: If you have previously run OpenDevin using the docker command, you may have already set some environmental variables in your terminal. The final configurations are set from highest to lowest priority:
50+
Environment variables > config.toml variables > default variables
4951

5052
**Note on Alternative Models:**
51-
Some alternative models may prove more challenging to tame than others. Fear not, brave adventurer! We shall soon unveil LLM-specific documentation to guide you on your quest. And if you've already mastered the art of wielding a model other than OpenAI's GPT, we encourage you to [share your setup instructions with us](https://github.com/OpenDevin/OpenDevin/issues/417).
53+
Some alternative models may prove more challenging to tame than others. Fear not, brave adventurer! We shall soon unveil LLM-specific documentation to guide you on your quest.
54+
And if you've already mastered the art of wielding a model other than OpenAI's GPT, we encourage you to share your setup instructions with us by creating instructions and adding it [to our documentation](https://github.com/OpenDevin/OpenDevin/tree/main/docs/modules/usage/llms).
5255

5356
For a full list of the LM providers and models available, please consult the [litellm documentation](https://docs.litellm.ai/docs/providers).
5457

55-
There is also [documentation for running with local models using ollama](./docs/documentation/LOCAL_LLM_GUIDE.md).
56-
57-
### 4. Run the Application
58-
59-
- **Run the Application:** Once the setup is complete, launching OpenDevin is as simple as running a single command. This command starts both the backend and frontend servers seamlessly, allowing you to interact with OpenDevin without any hassle.
60-
```bash
61-
make run
62-
```
63-
64-
### 5. Individual Server Startup
58+
### 4. Running the application
59+
#### Option A: Run the Full Application
60+
Once the setup is complete, launching OpenDevin is as simple as running a single command. This command starts both the backend and frontend servers seamlessly, allowing you to interact with OpenDevin:
61+
```bash
62+
make run
63+
```
6564

65+
#### Option B: Individual Server Startup
6666
- **Start the Backend Server:** If you prefer, you can start the backend server independently to focus on backend-related tasks or configurations.
6767
```bash
6868
make start-backend
@@ -74,29 +74,25 @@ There is also [documentation for running with local models using ollama](./docs/
7474
```
7575

7676
### 6. LLM Debugging
77-
78-
If you encounter any issues with the Language Model (LM) or you're simply curious, you can inspect the actual LLM prompts and responses. To do so, export DEBUG=1 in the environment and restart the backend. OpenDevin will then log the prompts and responses in the logs/llm/CURRENT_DATE directory, allowing you to identify the causes.
77+
If you encounter any issues with the Language Model (LM) or you're simply curious, you can inspect the actual LLM prompts and responses. To do so, export DEBUG=1 in the environment and restart the backend.
78+
OpenDevin will then log the prompts and responses in the logs/llm/CURRENT_DATE directory, allowing you to identify the causes.
7979
8080
### 7. Help
81-
82-
- **Get Some Help:** Need assistance or information on available targets and commands? The help command provides all the necessary guidance to ensure a smooth experience with OpenDevin.
83-
```bash
84-
make help
85-
```
81+
Need assistance or information on available targets and commands? The help command provides all the necessary guidance to ensure a smooth experience with OpenDevin.
82+
```bash
83+
make help
84+
```
8685
8786
### 8. Testing
88-
8987
#### Unit tests
9088
9189
```bash
9290
poetry run pytest ./tests/unit/test_sandbox.py
9391
```
9492
9593
#### Integration tests
96-
9794
Please refer to [this README](./tests/integration/README.md) for details.
9895
9996
### 9. Add or update dependency
100-
10197
1. Add your dependency in `pyproject.toml` or use `poetry add xxx`
10298
2. Update the poetry.lock file via `poetry lock --no-update`

0 commit comments

Comments
 (0)