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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. [tool.uv.workspace]
  2. members = ["packages/*"]
  3. [tool.uv]
  4. dev-dependencies = [
  5. "pyright==1.1.378",
  6. "mypy==1.10.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. ]
  21. [tool.uv.sources]
  22. autogen-core = { workspace = true }
  23. [tool.ruff]
  24. line-length = 120
  25. fix = true
  26. target-version = "py310"
  27. [tool.ruff.format]
  28. docstring-code-format = true
  29. [tool.ruff.lint]
  30. select = ["E", "F", "W", "B", "Q", "I", "ASYNC"]
  31. ignore = ["F401", "E501"]
  32. [tool.ruff.lint.flake8-tidy-imports]
  33. [tool.ruff.lint.flake8-tidy-imports.banned-api]
  34. "unittest".msg = "Use `pytest` instead."
  35. [tool.mypy]
  36. strict = true
  37. python_version = "3.10"
  38. ignore_missing_imports = true
  39. # from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
  40. disallow_untyped_defs = true
  41. no_implicit_optional = true
  42. check_untyped_defs = true
  43. warn_return_any = true
  44. show_error_codes = true
  45. warn_unused_ignores = false
  46. disallow_incomplete_defs = true
  47. disallow_untyped_decorators = true
  48. disallow_any_unimported = true
  49. [tool.pyright]
  50. include = ["src", "tests", "samples"]
  51. typeCheckingMode = "strict"
  52. reportUnnecessaryIsInstance = false
  53. reportMissingTypeStubs = false
  54. exclude = ["src/autogen_core/application/protos"]
  55. [tool.poe.tasks]
  56. fmt = "python run_task_in_pkgs_if_exist.py fmt"
  57. format.ref = "fmt"
  58. lint = "python run_task_in_pkgs_if_exist.py lint"
  59. pyright = "python run_task_in_pkgs_if_exist.py pyright"
  60. mypy = "python run_task_in_pkgs_if_exist.py mypy"
  61. test = "python run_task_in_pkgs_if_exist.py test"
  62. check = ["fmt", "lint", "pyright", "mypy", "test"]
  63. gen-proto = "python -m grpc_tools.protoc --python_out=./packages/autogen-core/src/autogen_core/application/protos --grpc_python_out=./packages/autogen-core/src/autogen_core/application/protos --mypy_out=./packages/autogen-core/src/autogen_core/application/protos --mypy_grpc_out=./packages/autogen-core/src/autogen_core/application/protos --proto_path ../protos/ agent_worker.proto --proto_path ../protos/ cloudevent.proto"