Skip to content

Commit

Permalink
Rename OpenDevin to OpenHands (All-Hands-AI#3472)
Browse files Browse the repository at this point in the history
* Replace OpenDevin with OpenHands

* Update CONTRIBUTING.md

* Update README.md

* Update README.md

* update poetry lock; move opendevin folder to openhands

* fix env var

* revert image references in docs

* revert permissions

* revert permissions

---------

Co-authored-by: Xingyao Wang <[email protected]>
  • Loading branch information
rbren and xingyaoww authored Aug 19, 2024
1 parent 83f36c1 commit 01ae22e
Show file tree
Hide file tree
Showing 387 changed files with 1,832 additions and 1,824 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "OpenDevin Codespaces",
"name": "OpenHands Codespaces",
"image": "mcr.microsoft.com/devcontainers/universal",
"customizations":{
"vscode":{
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_template.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bug
description: Report a problem with OpenDevin
description: Report a problem with OpenHands
title: '[Bug]: '
labels: ['bug']
body:
Expand Down Expand Up @@ -28,8 +28,8 @@ body:
- type: textarea
id: current-version
attributes:
label: Current OpenDevin version
description: What version of OpenDevin are you using? If you're running in docker, tell us the tag you're using (e.g. ghcr.io/opendevin/opendevin:0.3.1).
label: Current OpenHands version
description: What version of OpenHands are you using? If you're running in docker, tell us the tag you're using (e.g. ghcr.io/all-hands-ai/openhands:0.3.1).
render: bash
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature Request
about: Suggest an idea for OpenDevin features
about: Suggest an idea for OpenHands features
title: ''
labels: 'enhancement'
assignees: ''
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
# Build the documentation website
build:
if: github.repository == 'OpenDevin/OpenDevin'
if: github.repository == 'All-Hands-AI/OpenHands'
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:

# Deploy the documentation website
deploy:
if: github.ref == 'refs/heads/main' && github.repository == 'OpenDevin/OpenDevin'
if: github.ref == 'refs/heads/main' && github.repository == 'All-Hands-AI/OpenHands'
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
# This job only runs on "main" so only run one of these jobs at a time
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dummy-agent-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Run tests
run: |
set -e
poetry run python opendevin/core/main.py -t "do a flip" -d ./workspace/ -c DummyAgent
poetry run python openhands/core/main.py -t "do a flip" -d ./workspace/ -c DummyAgent
- name: Check exit code
run: |
if [ $? -ne 0 ]; then
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/gchr_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
default: ''

jobs:
# Builds the OpenDevin Docker images
# Builds the OpenHands Docker images
ghcr_build:
name: Build App Image
runs-on: ubuntu-latest
Expand All @@ -32,7 +32,7 @@ jobs:
packages: write
strategy:
matrix:
image: ['opendevin']
image: ['openhands']
platform: ['amd64', 'arm64']
steps:
- name: Checkout
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
path: /tmp/${{ matrix.image }}_image_${{ matrix.platform }}.tar
retention-days: 14

# Push the OpenDevin and sandbox Docker images to the ghcr.io repository
# Push the OpenHands and sandbox Docker images to the ghcr.io repository
ghcr_push:
runs-on: ubuntu-latest
needs: [ghcr_build]
Expand All @@ -84,7 +84,7 @@ jobs:
packages: write
strategy:
matrix:
image: ['opendevin']
image: ['openhands']
platform: ['amd64', 'arm64']
steps:
- name: Checkout code
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
docker tag $loaded_image $image_name:${tag}_${{ matrix.platform }}
docker push $image_name:${tag}_${{ matrix.platform }}
done
# Creates and pushes the OpenDevin and sandbox Docker image manifests
# Creates and pushes the OpenHands and sandbox Docker image manifests
create_manifest:
runs-on: ubuntu-latest
needs: [ghcr_build, ghcr_push]
Expand All @@ -122,7 +122,7 @@ jobs:
tags: ${{ needs.ghcr_build.outputs.tags }}
strategy:
matrix:
image: ['opendevin']
image: ['openhands']
permissions:
contents: read
packages: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Install Python dependencies using Poetry
run: make install-python-dependencies
- name: Create source distribution and Dockerfile
run: poetry run python3 opendevin/runtime/utils/runtime_build.py --base_image ${{ matrix.base_image }} --build_folder containers/runtime --force_rebuild
run: poetry run python3 openhands/runtime/utils/runtime_build.py --base_image ${{ matrix.base_image }} --build_folder containers/runtime --force_rebuild
- name: Build and export image
id: build
run: |
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
# Print the full name of the image
echo "Loaded Docker image: $image_name"
TEST_RUNTIME=${{ matrix.runtime_type }} SANDBOX_USER_ID=$(id -u) SANDBOX_CONTAINER_IMAGE=$image_name TEST_IN_CI=true poetry run pytest --cov=agenthub --cov=opendevin --cov-report=xml -s ./tests/unit/test_runtime.py
TEST_RUNTIME=${{ matrix.runtime_type }} SANDBOX_USER_ID=$(id -u) SANDBOX_CONTAINER_IMAGE=$image_name TEST_IN_CI=true poetry run pytest --cov=agenthub --cov=openhands --cov-report=xml -s ./tests/unit/test_runtime.py
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
- name: Install pre-commit
run: pip install pre-commit==3.7.0
- name: Run pre-commit hooks
run: pre-commit run --files opendevin/**/* agenthub/**/* evaluation/**/* tests/**/* --show-diff-on-failure --config ./dev_config/python/.pre-commit-config.yaml
run: pre-commit run --files openhands/**/* agenthub/**/* evaluation/**/* tests/**/* --show-diff-on-failure --config ./dev_config/python/.pre-commit-config.yaml
4 changes: 2 additions & 2 deletions .github/workflows/py-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Build Environment
run: make build
- name: Run Tests
run: poetry run pytest --forked --cov=agenthub --cov=opendevin --cov-report=xml ./tests/unit -k "not test_runtime.py"
run: poetry run pytest --forked --cov=agenthub --cov=openhands --cov-report=xml ./tests/unit -k "not test_runtime.py"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Build Environment
run: make build
- name: Run Tests
run: poetry run pytest --forked --cov=agenthub --cov=opendevin --cov-report=xml ./tests/unit -k "not test_runtime.py"
run: poetry run pytest --forked --cov=agenthub --cov=openhands --cov-report=xml ./tests/unit -k "not test_runtime.py"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/review-pr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Workflow that uses OpenDevin to review a pull request. PR must be labeled 'review-this'
name: Use OpenDevin to Review Pull Request
# Workflow that uses OpenHands to review a pull request. PR must be labeled 'review-this'
name: Use OpenHands to Review Pull Request

on:
pull_request:
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
export PATH="/github/home/.local/bin:$PATH"
poetry install --without evaluation,llama-index
poetry run playwright install --with-deps chromium
- name: Run OpenDevin
- name: Run OpenHands
env:
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_MODEL: ${{ vars.LLM_MODEL }}
Expand All @@ -60,7 +60,7 @@ jobs:
export PYTHONPATH=$(pwd):$PYTHONPATH
export WORKSPACE_MOUNT_PATH=$GITHUB_WORKSPACE
export WORKSPACE_BASE=$GITHUB_WORKSPACE
echo -e "/exit\n" | poetry run python opendevin/core/main.py -i 50 -f task.txt
echo -e "/exit\n" | poetry run python openhands/core/main.py -i 50 -f task.txt
rm task.txt
- name: Check if review file is non-empty
id: check_file
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/solve-issue.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Workflow that uses OpenDevin to resolve a GitHub issue. Issue must be labeled 'solve-this'
name: Use OpenDevin to Resolve GitHub Issue
# Workflow that uses OpenHands to resolve a GitHub issue. Issue must be labeled 'solve-this'
name: Use OpenHands to Resolve GitHub Issue

on:
issues:
Expand All @@ -15,7 +15,7 @@ jobs:
if: github.event.label.name == 'solve-this'
runs-on: ubuntu-latest
container:
image: ghcr.io/opendevin/opendevin
image: ghcr.io/all-hands-ai/openhands
volumes:
- /var/run/docker.sock:/var/run/docker.sock
steps:
Expand All @@ -39,7 +39,7 @@ jobs:
export PATH="/github/home/.local/bin:$PATH"
poetry install --without evaluation,llama-index
poetry run playwright install --with-deps chromium
- name: Run OpenDevin
- name: Run OpenHands
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
Expand All @@ -50,14 +50,14 @@ jobs:
export PATH="/github/home/.local/bin:$PATH"
# Append path to correctly import package, note: must set pwd at first
export PYTHONPATH=$(pwd):$PYTHONPATH
WORKSPACE_MOUNT_PATH=$GITHUB_WORKSPACE poetry run python ./opendevin/core/main.py -i 50 -f task.txt -d $GITHUB_WORKSPACE
WORKSPACE_MOUNT_PATH=$GITHUB_WORKSPACE poetry run python ./openhands/core/main.py -i 50 -f task.txt -d $GITHUB_WORKSPACE
rm task.txt
- name: Setup Git, Create Branch, and Commit Changes
run: |
# Setup Git configuration
git config --global --add safe.directory $PWD
git config --global user.name 'OpenDevin'
git config --global user.email 'OpenDevin@users.noreply.github.com'
git config --global user.name 'OpenHands'
git config --global user.email 'OpenHands@users.noreply.github.com'
# Create a unique branch name with a timestamp
BRANCH_NAME="fix/${{ github.event.issue.number }}-$(date +%Y%m%d%H%M%S)"
Expand All @@ -69,7 +69,7 @@ jobs:
git add --all -- ':!task.txt'
# Commit the changes, if any
git commit -m "OpenDevin: Resolve Issue #${{ github.event.issue.number }}"
git commit -m "OpenHands: Resolve Issue #${{ github.event.issue.number }}"
if [ $? -ne 0 ]; then
echo "No changes to commit."
exit 0
Expand All @@ -91,9 +91,9 @@ jobs:
run: |
# Create PR and capture URL
PR_URL=$(gh pr create \
--title "OpenDevin: Resolve Issue #2" \
--body "This PR was generated by OpenDevin to resolve issue #2" \
--repo "foragerr/OpenDevin" \
--title "OpenHands: Resolve Issue #2" \
--body "This PR was generated by OpenHands to resolve issue #2" \
--repo "foragerr/OpenHands" \
--head "${{ github.head_ref }}" \
--base "${{ env.DEFAULT_BRANCH }}" \
| grep -o 'https://github.com/[^ ]*')
Expand All @@ -110,4 +110,4 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
gh issue comment ${{ github.event.issue.number }} \
-b "OpenDevin raised [PR #${{ env.PR_NUMBER }}](${{ env.PR_URL }}) to resolve this issue."
-b "OpenHands raised [PR #${{ env.PR_NUMBER }}](${{ env.PR_URL }}) to resolve this issue."
32 changes: 16 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# Contributing

Thanks for your interest in contributing to OpenDevin! We welcome and appreciate contributions.
Thanks for your interest in contributing to OpenHands! We welcome and appreciate contributions.

## How Can I Contribute?

There are many ways that you can contribute:

1. **Download and use** OpenDevin, and send [issues](https://github.com/OpenDevin/OpenDevin/issues) when you encounter something that isn't working or a feature that you'd like to see.
1. **Download and use** OpenHands, and send [issues](https://github.com/All-Hands-AI/OpenHands/issues) when you encounter something that isn't working or a feature that you'd like to see.
2. **Send feedback** after each session by [clicking the thumbs-up thumbs-down buttons](https://docs.all-hands.dev/modules/usage/feedback), so we can see where things are working and failing, and also build an open dataset for training code agents.
3. **Improve the Codebase** by sending PRs (see details below). In particular, we have some [good first issue](https://github.com/OpenDevin/OpenDevin/labels/good%20first%20issue) issues that may be ones to start on.
3. **Improve the Codebase** by sending PRs (see details below). In particular, we have some [good first issue](https://github.com/All-Hands-AI/OpenHands/labels/good%20first%20issue) issues that may be ones to start on.

## Understanding OpenDevin's CodeBase
## Understanding OpenHands's CodeBase

To understand the codebase, please refer to the README in each module:
- [frontend](./frontend/README.md)
- [agenthub](./agenthub/README.md)
- [evaluation](./evaluation/README.md)
- [opendevin](./opendevin/README.md)
- [server](./opendevin/server/README.md)
- [openhands](./openhands/README.md)
- [server](./openhands/server/README.md)

When you write code, it is also good to write tests. Please navigate to the `tests` folder to see existing test suites.
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 GitHub's continuous integration to ensure quality of the project.

## Sending Pull Requests to OpenDevin
## Sending Pull Requests to OpenHands

### 1. Fork the Official Repository
Fork the [OpenDevin repository](https://github.com/OpenDevin/OpenDevin) into your own account.
Fork the [OpenHands repository](https://github.com/All-Hands-AI/OpenHands) into your own account.
Clone your own forked repository into your local environment:

```shell
git clone [email protected]:<YOUR-USERNAME>/OpenDevin.git
git clone [email protected]:<YOUR-USERNAME>/OpenHands.git
```

### 2. Configure Git
Expand All @@ -38,8 +38,8 @@ Set the official repository as your [upstream](https://www.atlassian.com/git/tut
Add the original repository as upstream:

```shell
cd OpenDevin
git remote add upstream [email protected]:OpenDevin/OpenDevin.git
cd OpenHands
git remote add upstream [email protected]:All-Hands-AI/OpenHands.git
```

Verify that the remote is set:
Expand All @@ -62,7 +62,7 @@ git push origin main

### 4. Set up the Development Environment

We have a separate doc [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md) that tells you how to set up a development workflow.
We have a separate doc [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md) that tells you how to set up a development workflow.

### 5. Write Code and Commit It

Expand All @@ -80,13 +80,13 @@ git push origin my_branch
* On GitHub, go to the page of your forked repository, and create a Pull Request:
- Click on `Branches`
- Click on the `...` beside your branch and click on `New pull request`
- Set `base repository` to `OpenDevin/OpenDevin`
- Set `base repository` to `All-Hands-AI/OpenHands`
- Set `base` to `main`
- Click `Create pull request`

The PR should appear in [OpenDevin PRs](https://github.com/OpenDevin/OpenDevin/pulls).
The PR should appear in [OpenHands PRs](https://github.com/All-Hands-AI/OpenHands/pulls).

Then the OpenDevin team will review your code.
Then the OpenHands team will review your code.

## PR Rules

Expand All @@ -109,7 +109,7 @@ For example, a PR title could be:
- `refactor: modify package path`
- `feat(frontend): xxxx`, where `(frontend)` means that this PR mainly focuses on the frontend component.

You may also check out previous PRs in the [PR list](https://github.com/OpenDevin/OpenDevin/pulls).
You may also check out previous PRs in the [PR list](https://github.com/All-Hands-AI/OpenHands/pulls).

### 2. Pull Request description
- If your PR is small (such as a typo fix), you can go brief.
Expand Down
10 changes: 5 additions & 5 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@

## Contributors

We would like to thank all the [contributors](https://github.com/opendevin/opendevin/graphs/contributors) who have helped make OpenDevin possible. Your dedication and hard work are greatly appreciated.
We would like to thank all the [contributors](https://github.com/All-Hands-AI/OpenHands/graphs/contributors) who have helped make OpenHands possible. Your dedication and hard work are greatly appreciated.

## Open Source Projects

OpenDevin includes and adapts the following open source projects. We are grateful for their contributions to the open source community:
OpenHands includes and adapts the following open source projects. We are grateful for their contributions to the open source community:

#### [SWE Agent](https://github.com/princeton-nlp/swe-agent)
- License: MIT License
- Description: Adapted for use in OpenDevin's agenthub
- Description: Adapted for use in OpenHands's agenthub

#### [Aider](https://github.com/paul-gauthier/aider)
- License: Apache License 2.0
- Description: AI pair programming tool. OpenDevin has adapted and integrated its linter module for code-related tasks in [`agentskills utilities`](https://github.com/OpenDevin/OpenDevin/tree/main/opendevin/runtime/plugins/agent_skills/utils/aider)
- Description: AI pair programming tool. OpenHands has adapted and integrated its linter module for code-related tasks in [`agentskills utilities`](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/runtime/plugins/agent_skills/utils/aider)

#### [BrowserGym](https://github.com/ServiceNow/BrowserGym)
- License: Apache License 2.0
- Description: Adapted in implementing the browsing agent


### Reference Implementations for Evaluation Benchmarks
OpenDevin integrates code of the reference implementations for the following agent evaluation benchmarks:
OpenHands integrates code of the reference implementations for the following agent evaluation benchmarks:

#### [HumanEval](https://github.com/openai/human-eval)
- License: MIT License
Expand Down
Loading

0 comments on commit 01ae22e

Please sign in to comment.