You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
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.
You should see both `origin` and `upstream` in the output.
31
30
32
31
### 3. Synchronize with Official Repository
33
-
Synchronize latest commit with official repository before coding.
32
+
Synchronize latest commit with official repository before coding:
34
33
35
34
```shell
36
35
git fetch upstream
@@ -40,24 +39,32 @@ git push origin main
40
39
```
41
40
42
41
### 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.
46
54
47
55
## PR Rules
48
-
49
56
### 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:
52
58
53
59
-`feat`: A new feature
54
60
-`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)
56
63
-`refactor`: A code change that neither fixes a bug nor adds a feature
57
-
-`style`: A refactoring that improves code style
58
64
-`perf`: A code change that improves performance
59
65
-`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)
61
68
-`chore`: Other changes that don't modify src or test files
62
69
-`revert`: Reverts a previous commit
63
70
@@ -67,24 +74,21 @@ For example, a PR title could be:
67
74
68
75
You may also check out previous PRs in the [PR list](https://github.com/OpenDevin/OpenDevin/pulls).
69
76
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.
71
78
72
79
### 2. Pull Request description
73
-
74
80
- 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.
77
82
78
-
## How to begin
83
+
## How to Begin
79
84
Please refer to the README in each module:
80
85
-[frontend](./frontend/README.md)
81
86
-[agenthub](./agenthub/README.md)
82
87
-[evaluation](./evaluation/README.md)
83
88
-[opendevin](./opendevin/README.md)
84
89
-[server](./opendevin/server/README.md)
85
-
-[mock server](./opendevin/mock/README.md)
86
90
87
91
## Tests
88
-
Please navigate to `tests` folder to see existing test suites.
92
+
Please navigate to the `tests` folder to see existing test suites.
89
93
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
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.
3
5
4
6
## Start the server for development
5
-
6
7
### 1. Requirements
7
8
* Linux, Mac OS, or [WSL on Windows](https://learn.microsoft.com/en-us/windows/wsl/install)
8
9
*[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!)
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:
30
32
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
+
```
35
36
36
37
### 3. Configuring the Language Model
37
-
38
38
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.
39
39
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
+
44
42
```bash
45
43
make setup-config
46
44
```
45
+
47
46
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 falseif 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:
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).
52
55
53
56
For a full list of the LM providers and models available, please consult the [litellm documentation](https://docs.litellm.ai/docs/providers).
54
57
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
+
```
65
64
65
+
#### Option B: Individual Server Startup
66
66
-**Start the Backend Server:** If you prefer, you can start the backend server independently to focus on backend-related tasks or configurations.
67
67
```bash
68
68
make start-backend
@@ -74,29 +74,25 @@ There is also [documentation for running with local models using ollama](./docs/
74
74
```
75
75
76
76
### 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.
79
79
80
80
### 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
+
```
86
85
87
86
### 8. Testing
88
-
89
87
#### Unit tests
90
88
91
89
```bash
92
90
poetry run pytest ./tests/unit/test_sandbox.py
93
91
```
94
92
95
93
#### Integration tests
96
-
97
94
Please refer to [this README](./tests/integration/README.md) for details.
98
95
99
96
### 9. Add or update dependency
100
-
101
97
1. Add your dependency in `pyproject.toml` or use `poetry add xxx`
102
98
2. Update the poetry.lock file via `poetry lock --no-update`
0 commit comments