Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,43 @@ Before submitting a pull request, please ensure your changes pass linting and un
```bash
ruff check .
```
- **Testing:** We use [Pytest](https://docs.pytest.org/) for unit tests. Run them with:
- **Unit tests:** We use [Pytest](https://docs.pytest.org/) for unit tests. Run them with:

```bash
pytest
```

- **E2E tests:** End-to-end tests run real workloads against a GKE cluster. They live in `tests/e2e/` and are skipped by default unless explicitly enabled.

**Prerequisites:**
- A GCP project with a provisioned GKE cluster (see [Quick Start](../README.md#quick-start))
- Google Cloud SDK authenticated (`gcloud auth login` and `gcloud auth application-default login`)
- GKE credentials configured: `gcloud container clusters get-credentials <cluster> --zone <zone> --project <project>`
- Test dependencies installed: `pip install -e ".[test,cli]"`

**Required environment variables:**

| Variable | Required | Default | Description |
| ---------------------- | -------- | --------------- | ------------------------------ |
| `E2E_TESTS` | Yes || Set to `1` to enable e2e tests |
| `KERAS_REMOTE_PROJECT` | Yes || Google Cloud project ID |
| `KERAS_REMOTE_ZONE` | No | `us-central1-a` | GKE cluster zone |
| `KERAS_REMOTE_CLUSTER` | No | `keras-remote` | GKE cluster name |

**Run all e2e tests:**

```bash
E2E_TESTS=1 KERAS_REMOTE_PROJECT=my-project python -m pytest tests/e2e/ -v -n auto
```

**Run a specific test file:**

```bash
E2E_TESTS=1 KERAS_REMOTE_PROJECT=my-project python -m pytest tests/e2e/cpu_execution_test.py -v
```

Drop `-n auto` to run tests serially to make it easier to debug.

### Submitting changes

1. Fork the repository
Expand Down
Loading