|
| 1 | +<!-- Copyright 2025 JD.com |
| 2 | +
|
| 3 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +you may not use this project except in compliance with the License. |
| 5 | +You may obtain a copy of the License at |
| 6 | +
|
| 7 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +
|
| 9 | +Unless required by applicable law or agreed to in writing, software |
| 10 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +See the License for the specific language governing permissions and |
| 13 | +limitations under the License. --> |
| 14 | + |
| 15 | +[English](./CONTRIBUTING.md) | [中文](./CONTRIBUTING_zh.md) |
| 16 | + |
| 17 | +# Contribute to OxyGent |
| 18 | + |
| 19 | +Our project welcomes contributions from developers and organizations from all over the world. Our project is dedicated to creating a multi-agent development platform for all users, so whether you are an expert in your field or a regular user of the project, we welcome you to participate in shaping the future of this project. You can get involved in the project in the following ways: |
| 20 | + |
| 21 | ++ Write / translate / fix our documentation |
| 22 | ++ Raise questions / Answer questions |
| 23 | ++ Provide demos, examples or test cases |
| 24 | ++ Give suggestions or other comments |
| 25 | ++ Paticipate in [issues](https://github.com/jd-opensource/OxyGent/issues) or [discussions](https://github.com/jd-opensource/OxyGent/discussions) |
| 26 | ++ Pull requests |
| 27 | ++ Sharing related research / application |
| 28 | ++ Any other ways to improve OxyGent |
| 29 | + |
| 30 | +For developers who want to contribute to our code, here is the guidance: |
| 31 | + |
| 32 | +## 1. Choose an issue to contribute |
| 33 | ++ Issues with label `PR welcome`, which means: |
| 34 | + + A reproducible bug |
| 35 | + + A function in plan |
| 36 | + |
| 37 | +## 2. Install environment for development |
| 38 | ++ We strongly suggest you to read our **[Document](http://oxygent.jd.com/docs/)** before developing |
| 39 | ++ For setting environment, please check our **[Readme file](/README.md)** |
| 40 | + |
| 41 | +## 3. Build our project |
| 42 | ++ You could run our demo to check whether the requirements are successfully installed: |
| 43 | +```bash |
| 44 | + python demo.py |
| 45 | +``` |
| 46 | +```bash |
| 47 | + python -m examples.agents.single_demo |
| 48 | +``` |
| 49 | + |
| 50 | +## 4. Test |
| 51 | +We provide some tests to check your code before pull request. |
| 52 | ++ Before testing, you should install `pytest`: |
| 53 | +```bash |
| 54 | + pip install pytest pytest-asyncio |
| 55 | +``` |
| 56 | ++ Format code: |
| 57 | +```bash |
| 58 | + ruff format . |
| 59 | + docformatter -r -i --wrap-summaries 88 --wrap-descriptions 88 oxygent/ |
| 60 | +``` |
| 61 | ++ Unit test: |
| 62 | +```bash |
| 63 | + pytest oxygent/test/unittest |
| 64 | +``` |
| 65 | ++ Integration test (Optional): |
| 66 | +```bash |
| 67 | + pytest oxygent/test/integration |
| 68 | +``` |
| 69 | +After the PR is submitted, we will format and test the code. |
| 70 | +Our tests are still far from perfect, so you are welcomed to add tests to our project! |
0 commit comments