Skip to content

Commit 8174a29

Browse files
hangfeicopybara-github
authored andcommitted
chore: update contribution guide
PiperOrigin-RevId: 804985449
1 parent a645580 commit 8174a29

File tree

1 file changed

+100
-78
lines changed

1 file changed

+100
-78
lines changed

CONTRIBUTING.md

Lines changed: 100 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,24 @@
22

33
We'd love to accept your patches and contributions to this project.
44

5-
- [How to contribute](#how-to-contribute)
6-
- [Before you begin](#before-you-begin)
7-
- [Sign our Contributor License Agreement](#sign-our-contributor-license-agreement)
8-
- [Review our community guidelines](#review-our-community-guidelines)
9-
- [Contribution workflow](#contribution-workflow)
10-
- [Finding Issues to Work On](#finding-issues-to-work-on)
11-
- [Requirement for PRs](#requirement-for-prs)
12-
- [Large or Complex Changes](#large-or-complex-changes)
13-
- [Testing Requirements](#testing-requirements)
14-
- [Unit Tests](#unit-tests)
15-
- [Manual End-to-End (E2E) Tests](#manual-end-to-end-e2e-tests)
16-
- [Documentation](#documentation)
17-
- [Development Setup](#development-setup)
18-
- [Code reviews](#code-reviews)
19-
20-
21-
# Before you begin
22-
23-
## Sign our Contributor License Agreement
5+
- [How to contribute](#how-to-contribute)
6+
- [Before you begin](#before-you-begin)
7+
- [Sign our Contributor License Agreement](#sign-our-contributor-license-agreement)
8+
- [Review our community guidelines](#review-our-community-guidelines)
9+
- [Contribution workflow](#contribution-workflow)
10+
- [Finding Issues to Work On](#finding-issues-to-work-on)
11+
- [Requirement for PRs](#requirement-for-prs)
12+
- [Large or Complex Changes](#large-or-complex-changes)
13+
- [Testing Requirements](#testing-requirements)
14+
- [Unit Tests](#unit-tests)
15+
- [Manual End-to-End (E2E) Tests](#manual-end-to-end-e2e-tests)
16+
- [Documentation](#documentation)
17+
- [Development Setup](#development-setup)
18+
- [Code reviews](#code-reviews)
19+
20+
## Before you begin
21+
22+
### Sign our Contributor License Agreement
2423

2524
Contributions to this project must be accompanied by a
2625
[Contributor License Agreement](https://cla.developers.google.com/about) (CLA).
@@ -34,73 +33,102 @@ was for a different project), you probably don't need to do it again.
3433
Visit <https://cla.developers.google.com/> to see your current agreements or to
3534
sign a new one.
3635

37-
## Review our community guidelines
36+
### Review our community guidelines
3837

3938
This project follows
4039
[Google's Open Source Community Guidelines](https://opensource.google/conduct/).
4140

42-
# Contribution workflow
41+
### Code reviews
4342

44-
## Finding Issues to Work On
43+
All submissions, including submissions by project members, require review. We
44+
use GitHub pull requests for this purpose. Consult
45+
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
46+
information on using pull requests.
4547

46-
- Browse issues labeled **`good first issue`** (newcomer-friendly) or **`help wanted`** (general contributions).
47-
- For other issues, please kindly ask before contributing to avoid duplication.
48+
## Contribution workflow
4849

50+
### Finding Issues to Work On
4951

50-
## Requirement for PRs
52+
- Browse issues labeled **`good first issue`** (newcomer-friendly) or **`help
53+
wanted`** (general contributions).
54+
- For other issues, please kindly ask before contributing to avoid
55+
duplication.
5156

52-
- All PRs, other than small documentation or typo fixes, should have a Issue associated. If not, please create one.
53-
- Small, focused PRs. Keep changes minimal—one concern per PR.
54-
- For bug fixes or features, please provide logs or screenshot after the fix is applied to help reviewers better understand the fix.
55-
- Please include a `testing plan` section in your PR to talk about how you will test. This will save time for PR review. See `Testing Requirements` section for more details.
57+
### Requirement for PRs
5658

57-
## Large or Complex Changes
58-
For substantial features or architectural revisions:
59+
- All PRs, other than small documentation or typo fixes, should have a Issue
60+
associated. If not, please create one.
61+
- Small, focused PRs. Keep changes minimal—one concern per PR.
62+
- For bug fixes or features, please provide logs or screenshot after the fix
63+
is applied to help reviewers better understand the fix.
64+
- Please include a `testing plan` section in your PR to talk about how you
65+
will test. This will save time for PR review. See `Testing Requirements`
66+
section for more details.
5967

60-
- Open an Issue First: Outline your proposal, including design considerations and impact.
61-
- Gather Feedback: Discuss with maintainers and the community to ensure alignment and avoid duplicate work
68+
### Large or Complex Changes
6269

63-
## Testing Requirements
70+
For substantial features or architectural revisions:
71+
72+
- Open an Issue First: Outline your proposal, including design considerations
73+
and impact.
74+
- Gather Feedback: Discuss with maintainers and the community to ensure
75+
alignment and avoid duplicate work
6476

65-
To maintain code quality and prevent regressions, all code changes must include comprehensive tests and verifiable end-to-end (E2E) evidence.
77+
### Testing Requirements
6678

79+
To maintain code quality and prevent regressions, all code changes must include
80+
comprehensive tests and verifiable end-to-end (E2E) evidence.
6781

68-
### Unit Tests
82+
#### Unit Tests
6983

70-
Please add or update unit tests for your change. Please include a summary of passed `pytest` results.
84+
Please add or update unit tests for your change. Please include a summary of
85+
passed `pytest` results.
7186

7287
Requirements for unit tests:
7388

74-
- **Coverage:** Cover new features, edge cases, error conditions, and typical use cases.
75-
- **Location:** Add or update tests under `tests/unittests/`, following existing naming conventions (e.g., `test_<module>_<feature>.py`).
76-
- **Framework:** Use `pytest`. Tests should be:
77-
- Fast and isolated.
78-
- Written clearly with descriptive names.
79-
- Free of external dependencies (use mocks or fixtures as needed).
80-
- **Quality:** Aim for high readability and maintainability; include docstrings or comments for complex scenarios.
89+
- **Coverage:** Cover new features, edge cases, error conditions, and typical
90+
use cases.
91+
- **Location:** Add or update tests under `tests/unittests/`, following
92+
existing naming conventions (e.g., `test_<module>_<feature>.py`).
93+
- **Framework:** Use `pytest`. Tests should be:
94+
- Fast and isolated.
95+
- Written clearly with descriptive names.
96+
- Free of external dependencies (use mocks or fixtures as needed).
97+
- **Quality:** Aim for high readability and maintainability; include
98+
docstrings or comments for complex scenarios.
8199

82-
### Manual End-to-End (E2E) Tests
100+
#### Manual End-to-End (E2E) Tests
83101

84-
Manual E2E tests ensure integrated flows work as intended. Your tests should cover all scenarios. Sometimes, it's also good to ensure relevant functionality is not impacted.
102+
Manual E2E tests ensure integrated flows work as intended. Your tests should
103+
cover all scenarios. Sometimes, it's also good to ensure relevant functionality
104+
is not impacted.
85105

86106
Depending on your change:
87107

88-
- **ADK Web:**
89-
- Use the `adk web` to verify functionality.
90-
- Capture and attach relevant screenshots demonstrating the UI/UX changes or outputs.
91-
- Label screenshots clearly in your PR description.
108+
- **ADK Web:**
109+
110+
- Use the `adk web` to verify functionality.
111+
- Capture and attach relevant screenshots demonstrating the UI/UX changes
112+
or outputs.
113+
- Label screenshots clearly in your PR description.
92114

93-
- **Runner:**
94-
- Provide the testing setup. For example, the agent definition, and the runner setup.
95-
- Execute the `runner` tool to reproduce workflows.
96-
- Include the command used and console output showing test results.
97-
- Highlight sections of the log that directly relate to your change.
115+
- **Runner:**
98116

99-
## Documentation
117+
- Provide the testing setup. For example, the agent definition, and the
118+
runner setup.
119+
- Execute the `runner` tool to reproduce workflows.
120+
- Include the command used and console output showing test results.
121+
- Highlight sections of the log that directly relate to your change.
100122

101-
For any changes that impact user-facing documentation (guides, API reference, tutorials), please open a PR in the [adk-docs](https://github.com/google/adk-docs) repository to update relevant part before or alongside your code PR.
123+
### Documentation
124+
125+
For any changes that impact user-facing documentation (guides, API reference,
126+
tutorials), please open a PR in the
127+
[adk-docs](https://github.com/google/adk-docs) repository to update relevant
128+
part before or alongside your code PR.
102129

103130
## Development Setup
131+
104132
1. **Clone the repository:**
105133

106134
```shell
@@ -110,11 +138,13 @@ For any changes that impact user-facing documentation (guides, API reference, tu
110138

111139
2. **Install uv:**
112140

113-
Check out [uv installation guide](https://docs.astral.sh/uv/getting-started/installation/).
141+
Check out
142+
[uv installation guide](https://docs.astral.sh/uv/getting-started/installation/).
114143

115144
3. **Create and activate a virtual environment:**
116145

117-
**NOTE**: ADK supports Python 3.9+. Python 3.11 and above is strongly recommended.
146+
**NOTE**: ADK supports Python 3.9+. Python 3.11 and above is strongly
147+
recommended.
118148

119149
Create a workspace venv using uv.
120150

@@ -128,10 +158,7 @@ For any changes that impact user-facing documentation (guides, API reference, tu
128158
source .venv/bin/activate
129159
```
130160

131-
**windows**
132-
```shell
133-
source .\.venv\Scripts\activate
134-
```
161+
**windows** `shell source .\.venv\Scripts\activate`
135162

136163
4. **Install dependencies:**
137164

@@ -147,7 +174,7 @@ For any changes that impact user-facing documentation (guides, API reference, tu
147174
pytest ./tests/unittests
148175
```
149176

150-
NOTE: for accurate repro of test failure, only include `test`, `eval` and
177+
NOTE: for accurate repro of test failure, only include `test`, `eval` and
151178
`a2a` as extra dependencies.
152179

153180
```shell
@@ -164,14 +191,14 @@ For any changes that impact user-facing documentation (guides, API reference, tu
164191
./autoformat.sh
165192
```
166193

167-
7. **Build the wheel file:**
194+
7. **Build the wheel file:**
168195

169196
```shell
170197
uv build
171198
```
172199

173-
8. **Test the locally built wheel file:**
174-
Have a simple testing folder setup as mentioned in the
200+
8. **Test the locally built wheel file:** Have a simple testing folder setup as
201+
mentioned in the
175202
[quickstart](https://google.github.io/adk-docs/get-started/quickstart/).
176203

177204
Then following below steps to test your changes:
@@ -200,16 +227,11 @@ For any changes that impact user-facing documentation (guides, API reference, tu
200227

201228
## Contributing Resources
202229

203-
[Contributing folder](https://github.com/google/adk-python/tree/main/contributing) has resources that is helpful for contributors.
204-
205-
206-
## Code reviews
207-
208-
All submissions, including submissions by project members, require review. We
209-
use GitHub pull requests for this purpose. Consult
210-
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
211-
information on using pull requests.
230+
[Contributing folder](https://github.com/google/adk-python/tree/main/contributing)
231+
has resources that is helpful for contributors.
212232

213-
# Vibe Coding
233+
## Vibe Coding
214234

215-
If you want to contribute by leveraging viber coding, the AGENTS.md (https://github.com/google/adk-python/tree/main/AGENTS.md) could be used as context to your LLM.
235+
If you want to contribute by leveraging viber coding, the AGENTS.md
236+
(https://github.com/google/adk-python/tree/main/AGENTS.md) could be used as
237+
context to your LLM.

0 commit comments

Comments
 (0)