chore: Format agent code (#1077)

This commit is contained in:
Fangyin Cheng
2024-01-17 10:26:48 +08:00
committed by GitHub
parent 74eb15e01c
commit 9bdb4f94b8
12 changed files with 56 additions and 54 deletions

View File

@@ -8,50 +8,62 @@ To contribute to this GitHub project, you can follow these steps:
```
git clone https://github.com/<YOUR-GITHUB-USERNAME>/DB-GPT
```
3. Install the project requirements
```
pip install -e ".[default]"
```
4. Install pre-commit hooks
```
pre-commit install
```
5. Create a new branch for your changes using the following command:
5. Create a new branch for your changes using the following command:
```
git checkout -b "branch-name"
```
6. Make your changes to the code or documentation.
- Example: Improve User Interface or Add Documentation.
7. Format the code using the following command:
```
make fmt
```
7. Add the changes to the staging area using the following command:
8. Add the changes to the staging area using the following command:
```
git add .
```
8. Commit the changes with a meaningful commit message using the following command:
9. Make sure the tests pass and your code lints using the following command:
```
make pre-commit
```
10. Commit the changes with a meaningful commit message using the following command:
```
git commit -m "your commit message"
```
9. Push the changes to your forked repository using the following command:
11. Push the changes to your forked repository using the following command:
```
git push origin branch-name
```
10. Go to the GitHub website and navigate to your forked repository.
12. Go to the GitHub website and navigate to your forked repository.
11. Click the "New pull request" button.
13. Click the "New pull request" button.
12. Select the branch you just pushed to and the branch you want to merge into on the original repository.
14. Select the branch you just pushed to and the branch you want to merge into on the original repository.
13. Add a description of your changes and click the "Create pull request" button.
15. Add a description of your changes and click the "Create pull request" button.
14. Wait for the project maintainer to review your changes and provide feedback.
16. Wait for the project maintainer to review your changes and provide feedback.
15. Make any necessary changes based on feedback and repeat steps 5-12 until your changes are accepted and merged into the main project.
17. Make any necessary changes based on feedback and repeat steps 5-12 until your changes are accepted and merged into the main project.
16. Once your changes are merged, you can update your forked repository and local copy of the repository with the following commands:
18. Once your changes are merged, you can update your forked repository and local copy of the repository with the following commands:
```
git fetch upstream