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.

CONTRIBUTING.md 7.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. # Contributing
  2. The project welcomes contributions from developers and organizations worldwide. Our goal is to foster a collaborative and inclusive community where diverse perspectives and expertise can drive innovation and enhance the project's capabilities. Whether you are an individual contributor or represent an organization, we invite you to join us in shaping the future of this project. Possible contributions include but not limited to:
  3. - Pushing patches.
  4. - Code review of pull requests.
  5. - Documentation, examples and test cases.
  6. - Readability improvement, e.g., improvement on docstr and comments.
  7. - Community participation in [issues](https://github.com/microsoft/autogen/issues), [discussions](https://github.com/microsoft/autogen/discussions), [twitter](https://twitter.com/pyautogen), and [Discord](https://aka.ms/autogen-discord).
  8. - Tutorials, blog posts, talks that promote the project.
  9. - Sharing application scenarios and/or related research.
  10. Most contributions require you to agree to a
  11. Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
  12. the rights to use your contribution. For details, visit <https://cla.opensource.microsoft.com>.
  13. If you are new to GitHub [here](https://help.github.com/categories/collaborating-with-issues-and-pull-requests/) is a detailed help source on getting involved with development on GitHub.
  14. When you submit a pull request, a CLA bot will automatically determine whether you need to provide
  15. a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
  16. provided by the bot. You will only need to do this once across all repos using our CLA.
  17. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
  18. For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
  19. contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
  20. ## Running CI checks locally
  21. It is important to use `uv` when running CI checks locally as it ensures that the correct dependencies and versions are used.
  22. Please follow the instructions [here](./python/README.md#setup) to get set up.
  23. For common tasks that are helpful during development and run in CI, see [here](./python/README.md#common-tasks).
  24. ## Roadmap
  25. We use GitHub issues and milestones to track our roadmap. You can view the upcoming milestones [here]([Roadmap Issues](https://aka.ms/autogen-roadmap).
  26. ## Versioning
  27. The set of `autogen-*` packages are generally all versioned together. When a change is made to one package, all packages are updated to the same version. This is to ensure that all packages are in sync with each other.
  28. We will update verion numbers according to the following rules:
  29. - Increase minor version (0.X.0) upon breaking changes
  30. - Increase patch version (0.0.X) upon new features or bug fixes
  31. ## Release process
  32. 1. Create a PR that updates the version numbers across the codebase ([example](https://github.com/microsoft/autogen/pull/4359))
  33. 2. The docs CI will fail for the PR, but this is expected and will be resolved in the next step
  34. 2. After merging the PR, create and push a tag that corresponds to the new verion. For example, for `0.4.0.dev13`:
  35. - `git tag v0.4.0.dev13 && git push origin v0.4.0.dev13`
  36. 3. Restart the docs CI by finding the failed [job corresponding to the `push` event](https://github.com/microsoft/autogen/actions/workflows/docs.yml) and restarting all jobs
  37. 4. Run [this](https://github.com/microsoft/autogen/actions/workflows/single-python-package.yml) workflow for each of the packages that need to be released and get an approval for the release for it to run
  38. ## Triage process
  39. To help ensure the health of the project and community the AutoGen committers have a weekly triage process to ensure that all issues and pull requests are reviewed and addressed in a timely manner. The following documents the responsibilites while on triage duty:
  40. - Issues
  41. - Review all new issues - these will be tagged with [`needs-triage`](https://github.com/microsoft/autogen/issues?q=is%3Aissue%20state%3Aopen%20label%3Aneeds-triage).
  42. - Apply appropriate labels:
  43. - One of `proj-*` labels based on the project the issue is related to
  44. - `documentation`: related to documentation
  45. - `x-lang`: related to cross language functionality
  46. - `dotnet`: related to .NET
  47. - Add the issue to a relevant milestone if necessary
  48. - If you can resolve the issue or reply to the OP please do.
  49. - If you cannot resolve the issue, assign it to the appropriate person.
  50. - If awaiting a reply add the tag `awaiting-op-response` (this will be auto removed when the OP replies).
  51. - Bonus: there is a backlog of old issues that need to be reviewed - if you have time, review these as well and close or refresh as many as you can.
  52. - PRs
  53. - The UX on GH flags all recently updated PRs. Draft PRs can be ignored, otherwise review all recently updated PRs.
  54. - If a PR is ready for review and you can provide one please go ahead. If you cant, please assign someone. You can quickly spin up a codespace with the PR to test it out.
  55. - If a PR is needing a reply from the op, please tag it `awaiting-op-response`.
  56. - If a PR is approved and passes CI, its ready to merge, please do so.
  57. - If it looks like there is a possibly transient CI failure, re-run failed jobs.
  58. - Discussions
  59. - Look for recently updated discussions and reply as needed or find someone on the team to reply.
  60. - Security
  61. - Look through any securty alerts and file issues or dismiss as needed.
  62. ## Becoming a Reviewer
  63. There is currently no formal reviewer solicitation process. Current reviewers identify reviewers from active contributors.
  64. ## What makes a good docstring?
  65. - Concise and to the point
  66. - Describe the expected contract/behavior of the function/class
  67. - Describe all parameters, return values, and exceptions
  68. - Provide an example if possible
  69. For example, this is the docstring for the [TypeSubscription](https://microsoft.github.io/autogen/dev/reference/python/autogen_core.html#autogen_core.TypeSubscription) class:
  70. ```python
  71. """This subscription matches on topics based on a prefix of the type and maps to agents using the source of the topic as the agent key.
  72. This subscription causes each source to have its own agent instance.
  73. Example:
  74. .. code-block:: python
  75. from autogen_core import TypePrefixSubscription
  76. subscription = TypePrefixSubscription(topic_type_prefix="t1", agent_type="a1")
  77. In this case:
  78. - A topic_id with type `t1` and source `s1` will be handled by an agent of type `a1` with key `s1`
  79. - A topic_id with type `t1` and source `s2` will be handled by an agent of type `a1` with key `s2`.
  80. - A topic_id with type `t1SUFFIX` and source `s2` will be handled by an agent of type `a1` with key `s2`.
  81. Args:
  82. topic_type_prefix (str): Topic type prefix to match against
  83. agent_type (str): Agent type to handle this subscription
  84. """
  85. ```
  86. ## Docs when adding a new API
  87. Now that 0.4.0 is out, we should ensure the docs between versions are easy to navigate. To this end, added or changed APIs should have the following added to their docstrings respectively:
  88. ```rst
  89. .. versionadded:: v0.4.1
  90. Here's a version added message.
  91. .. versionchanged:: v0.4.1
  92. Here's a version changed message.
  93. ```
  94. See [here](https://pydata-sphinx-theme.readthedocs.io/en/stable/examples/kitchen-sink/admonitions.html#versionadded) for how they are rendered.