Skip to content

Commit f8d8d2f

Browse files
Update agents.md
1 parent fd33162 commit f8d8d2f

1 file changed

Lines changed: 59 additions & 41 deletions

File tree

AGENTS.md

Lines changed: 59 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,59 @@
1-
# Layout
2-
3-
The main directory of the repository contains the following folders:
4-
- `temporal-sdk`: This folder contains the SDK code.
5-
- `temporal-testing`: This folder contains the code for helping users test their workflows and activities.
6-
- `temporal-test-server`: This folder contains the code for the time skipping test server. This is an alternate implementation of the Temporal server that supports time skipping for fast testing.
7-
- `temporal-shaded`: This folder contains the code for the shaded Temporal SDK. This is a version of the SDK that is shaded to avoid dependency conflicts with other libraries.
8-
- `temporal-serviceclient`: This folder contains the code for the Temporal service client. This is a client that can be used to communicate with the Temporal server.
9-
- `temporal-sprintg-boot-autoconfigure`: This folder contains the code for the Spring Boot autoconfiguration. This is a library that can be used to automatically configure the Temporal SDK in a Spring Boot application.
10-
11-
# Guide
12-
13-
Generally we should not make any change to the signature of the public API. Classes or interfaces that in an `internal` folder are not considered public API.
14-
15-
# Language
16-
17-
The SDK should be written in Java using Java 8.
18-
19-
# Testing
20-
21-
To format code run:
22-
23-
```bash
24-
./gradlew --offline spotlessApply
25-
```
26-
27-
To test the SDK run:
28-
29-
```bash
30-
./gradlew :temporal-sdk:test --offline --tests "io.temporal.workflow.*"
31-
```
32-
33-
running all tests can take a long time
34-
35-
To test a new test you added run
36-
37-
```bash
38-
./gradlew :temporal-sdk:test --offline --tests "$TEST"
39-
```
40-
41-
where $TEST is the name of the test including the package.
1+
# Contributor Quickstart Guide
2+
3+
## Repository Layout
4+
- `temporal-sdk`: core SDK implementation.
5+
- `temporal-testing`: utilities to help write workflow and activity tests.
6+
- `temporal-test-server`: in-memory Temporal server for fast tests.
7+
- `temporal-serviceclient`: gRPC client for communicating with the service.
8+
- `temporal-shaded`: prepackaged version of the SDK with shaded dependencies.
9+
- `temporal-spring-boot-autoconfigure`: Spring Boot auto configuration.
10+
- `temporal-kotlin`: Kotlin DSL for the SDK.
11+
- `temporal-opentracing`: OpenTracing interceptor integration.
12+
-
13+
## General Guidance
14+
- Avoid changing public API signatures. Anything under an `internal` directory
15+
is not part of the public API and may change freely.
16+
- The SDK code is written for Java 8.
17+
18+
## Building and Testing
19+
1. Format the code before committing:
20+
```bash
21+
./gradlew --offline spotlessApply
22+
```
23+
2. Run the tests. A full build requires a local Temporal Server instance.
24+
```bash
25+
./gradlew test
26+
```
27+
To run only the core SDK tests or a single test:
28+
```bash
29+
./gradlew :temporal-sdk:test --offline --tests "io.temporal.workflow.*"
30+
./gradlew :temporal-sdk:test --offline --tests "<package.ClassName>"
31+
```
32+
3. Build the project:
33+
```bash
34+
./gradlew clean build
35+
```
36+
37+
## Tests
38+
- Tests use JUnit4 and are located under
39+
`temporal-sdk/src/test/java/io/temporal`.
40+
- Workflow API tests should rely on `SDKTestWorkflowRule` to create a worker and
41+
register workflows, activities, and nexus services.
42+
43+
## Commit Messages and Pull Requests
44+
- Follow the [Chris Beams](http://chris.beams.io/posts/git-commit/) style for
45+
commit messages.
46+
- Every pull request should answer:
47+
- **What changed?**
48+
- **Why?**
49+
- **Breaking changes?**
50+
- **Server PR** (if the change requires a coordinated server update)
51+
- Comments should be complete sentences and end with a period.
52+
53+
## Review Checklist
54+
- `./gradlew spotlessCheck` must pass.
55+
- All tests from `./gradlew test` must succeed.
56+
- Add new tests for any new feature or bug fix.
57+
- Update documentation for user facing changes.
58+
59+
For more details see `CONTRIBUTING.md` in the repository root.

0 commit comments

Comments
 (0)