Compare commits

...

16 Commits

Author SHA1 Message Date
Anas Dorbani 13c8ab19d5 add build-eval to the make file 2024-04-05 00:19:41 +00:00
Anas Dorbani b90c464c39 Fix unexpected operator 2024-04-05 00:02:55 +00:00
Anas Dorbani a143242c37 add poetry.lock 2024-04-04 23:55:16 +00:00
Anas Dorbani 5bb859970b Add dependencies evaluation group 2024-04-04 23:51:53 +00:00
Anas Dorbani 1877fe9b91 some conflicts fixes 2024-04-04 23:50:08 +00:00
Robert Brennan 7817f18744 add torch and pymupdfb deps 2024-04-04 23:34:03 +00:00
Anas Dorbani a03b614447 rebase and fix the versions adding lock file 2024-04-04 23:33:02 +00:00
Anas Dorbani 3dad4e4f2e add missing dependency 2024-04-04 23:33:02 +00:00
Anas Dorbani 6361b30767 Add github action for pytest 2024-04-04 23:33:02 +00:00
Anas Dorbani 9fc5ebbf73 Remove LangChain dependencies 2024-04-04 23:33:02 +00:00
Anas Dorbani b8c9e314e1 Untrack lock files and wait for the backend to get start before frontend 2024-04-04 23:33:02 +00:00
Anas Dorbani 5b247b9fe3 fix some execution issues 2024-04-04 23:33:02 +00:00
Anas Dorbani 2d638f0540 adapt makefile 2024-04-04 23:33:02 +00:00
Anas Dorbani 8217739c31 Update Makefile 2024-04-04 23:33:02 +00:00
Anas Dorbani 834f3aa088 Fix the pyproject.toml file 2024-04-04 23:33:02 +00:00
Anas Dorbani 007051b453 create the pyproject file 2024-04-04 23:33:02 +00:00
11 changed files with 6589 additions and 4893 deletions
+17
View File
@@ -0,0 +1,17 @@
name: Run Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Run tests
run: |
make build
poetry run pytest ./tests
+2 -1
View File
@@ -100,7 +100,7 @@ ipython_config.py
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
@@ -128,6 +128,7 @@ venv/
ENV/
env.bak/
venv.bak/
*venv/
# Spyder project settings
.spyderproject
+19 -9
View File
@@ -8,6 +8,7 @@ FRONTEND_PORT = 3001
DEFAULT_WORKSPACE_DIR = "./workspace"
DEFAULT_MODEL = "gpt-4-0125-preview"
CONFIG_FILE = config.toml
PRECOMMIT_CONFIG_PATH = "./dev_config/python/.pre-commit-config.yaml"
# Build
build:
@@ -15,8 +16,11 @@ build:
@echo "Pulling Docker image..."
@docker pull $(DOCKER_IMAGE)
@echo "Installing Python dependencies..."
@python -m pip install pipenv
@python -m pipenv install -v
@curl -sSL https://install.python-poetry.org | python3 -
@poetry install --without evaluation
@echo "Activating Poetry shell..."
@echo "Installing pre-commit hooks..."
@poetry run pre-commit install --config $(PRECOMMIT_CONFIG_PATH)
@echo "Setting up frontend environment..."
@echo "Detect Node.js version..."
@cd frontend && node ./scripts/detect-node-version.js
@@ -27,10 +31,16 @@ build:
@which corepack > /dev/null || (echo "Installing corepack..." && npm install -g corepack)
@cd frontend && corepack enable && pnpm install && pnpm run make-i18n
# Build Evaluation
build-eval:
@echo "Building evaluation dependencies..."
@poetry install --only evaluation
@echo "Evaluation dependencies built successfully."
# Start backend
start-backend:
@echo "Starting backend..."
@python -m pipenv run uvicorn opendevin.server.listen:app --port $(BACKEND_PORT)
@poetry run uvicorn opendevin.server.listen:app --port $(BACKEND_PORT)
# Start frontend
start-frontend:
@@ -40,15 +50,15 @@ start-frontend:
# Run the app
run:
@echo "Running the app..."
@if [ "$(OS)" == "Windows_NT" ]; then \
@if [ "$(OS)" = "Windows_NT" ]; then \
echo "`make run` is not supported on Windows. Please run `make start-frontend` and `make start-backend` separately."; \
exit 1; \
fi
@mkdir -p logs
@rm -f logs/pipe
@mkfifo logs/pipe
@cat logs/pipe | (make start-backend) &
@echo 'test' | tee logs/pipe | (make start-frontend)
@poetry run nohup uvicorn opendevin.server.listen:app --port $(BACKEND_PORT) > logs/backend_$(shell date +'%Y%m%d_%H%M%S').log 2>&1 &
@echo "Waiting for the backend to start..."
@until nc -z localhost $(BACKEND_PORT); do sleep 0.1; done
@cd frontend && npm run start -- --port $(FRONTEND_PORT)
# Setup config.toml
setup-config:
@@ -94,4 +104,4 @@ help:
@echo " help - Display this help message, providing information on available targets."
# Phony targets
.PHONY: install start-backend start-frontend run setup-config help
.PHONY: build build-eval start-backend start-frontend run setup-config help
-32
View File
@@ -1,32 +0,0 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
datasets = "*"
pandas = "*"
litellm = "*"
termcolor = "*"
seaborn = "*"
docker = "*"
fastapi = "*"
uvicorn = {extras = ["standard"], version = "*"}
ruff = "*"
mypy = "*"
llama-index = "*"
llama-index-vector-stores-chroma = "*"
chromadb = "*"
llama-index-embeddings-huggingface = "*"
llama-index-embeddings-azure-openai = "*"
llama-index-embeddings-ollama = "*"
google-generativeai = "*"
toml = "*"
json_repair = "*"
numpy = "*"
playwright = "*"
[dev-packages]
[requires]
python_version = "3.11"
Generated
-3854
View File
File diff suppressed because it is too large Load Diff
-38
View File
@@ -1,38 +0,0 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[[source]]
url = "https://download.pytorch.org/whl/cpu"
verify_ssl = true
name = "pytorch"
[packages]
torch = {version = "*", index = "pytorch"}
datasets = "*"
pandas = "*"
litellm = "*"
termcolor = "*"
seaborn = "*"
docker = "*"
fastapi = "*"
uvicorn = {extras = ["standard"], version = "*"}
ruff = "*"
mypy = "*"
llama-index = "*"
llama-index-vector-stores-chroma = "*"
chromadb = "*"
llama-index-embeddings-huggingface = "*"
llama-index-embeddings-azure-openai = "*"
llama-index-embeddings-ollama = "*"
google-generativeai = "*"
toml = "*"
json_repair = "*"
numpy = "*"
playwright = "*"
[dev-packages]
[requires]
python_version = "3.11"
+1 -1
View File
@@ -8,4 +8,4 @@ warn_redundant_casts = True
no_implicit_optional = True
strict_optional = True
exclude = agenthub/monologue_agent/regression
exclude = agenthub/monologue_agent/regression
+683 -957
View File
File diff suppressed because it is too large Load Diff
+5 -1
View File
@@ -1,5 +1,5 @@
import os
import toml
import toml # type: ignore
from dotenv import load_dotenv
@@ -34,12 +34,14 @@ for key, value in config.items():
config[key] = tomlConfig[key]
def _get(key: str, default):
value = config.get(key, default)
if not value:
value = os.environ.get(key, default)
return value
def get_or_error(key: str):
"""
Get a key from the config, or raise an error if it doesn't exist.
@@ -49,12 +51,14 @@ def get_or_error(key: str):
raise KeyError(f"Please set '{key}' in `config.toml` or `.env`.")
return value
def get_or_default(key: str, default):
"""
Get a key from the config, or return a default value if it doesn't exist.
"""
return _get(key, default)
def get_or_none(key: str):
"""
Get a key from the config, or return None if it doesn't exist.
Generated
+5814
View File
File diff suppressed because it is too large Load Diff
+48
View File
@@ -0,0 +1,48 @@
[tool.poetry]
name = "opendevin"
version = "0.1.0"
description = "OpenDevin: Code Less, Make More"
authors = ["OpenDevin"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/OpenDevin/OpenDevin"
[tool.poetry.dependencies]
python = "^3.11"
datasets = "*"
pandas = "*"
litellm = "*"
termcolor = "*"
seaborn = "*"
docker = "*"
fastapi = "*"
toml = "*"
uvicorn = "*"
types-toml = "*"
numpy = "*"
json-repair = "*"
playwright = "*"
[tool.poetry.group.llama-index.dependencies]
llama-index = "*"
llama-index-vector-stores-chroma = "*"
chromadb = "*"
llama-index-embeddings-huggingface = "*"
llama-index-embeddings-azure-openai = "*"
llama-index-embeddings-ollama = "*"
pymupdfb = "*"
[tool.poetry.group.dev.dependencies]
ruff = "*"
mypy = "*"
pre-commit = "*"
[tool.poetry.group.test.dependencies]
pytest = "*"
[tool.poetry.group.evaluation.dependencies]
torch = "*"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"