2024-05-15 09:49:44 -04:00
|
|
|
[build-system]
|
2024-06-19 13:49:13 -04:00
|
|
|
requires = ["hatchling"]
|
|
|
|
build-backend = "hatchling.build"
|
2024-05-15 09:49:44 -04:00
|
|
|
|
|
|
|
[project]
|
|
|
|
name = "agnext"
|
|
|
|
version = "0.0.1"
|
|
|
|
description = "A small example package"
|
|
|
|
readme = "README.md"
|
|
|
|
requires-python = ">=3.10"
|
|
|
|
classifiers = [
|
|
|
|
"Programming Language :: Python :: 3",
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
]
|
2024-05-29 17:12:02 -04:00
|
|
|
dependencies = [
|
|
|
|
"openai>=1.3",
|
|
|
|
"pillow",
|
|
|
|
"aiohttp",
|
|
|
|
"typing-extensions",
|
2024-06-28 08:03:42 -07:00
|
|
|
"pydantic>=1.10,<3",
|
|
|
|
"types-aiofiles",
|
|
|
|
"grpcio",
|
2024-07-19 18:44:22 -07:00
|
|
|
"protobuf",
|
|
|
|
"tiktoken"
|
2024-05-29 17:12:02 -04:00
|
|
|
]
|
2024-05-15 09:49:44 -04:00
|
|
|
|
2024-06-19 13:49:13 -04:00
|
|
|
[tool.hatch.envs.default]
|
2024-06-21 10:43:28 -04:00
|
|
|
installer = "uv"
|
2024-06-19 13:49:13 -04:00
|
|
|
dependencies = [
|
2024-08-02 09:58:15 -07:00
|
|
|
"azure-identity",
|
2024-07-24 20:01:01 +01:00
|
|
|
"aiofiles",
|
|
|
|
"chess",
|
|
|
|
"colorama",
|
|
|
|
"grpcio-tools",
|
2024-07-26 18:23:31 -07:00
|
|
|
"langgraph",
|
|
|
|
"langchain-openai",
|
2024-07-24 20:01:01 +01:00
|
|
|
"llama-index-readers-web",
|
|
|
|
"llama-index-readers-wikipedia",
|
|
|
|
"llama-index-tools-wikipedia",
|
|
|
|
"llama-index-embeddings-azure-openai",
|
|
|
|
"llama-index-llms-azure-openai",
|
|
|
|
"llama-index",
|
|
|
|
"markdownify",
|
2024-06-19 13:49:13 -04:00
|
|
|
"mypy==1.10.0",
|
2024-07-24 20:01:01 +01:00
|
|
|
"pip",
|
2024-05-29 17:12:02 -04:00
|
|
|
"polars",
|
2024-07-24 20:01:01 +01:00
|
|
|
"pyright==1.1.368",
|
|
|
|
"pytest-asyncio",
|
|
|
|
"pytest-mock",
|
|
|
|
"pytest-xdist",
|
|
|
|
"pytest",
|
|
|
|
"python-dotenv",
|
|
|
|
"ruff==0.4.8",
|
2024-06-07 13:33:51 -07:00
|
|
|
"tavily-python",
|
2024-06-19 13:49:13 -04:00
|
|
|
"textual-dev",
|
2024-06-17 17:20:46 -07:00
|
|
|
"textual-imageview",
|
2024-07-24 20:01:01 +01:00
|
|
|
"textual",
|
|
|
|
"tiktoken",
|
|
|
|
"types-aiofiles",
|
|
|
|
"types-pillow",
|
2024-07-08 16:45:14 -04:00
|
|
|
"types-protobuf",
|
2024-08-07 17:38:44 -04:00
|
|
|
"wikipedia",
|
|
|
|
"nbqa"
|
2024-06-19 13:49:13 -04:00
|
|
|
]
|
|
|
|
|
2024-06-21 10:43:28 -04:00
|
|
|
[tool.hatch.envs.default.extra-scripts]
|
|
|
|
pip = "{env:HATCH_UV} pip {args}"
|
|
|
|
|
2024-06-19 13:49:13 -04:00
|
|
|
[tool.hatch.envs.default.scripts]
|
|
|
|
fmt = "ruff format"
|
|
|
|
lint = "ruff check"
|
|
|
|
test = "pytest -n auto"
|
|
|
|
check = [
|
|
|
|
"ruff format",
|
|
|
|
"ruff check --fix",
|
|
|
|
"pyright",
|
2024-06-24 10:36:10 -04:00
|
|
|
"mypy --non-interactive --install-types",
|
2024-06-19 13:49:13 -04:00
|
|
|
"pytest -n auto",
|
2024-08-07 17:38:44 -04:00
|
|
|
# Only checking notebooks with mypy for now due to the fact pyright doesn't seem to be able to ignore the top level await
|
|
|
|
"nbqa mypy docs/src",
|
2024-06-19 13:49:13 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
[tool.hatch.envs.test-matrix]
|
|
|
|
template = "default"
|
|
|
|
|
|
|
|
[[tool.hatch.envs.test-matrix.matrix]]
|
|
|
|
python = ["3.10", "3.11", "3.12"]
|
|
|
|
|
|
|
|
[tool.hatch.envs.docs]
|
2024-08-07 17:38:44 -04:00
|
|
|
template = "default"
|
2024-06-19 13:49:13 -04:00
|
|
|
dependencies = [
|
2024-06-28 08:03:42 -07:00
|
|
|
"sphinx",
|
|
|
|
"furo",
|
|
|
|
"sphinxcontrib-apidoc",
|
2024-08-06 11:37:11 -07:00
|
|
|
"myst-nb",
|
2024-08-07 12:25:27 -04:00
|
|
|
"sphinx-autobuild"
|
2024-05-29 17:12:02 -04:00
|
|
|
]
|
2024-05-15 09:49:44 -04:00
|
|
|
|
2024-06-19 13:49:13 -04:00
|
|
|
[tool.hatch.envs.docs.scripts]
|
|
|
|
build = "sphinx-build docs/src docs/build"
|
|
|
|
serve = "sphinx-autobuild --watch src docs/src docs/build"
|
2024-08-07 17:38:44 -04:00
|
|
|
check = [
|
|
|
|
"sphinx-build --fail-on-warning docs/src docs/build"
|
|
|
|
]
|
2024-05-15 09:49:44 -04:00
|
|
|
|
2024-07-02 10:58:49 -07:00
|
|
|
# Benchmark environments
|
|
|
|
[tool.hatch.envs.bench-humaneval-teamone]
|
|
|
|
installer = "uv"
|
|
|
|
detached = true
|
|
|
|
dependencies = [
|
|
|
|
"agnext@{root:uri}",
|
|
|
|
"agbench@{root:uri}/tools/agbench",
|
|
|
|
"team-one@{root:uri}/teams/team-one",
|
|
|
|
]
|
|
|
|
|
|
|
|
[tool.hatch.envs.bench-humaneval-twoagents]
|
|
|
|
installer = "uv"
|
|
|
|
detached = true
|
|
|
|
dependencies = [
|
|
|
|
"agnext@{root:uri}",
|
|
|
|
"agbench@{root:uri}/tools/agbench",
|
|
|
|
]
|
|
|
|
|
2024-05-15 09:49:44 -04:00
|
|
|
[tool.ruff]
|
|
|
|
line-length = 120
|
|
|
|
fix = true
|
2024-06-28 08:03:42 -07:00
|
|
|
exclude = ["build", "dist", "src/agnext/worker/protos"]
|
2024-05-15 09:49:44 -04:00
|
|
|
target-version = "py310"
|
2024-08-07 17:38:44 -04:00
|
|
|
include = ["src/**", "samples/*.py", "docs/**/*.ipynb"]
|
2024-05-15 09:49:44 -04:00
|
|
|
|
2024-06-04 09:36:12 -04:00
|
|
|
[tool.ruff.format]
|
|
|
|
docstring-code-format = true
|
|
|
|
|
2024-05-15 09:49:44 -04:00
|
|
|
[tool.ruff.lint]
|
2024-05-29 17:12:02 -04:00
|
|
|
select = ["E", "F", "W", "B", "Q", "I", "ASYNC"]
|
2024-05-15 09:49:44 -04:00
|
|
|
ignore = ["F401", "E501"]
|
|
|
|
|
2024-05-29 17:12:02 -04:00
|
|
|
[tool.ruff.lint.flake8-tidy-imports]
|
|
|
|
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
|
|
|
"unittest".msg = "Use `pytest` instead."
|
|
|
|
|
2024-05-15 09:49:44 -04:00
|
|
|
[tool.mypy]
|
2024-07-15 15:24:31 -07:00
|
|
|
files = ["src", "samples", "tests"]
|
2024-06-28 08:03:42 -07:00
|
|
|
exclude = ["src/agnext/worker/protos"]
|
2024-05-15 09:49:44 -04:00
|
|
|
|
|
|
|
strict = true
|
|
|
|
python_version = "3.10"
|
|
|
|
ignore_missing_imports = true
|
|
|
|
|
|
|
|
# from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
|
|
|
|
disallow_untyped_defs = true
|
|
|
|
no_implicit_optional = true
|
|
|
|
check_untyped_defs = true
|
|
|
|
warn_return_any = true
|
|
|
|
show_error_codes = true
|
|
|
|
warn_unused_ignores = false
|
|
|
|
|
|
|
|
disallow_incomplete_defs = true
|
|
|
|
disallow_untyped_decorators = true
|
|
|
|
disallow_any_unimported = true
|
|
|
|
|
|
|
|
[tool.pyright]
|
2024-07-15 15:24:31 -07:00
|
|
|
include = ["src", "tests", "samples"]
|
2024-05-15 09:49:44 -04:00
|
|
|
typeCheckingMode = "strict"
|
|
|
|
reportUnnecessaryIsInstance = false
|
|
|
|
reportMissingTypeStubs = false
|
2024-06-28 08:03:42 -07:00
|
|
|
exclude = ["src/agnext/worker/protos"]
|
2024-05-20 13:32:08 -06:00
|
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
|
|
minversion = "6.0"
|
|
|
|
testpaths = ["tests"]
|
2024-06-28 08:03:42 -07:00
|
|
|
|
|
|
|
[tool.hatch.build.hooks.protobuf]
|
|
|
|
dependencies = ["hatch-protobuf", "mypy-protobuf~=3.0"]
|
|
|
|
generate_pyi = false
|
|
|
|
proto_paths = ["../protos"]
|
|
|
|
output_path = "src/agnext/worker/protos"
|
|
|
|
|
|
|
|
|
|
|
|
[[tool.hatch.build.hooks.protobuf.generators]]
|
|
|
|
name = "mypy"
|
|
|
|
outputs = ["{proto_path}/{proto_name}_pb2.pyi"]
|
|
|
|
|
|
|
|
[[tool.hatch.build.hooks.protobuf.generators]]
|
|
|
|
name = "mypy_grpc"
|
|
|
|
outputs = ["{proto_path}/{proto_name}_pb2_grpc.pyi"]
|
2024-08-07 17:38:44 -04:00
|
|
|
|
|
|
|
[tool.nbqa.addopts]
|
|
|
|
mypy = [
|
|
|
|
"--disable-error-code=top-level-await"
|
|
|
|
]
|