mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
create the pyproject file
This commit is contained in:
parent
a0928ae590
commit
007051b453
3
.gitignore
vendored
3
.gitignore
vendored
@ -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
|
||||
|
||||
3854
Pipfile.lock
generated
3854
Pipfile.lock
generated
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
46
pyproject.toml
Normal file
46
pyproject.toml
Normal file
@ -0,0 +1,46 @@
|
||||
[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.10"
|
||||
datasets = "^2.18.0"
|
||||
pandas = "^2.2.1"
|
||||
litellm = "^1.34.13"
|
||||
termcolor = "^2.4.0"
|
||||
seaborn = "^0.13.2"
|
||||
docker = "^7.0.0"
|
||||
fastapi = "^0.110.0"
|
||||
toml = "^0.10.2"
|
||||
uvicorn = "^0.29.0"
|
||||
types-toml = "^0.10.8.20240310"
|
||||
|
||||
[tool.poetry.group.langchain.dependencies]
|
||||
langchain = "^0.1.13"
|
||||
langchain-core = "^0.1.36"
|
||||
langchain-community = "^0.0.29"
|
||||
|
||||
[tool.poetry.group.llama-index.dependencies]
|
||||
llama-index = "^0.10.25"
|
||||
llama-index-vector-stores-chroma = "^0.1.6"
|
||||
chromadb = "^0.4.24"
|
||||
llama-index-embeddings-huggingface = "^0.2.0"
|
||||
llama-index-embeddings-azure-openai = "^0.1.6"
|
||||
llama-index-embeddings-ollama = "^0.1.2"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
ruff = "^0.3.4"
|
||||
mypy = "^1.9.0"
|
||||
pre-commit = "^3.7.0"
|
||||
|
||||
[tool.poetry.group.test.dependencies]
|
||||
pytest = "^8.1.1"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
Loading…
x
Reference in New Issue
Block a user