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.3 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. [tool.uv.workspace]
  2. members = ["packages/*"]
  3. [tool.uv]
  4. dev-dependencies = [
  5. "pyright==1.1.389",
  6. "mypy==1.13.0",
  7. "ruff==0.4.8",
  8. "pytest",
  9. "pytest-asyncio",
  10. "pytest-xdist",
  11. "typer",
  12. "rich",
  13. "polars",
  14. "pytest_mock",
  15. "poethepoet",
  16. "packaging",
  17. "grpcio-tools~=1.62.0",
  18. "mypy-protobuf",
  19. "cookiecutter",
  20. "poethepoet",
  21. "tomli",
  22. ]
  23. [tool.uv.sources]
  24. autogen-core = { workspace = true }
  25. autogen-ext = { workspace = true }
  26. autogen-agentchat = { workspace = true }
  27. autogen-test-utils = { workspace = true }
  28. [tool.ruff]
  29. line-length = 120
  30. fix = true
  31. target-version = "py310"
  32. [tool.ruff.format]
  33. docstring-code-format = true
  34. [tool.ruff.lint]
  35. select = ["E", "F", "W", "B", "Q", "I", "ASYNC", "T20"]
  36. ignore = ["F401", "E501"]
  37. [tool.ruff.lint.flake8-tidy-imports]
  38. [tool.ruff.lint.flake8-tidy-imports.banned-api]
  39. "unittest".msg = "Use `pytest` instead."
  40. [tool.mypy]
  41. strict = true
  42. python_version = "3.10"
  43. ignore_missing_imports = true
  44. # from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
  45. disallow_untyped_defs = true
  46. no_implicit_optional = true
  47. check_untyped_defs = true
  48. warn_return_any = true
  49. show_error_codes = true
  50. warn_unused_ignores = false
  51. disallow_incomplete_defs = true
  52. disallow_untyped_decorators = true
  53. disallow_any_unimported = true
  54. [tool.pyright]
  55. include = ["src", "tests", "samples"]
  56. typeCheckingMode = "strict"
  57. reportUnnecessaryIsInstance = false
  58. reportMissingTypeStubs = false
  59. [tool.poe.tasks]
  60. fmt = "python run_task_in_pkgs_if_exist.py fmt"
  61. format.ref = "fmt"
  62. lint = "python run_task_in_pkgs_if_exist.py lint"
  63. pyright = "python run_task_in_pkgs_if_exist.py pyright"
  64. mypy = "python run_task_in_pkgs_if_exist.py mypy"
  65. test = "python run_task_in_pkgs_if_exist.py test"
  66. check = ["fmt", "lint", "pyright", "mypy", "test"]
  67. 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"
  68. gen-proto-samples = "python -m grpc_tools.protoc --python_out=./packages/autogen-core/samples/protos --grpc_python_out=./packages/autogen-core/samples/protos --mypy_out=./packages/autogen-core/samples/protos --mypy_grpc_out=./packages/autogen-core/samples/protos --proto_path ../protos/ agent_events.proto"
  69. teasdst = { cmd = "sphinx-build docs/src docs/build" }
  70. [[tool.poe.tasks.gen-test-proto.sequence]]
  71. 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"
  72. [[tool.poe.tasks.gen-test-proto.sequence]]
  73. 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"