You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

pyproject.toml 4.4 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. [build-system]
  2. requires = ["hatchling"]
  3. build-backend = "hatchling.build"
  4. [project]
  5. name = "agnext"
  6. version = "0.0.1"
  7. description = "A small example package"
  8. readme = "README.md"
  9. requires-python = ">=3.10"
  10. classifiers = [
  11. "Programming Language :: Python :: 3",
  12. "License :: OSI Approved :: MIT License",
  13. "Operating System :: OS Independent",
  14. ]
  15. dependencies = [
  16. "openai>=1.3",
  17. "pillow",
  18. "aiohttp",
  19. "typing-extensions",
  20. "pydantic>=1.10,<3",
  21. "types-aiofiles",
  22. "grpcio",
  23. "protobuf",
  24. "tiktoken",
  25. "azure-core"
  26. ]
  27. [tool.hatch.envs.default]
  28. installer = "uv"
  29. dependencies = [
  30. "azure-identity",
  31. "aiofiles",
  32. "chess",
  33. "colorama",
  34. "grpcio-tools",
  35. "langgraph",
  36. "langchain-openai",
  37. "llama-index-readers-web",
  38. "llama-index-readers-wikipedia",
  39. "llama-index-tools-wikipedia",
  40. "llama-index-embeddings-azure-openai",
  41. "llama-index-llms-azure-openai",
  42. "llama-index",
  43. "markdownify",
  44. "mypy==1.10.0",
  45. "pip",
  46. "polars",
  47. "pyright==1.1.368",
  48. "pytest-asyncio",
  49. "pytest-mock",
  50. "pytest-xdist",
  51. "pytest",
  52. "python-dotenv",
  53. "requests",
  54. "ruff==0.4.8",
  55. "tavily-python",
  56. "textual-dev",
  57. "textual-imageview",
  58. "textual",
  59. "tiktoken",
  60. "types-aiofiles",
  61. "types-pillow",
  62. "types-protobuf",
  63. "types-requests",
  64. "wikipedia",
  65. "nbqa"
  66. ]
  67. [tool.hatch.envs.default.extra-scripts]
  68. pip = "{env:HATCH_UV} pip {args}"
  69. [tool.hatch.envs.default.scripts]
  70. fmt = "ruff format"
  71. lint = "ruff check"
  72. test = "pytest -n auto"
  73. check = [
  74. "ruff format",
  75. "ruff check --fix",
  76. "pyright",
  77. "mypy --non-interactive --install-types",
  78. "pytest -n auto",
  79. # Only checking notebooks with mypy for now due to the fact pyright doesn't seem to be able to ignore the top level await
  80. "nbqa mypy docs/src",
  81. ]
  82. [tool.hatch.envs.test-matrix]
  83. template = "default"
  84. [[tool.hatch.envs.test-matrix.matrix]]
  85. python = ["3.10", "3.11", "3.12"]
  86. [tool.hatch.envs.docs]
  87. template = "default"
  88. dependencies = [
  89. "sphinx",
  90. "furo",
  91. "sphinxcontrib-apidoc",
  92. "myst-nb",
  93. "sphinx-autobuild",
  94. ]
  95. [tool.hatch.envs.docs.scripts]
  96. build = "sphinx-build docs/src docs/build"
  97. serve = "sphinx-autobuild --watch src docs/src docs/build"
  98. check = [
  99. "sphinx-build --fail-on-warning docs/src docs/build"
  100. ]
  101. # Benchmark environments
  102. [tool.hatch.envs.bench-humaneval-teamone]
  103. installer = "uv"
  104. detached = true
  105. dependencies = [
  106. "agnext@{root:uri}",
  107. "agbench@{root:uri}/tools/agbench",
  108. "team-one@{root:uri}/teams/team-one",
  109. ]
  110. [tool.hatch.envs.bench-humaneval-twoagents]
  111. installer = "uv"
  112. detached = true
  113. dependencies = [
  114. "agnext@{root:uri}",
  115. "agbench@{root:uri}/tools/agbench",
  116. ]
  117. [tool.ruff]
  118. line-length = 120
  119. fix = true
  120. exclude = ["build", "dist", "src/agnext/application/protos"]
  121. target-version = "py310"
  122. include = ["src/**", "samples/*.py", "docs/**/*.ipynb"]
  123. [tool.ruff.format]
  124. docstring-code-format = true
  125. [tool.ruff.lint]
  126. select = ["E", "F", "W", "B", "Q", "I", "ASYNC"]
  127. ignore = ["F401", "E501"]
  128. [tool.ruff.lint.flake8-tidy-imports]
  129. [tool.ruff.lint.flake8-tidy-imports.banned-api]
  130. "unittest".msg = "Use `pytest` instead."
  131. [tool.mypy]
  132. files = ["src", "samples", "tests"]
  133. exclude = ["src/agnext/application/protos"]
  134. strict = true
  135. python_version = "3.10"
  136. ignore_missing_imports = true
  137. # from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
  138. disallow_untyped_defs = true
  139. no_implicit_optional = true
  140. check_untyped_defs = true
  141. warn_return_any = true
  142. show_error_codes = true
  143. warn_unused_ignores = false
  144. disallow_incomplete_defs = true
  145. disallow_untyped_decorators = true
  146. disallow_any_unimported = true
  147. [tool.pyright]
  148. include = ["src", "tests", "samples"]
  149. typeCheckingMode = "strict"
  150. reportUnnecessaryIsInstance = false
  151. reportMissingTypeStubs = false
  152. exclude = ["src/agnext/application/protos"]
  153. [tool.pytest.ini_options]
  154. minversion = "6.0"
  155. testpaths = ["tests"]
  156. [tool.hatch.build.hooks.protobuf]
  157. dependencies = ["hatch-protobuf", "mypy-protobuf~=3.0"]
  158. generate_pyi = false
  159. proto_paths = ["../protos"]
  160. output_path = "src/agnext/application/protos"
  161. [[tool.hatch.build.hooks.protobuf.generators]]
  162. name = "mypy"
  163. outputs = ["{proto_path}/{proto_name}_pb2.pyi"]
  164. [[tool.hatch.build.hooks.protobuf.generators]]
  165. name = "mypy_grpc"
  166. outputs = ["{proto_path}/{proto_name}_pb2_grpc.pyi"]
  167. [tool.nbqa.addopts]
  168. mypy = [
  169. "--disable-error-code=top-level-await"
  170. ]