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 5.0 kB

Graphrag integration (#4612) * add initial global search draft * add graphrag dep * fix local search embedding * linting * add from config constructor * remove draft notebook * update config factory and add docstrings * add graphrag sample * add sample prompts * update readme * update deps * Add API docs * Update python/samples/agentchat_graphrag/requirements.txt * Update python/samples/agentchat_graphrag/requirements.txt * update docstrings with snippet and doc ref * lint * improve set up instructions in docstring * lint * update lock * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_global_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_local_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * add unit tests * update lock * update uv lock * add docstring newlines * stubs and typing on graphrag tests * fix docstrings * fix mypy error * + linting and type fixes * type fix graphrag sample * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_global_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_local_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * Update python/samples/agentchat_graphrag/requirements.txt Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * update overrides * fix docstring client imports * additional docstring fix * add docstring missing import * use openai and fix db path * use console for displaying messages * add model config and gitignore * update readme * lint * Update python/samples/agentchat_graphrag/README.md * Update python/samples/agentchat_graphrag/README.md * Comment remaining azure config --------- Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com> Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
1 year ago
Graphrag integration (#4612) * add initial global search draft * add graphrag dep * fix local search embedding * linting * add from config constructor * remove draft notebook * update config factory and add docstrings * add graphrag sample * add sample prompts * update readme * update deps * Add API docs * Update python/samples/agentchat_graphrag/requirements.txt * Update python/samples/agentchat_graphrag/requirements.txt * update docstrings with snippet and doc ref * lint * improve set up instructions in docstring * lint * update lock * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_global_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_local_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * add unit tests * update lock * update uv lock * add docstring newlines * stubs and typing on graphrag tests * fix docstrings * fix mypy error * + linting and type fixes * type fix graphrag sample * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_global_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_local_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * Update python/samples/agentchat_graphrag/requirements.txt Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * update overrides * fix docstring client imports * additional docstring fix * add docstring missing import * use openai and fix db path * use console for displaying messages * add model config and gitignore * update readme * lint * Update python/samples/agentchat_graphrag/README.md * Update python/samples/agentchat_graphrag/README.md * Comment remaining azure config --------- Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com> Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. [dependency-groups]
  2. dev = [
  3. "pyright==1.1.389",
  4. "mypy==1.13.0",
  5. "ruff==0.4.8",
  6. "pytest",
  7. "pytest-asyncio",
  8. "pytest-cov",
  9. "pytest-xdist",
  10. "typer",
  11. "rich",
  12. "polars",
  13. "pytest_mock",
  14. "poethepoet",
  15. "packaging",
  16. "grpcio-tools~=1.70.0",
  17. "mypy-protobuf",
  18. "cookiecutter",
  19. "tomli",
  20. "tomli-w",
  21. "chainlit",
  22. "streamlit",
  23. # Documentation
  24. "myst-nb==1.1.2",
  25. "pydata-sphinx-theme==0.16.0",
  26. "sphinx-copybutton",
  27. "sphinx-design",
  28. "sphinx",
  29. "sphinxcontrib-apidoc",
  30. "autodoc_pydantic~=2.2",
  31. "pygments",
  32. "sphinxext-rediraffe",
  33. "opentelemetry-instrumentation-openai",
  34. "diskcache",
  35. "redis",
  36. "sphinx-autobuild",
  37. ]
  38. [tool.uv]
  39. override-dependencies = [
  40. "tenacity>=9.0.0",
  41. "aiofiles>=24.1.0",
  42. "chainlit>=2.0.1",
  43. "httpx>=0.27.0",
  44. ]
  45. [tool.uv.workspace]
  46. members = ["packages/*"]
  47. exclude = ["packages/autogen-magentic-one"]
  48. [tool.uv.sources]
  49. agbench = { workspace = true }
  50. autogen-agentchat = { workspace = true }
  51. autogen-core = { workspace = true }
  52. autogen-ext = { workspace = true }
  53. autogen-test-utils = { workspace = true }
  54. autogenstudio = { workspace = true }
  55. component-schema-gen = { workspace = true }
  56. magentic-one-cli = { workspace = true }
  57. [tool.ruff]
  58. line-length = 120
  59. fix = true
  60. target-version = "py310"
  61. [tool.ruff.format]
  62. docstring-code-format = true
  63. [tool.ruff.lint]
  64. select = ["E", "F", "W", "B", "Q", "I", "ASYNC", "T20"]
  65. ignore = ["F401", "E501"]
  66. [tool.ruff.lint.per-file-ignores]
  67. "docs/**.ipynb" = ["T20"]
  68. [tool.ruff.lint.flake8-tidy-imports]
  69. [tool.ruff.lint.flake8-tidy-imports.banned-api]
  70. "unittest".msg = "Use `pytest` instead."
  71. [tool.mypy]
  72. strict = true
  73. python_version = "3.10"
  74. ignore_missing_imports = true
  75. # from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
  76. disallow_untyped_defs = true
  77. no_implicit_optional = true
  78. check_untyped_defs = true
  79. warn_return_any = true
  80. show_error_codes = true
  81. warn_unused_ignores = false
  82. disallow_incomplete_defs = true
  83. disallow_untyped_decorators = true
  84. disallow_any_unimported = true
  85. [tool.pyright]
  86. include = ["src", "tests", "samples"]
  87. exclude = ["samples/core_xlang_hello_python_agent/protos"]
  88. typeCheckingMode = "strict"
  89. reportUnnecessaryIsInstance = false
  90. reportMissingTypeStubs = false
  91. [tool.nbqa.addopts]
  92. mypy = [
  93. "--disable-error-code=top-level-await"
  94. ]
  95. [tool.poe.tasks]
  96. fmt = "python run_task_in_pkgs_if_exist.py fmt"
  97. format.ref = "fmt"
  98. lint = "python run_task_in_pkgs_if_exist.py lint"
  99. pyright = "python run_task_in_pkgs_if_exist.py pyright"
  100. mypy = "python run_task_in_pkgs_if_exist.py mypy"
  101. test = "python run_task_in_pkgs_if_exist.py test"
  102. markdown-code-lint = """python check_md_code_blocks.py ../README.md ./docs/src/**/*.md ./packages/autogen-magentic-one/README.md"""
  103. samples-code-check = """pyright ./samples"""
  104. check = ["fmt", "lint", "pyright", "mypy", "docs-mypy", "test", "markdown-code-lint", "samples-code-check"]
  105. # Docs
  106. docs-mypy = "nbqa mypy docs/src --config-file ./pyproject.toml"
  107. docs-clean = "rm -rf docs/build docs/src/reference"
  108. docs-build = "sphinx-build docs/src docs/build"
  109. docs-serve = "sphinx-autobuild docs/src docs/build --watch packages/ --port 8000 --jobs auto"
  110. docs-check = "sphinx-build --fail-on-warning docs/src docs/build"
  111. docs-check-examples = "sphinx-build -b code_lint docs/src docs/build"
  112. gen-proto = [
  113. { cmd = "python -m grpc_tools.protoc --python_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --grpc_python_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --mypy_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --mypy_grpc_out=./packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos --proto_path ../protos/ agent_worker.proto --proto_path ../protos/ cloudevent.proto" },
  114. { script = "fixup_generated_files:main" }
  115. ]
  116. gen-proto-samples = "python -m grpc_tools.protoc --python_out=./samples/core_xlang_hello_python_agent/protos --grpc_python_out=./samples/core_xlang_hello_python_agent/protos --mypy_out=./samples/core_xlang_hello_python_agent/protos --mypy_grpc_out=./samples/core_xlang_hello_python_agent/protos --proto_path ../dotnet/src/Microsoft.AutoGen/Agents/protos/ agent_events.proto"
  117. [[tool.poe.tasks.gen-test-proto.sequence]]
  118. cmd = "python -m grpc_tools.protoc --python_out=./packages/autogen-core/tests/protos --grpc_python_out=./packages/autogen-core/tests/protos --mypy_out=./packages/autogen-core/tests/protos --mypy_grpc_out=./packages/autogen-core/tests/protos --proto_path ./packages/autogen-core/tests/protos serialization_test.proto"
  119. [[tool.poe.tasks.gen-test-proto.sequence]]
  120. cmd = "python -m grpc_tools.protoc --python_out=./packages/autogen-ext/tests/protos --grpc_python_out=./packages/autogen-ext/tests/protos --mypy_out=./packages/autogen-ext/tests/protos --mypy_grpc_out=./packages/autogen-ext/tests/protos --proto_path ./packages/autogen-core/tests/protos serialization_test.proto"
  121. [tool.pytest.ini_options]
  122. markers = [
  123. "grpc: tests invoking gRPC functionality",
  124. ]