This project welcomes and encourages all forms of contributions, including but not limited to:
Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
If you are new to GitHub here is a detailed help source on getting involved with development on GitHub.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct.
For more information see the Code of Conduct FAQ or
contact opencode@microsoft.com with any additional questions or comments.
When you submit an issue to GitHub, please do your best to
follow these guidelines! This will make it a lot easier to provide you with good
feedback:
The ideal bug report contains a short reproducible code snippet. This way
anyone can try to reproduce the bug easily (see this for more details). If your snippet is
longer than around 50 lines, please link to a gist or a GitHub repo.
If an exception is raised, please provide the full traceback.
Please include your operating system type and version number, as well as
your Python, autogen, scikit-learn versions. The version of autogen
can be found by running the following code snippet:
import autogen
print(autogen.__version__)
There is currently no formal reviewer solicitation process. Current reviewers identify reviewers from active contributors. If you are willing to become a reviewer, you are welcome to let us know on discord.
git clone https://github.com/microsoft/autogen.git
pip install -e autogen
We provide a simple Dockerfile.
docker build https://github.com/microsoft/autogen.git#main -t autogen-dev
docker run -it autogen-dev
If you use vscode, you can open the autogen folder in a Container.
We have provided the configuration in devcontainer. They can be used in GitHub codespace too. Developing AutoGen in dev containers is recommended.
Run pre-commit install to install pre-commit into your git hooks. Before you commit, run
pre-commit run to check if you meet the pre-commit requirements. If you use Windows (without WSL) and can't commit after installing pre-commit, you can run pre-commit uninstall to uninstall the hook. In WSL or Linux this is supposed to work.
Tests are automatically run via GitHub actions. There are two workflows:
The first workflow is required to pass for all PRs. The second workflow is required for changes that affect the openai tests. The second workflow requires approval to run. When writing tests that require openai, please use pytest.mark.skipif to make them run in one python version only when openai is installed. If additional dependency for this test is required, install the dependency in the corresponding python version in openai.yml.
Any code you commit should not decrease coverage. To run all unit tests, install the [test] option:
pip install -e."[test]"
coverage run -m pytest test
Then you can see the coverage report by
coverage report -m or coverage html.
To build and test documentation locally, install Node.js. For example,
nvm install --lts
Then:
npm install --global yarn # skip if you use the dev container we provided
pip install pydoc-markdown # skip if you use the dev container we provided
cd website
yarn install --frozen-lockfile --ignore-engines
pydoc-markdown
yarn start
The last command starts a local development server and opens up a browser window.
Most changes are reflected live without having to restart the server.
Note:
some tips in this guide are based off the contributor guide from flaml.