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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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.62.0",
  17. "mypy-protobuf",
  18. "cookiecutter",
  19. "poethepoet",
  20. "tomli",
  21. "tomli-w",
  22. "chainlit",
  23. ]
  24. [tool.uv.workspace]
  25. members = ["packages/*"]
  26. [tool.uv.sources]
  27. agbench = { workspace = true }
  28. autogen-agentchat = { workspace = true }
  29. autogen-core = { workspace = true }
  30. autogen-ext = { workspace = true }
  31. autogen-magentic-one = { workspace = true }
  32. autogen-test-utils = { workspace = true }
  33. autogenstudio = { workspace = true }
  34. component-schema-gen = { workspace = true }
  35. magentic-one-cli = { workspace = true }
  36. [tool.ruff]
  37. line-length = 120
  38. fix = true
  39. target-version = "py310"
  40. [tool.ruff.format]
  41. docstring-code-format = true
  42. [tool.ruff.lint]
  43. select = ["E", "F", "W", "B", "Q", "I", "ASYNC", "T20"]
  44. ignore = ["F401", "E501"]
  45. [tool.ruff.lint.flake8-tidy-imports]
  46. [tool.ruff.lint.flake8-tidy-imports.banned-api]
  47. "unittest".msg = "Use `pytest` instead."
  48. [tool.mypy]
  49. strict = true
  50. python_version = "3.10"
  51. ignore_missing_imports = true
  52. # from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
  53. disallow_untyped_defs = true
  54. no_implicit_optional = true
  55. check_untyped_defs = true
  56. warn_return_any = true
  57. show_error_codes = true
  58. warn_unused_ignores = false
  59. disallow_incomplete_defs = true
  60. disallow_untyped_decorators = true
  61. disallow_any_unimported = true
  62. [tool.pyright]
  63. include = ["src", "tests", "samples"]
  64. exclude = ["samples/core_xlang_hello_python_agent/protos"]
  65. typeCheckingMode = "strict"
  66. reportUnnecessaryIsInstance = false
  67. reportMissingTypeStubs = false
  68. [tool.poe.tasks]
  69. fmt = "python run_task_in_pkgs_if_exist.py fmt"
  70. format.ref = "fmt"
  71. lint = "python run_task_in_pkgs_if_exist.py lint"
  72. pyright = "python run_task_in_pkgs_if_exist.py pyright"
  73. mypy = "python run_task_in_pkgs_if_exist.py mypy"
  74. test = "python run_task_in_pkgs_if_exist.py test"
  75. coverage = "python run_task_in_pkgs_if_exist.py coverage"
  76. markdown-code-lint = """python check_md_code_blocks.py ../README.md ./packages/autogen-core/docs/src/**/*.md"""
  77. samples-code-check = """pyright ./samples"""
  78. check = ["fmt", "lint", "pyright", "mypy", "coverage", "markdown-code-lint", "samples-code-check"]
  79. gen-proto = "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"
  80. 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 ../protos/ agent_events.proto"
  81. [[tool.poe.tasks.gen-test-proto.sequence]]
  82. 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"
  83. [[tool.poe.tasks.gen-test-proto.sequence]]
  84. 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"