Skip to content

Commit 9619e74

Browse files
authored
docs: add contribution workflow (#3)
1 parent bc5bc65 commit 9619e74

3 files changed

Lines changed: 92 additions & 0 deletions

File tree

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @moonyue-w

‎.github/pull_request_template.md‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Summary
2+
3+
<!-- What changed? -->
4+
5+
## Why
6+
7+
<!-- Why is this change needed? -->
8+
9+
## Verification
10+
11+
- [ ] `uv run make lint`
12+
- [ ] `uv run make typecheck`
13+
- [ ] `uv run make test`
14+
- [ ] `uv run make docs-check`
15+
- [ ] Example `--help` smoke checks
16+
- [ ] Account-backed integration tests run, or not required
17+
18+
Commands and results:
19+
20+
```text
21+
22+
```
23+
24+
## Impact
25+
26+
- [ ] Public API or behavior changed
27+
- [ ] Synchronous and asynchronous clients remain aligned
28+
- [ ] Generated API documentation updated
29+
- [ ] Contract fixtures updated
30+
- [ ] Go and TypeScript parity considered
31+
- [ ] Migration notes added for a breaking change
32+
- [ ] No credentials, `.env.live`, logs, or generated test output committed
33+
34+
Additional context:
35+
36+
<!-- Link related issues/PRs and explain any unchecked item. -->

‎CONTRIBUTING.md‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing
2+
3+
Thank you for contributing to the Qoder Cloud Agents Python SDK.
4+
5+
## Development workflow
6+
7+
1. Create a focused branch from the latest `main`.
8+
2. Keep each pull request limited to one independently reviewable change.
9+
3. Use Conventional Commits, for example `fix(forward): preserve request id`.
10+
4. Open a pull request and wait for all required checks before merging.
11+
12+
GitHub `main` is the source of truth. Do not develop against or copy changes from the internal CI mirror.
13+
14+
## Setup and checks
15+
16+
Python 3.10 or newer is supported. Python 3.12 is used for deterministic documentation generation.
17+
18+
```bash
19+
python3 -m pip install uv
20+
uv sync --extra dev --locked
21+
uv run make lint
22+
uv run make typecheck
23+
uv run make test
24+
uv run make docs-check
25+
```
26+
27+
The default test command excludes account-backed integration tests and must not require network access or credentials.
28+
29+
## Test layers
30+
31+
- **Unit and contract tests** live under `tests/` and run with `uv run make test`.
32+
- **Integration tests** live under `tests/integration/` and must not import implementation from `examples/`. Copy `.env.live.example` to `.env.live`, use a dedicated test account, and run `uv run make test-live-all`.
33+
- **Examples** are runnable documentation. Tests must not import from `examples/`; use each example's `--help` mode for a no-network smoke check.
34+
35+
Never commit `.env.live`, tokens, credentials, generated logs, or test output. Integration scenarios must register cleanup immediately after creating a resource. Run them explicitly with `QODER_RUN_LIVE=1`; they are not part of public pull-request CI.
36+
37+
## API and contract changes
38+
39+
When adding or changing an endpoint:
40+
41+
1. Update the relevant modules under `src/qca/forward/` or `src/qca/managed/` and their public types.
42+
2. Add focused contract expectations under `tests/`; do not derive the expected contract solely from the implementation under test.
43+
3. Cover synchronous and asynchronous clients where both expose the behavior.
44+
4. Regenerate API documentation with `uv run make docs` and verify it with `uv run make docs-check`.
45+
5. Call out the corresponding Go and TypeScript work in the pull request, or explain why the change is language-specific.
46+
47+
Contract fixtures are maintained manually. A passing fixture test proves consistency with this repository, not automatically with service routes or the other SDKs.
48+
49+
## Compatibility conventions
50+
51+
The SDK intentionally keeps Qoder-branded `X-Qoder-*` metadata headers, resumable session-event streams, and Python-native synchronous and asynchronous clients. Preserve those extensions unless the change explicitly revises the public contract. Breaking public API changes require a minor-version release while the SDK remains pre-1.0 and must include migration notes.
52+
53+
## Pull requests
54+
55+
Complete the pull request template, include exact verification commands and results, and identify public API, documentation, integration-test, and cross-SDK effects. Do not combine unrelated refactors with behavior changes.

0 commit comments

Comments
 (0)