Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

All notable changes to this project will be documented in this file.

## [2.0.0] - 2026-07-20

### Breaking Changes

- **Removed legacy API endpoints** (`/wtk/*` and `/era5/*`). These routes were deprecated in v1 and have now been removed.
- Migrate to the unified `/v1/{model}/` endpoints. See the [Migration Guide](docs/06-migration.md).

### Changed

- API version bumped from `1.0.0` to `2.0.0`.
- Removed orphaned controller files: `wtk_data_controller.py`, `era5_data_controller.py`.

---

## [1.0.0] - Initial release

- Introduced unified `/v1/{model}/` API endpoints.
- Legacy model-specific routes (`/wtk/*`, `/era5/*`) marked deprecated.
- Supported models: `era5-quantiles`, `era5-timeseries`, `wtk-timeseries`, `ensemble-quantiles`.
12 changes: 12 additions & 0 deletions docs/03-backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,15 @@ pytest
## API Documentation

When the app is running, visit `/docs` (e.g., `http://localhost:8080/docs`) to see the auto-generated Swagger UI.

### API Endpoints

All endpoints are under the `/api/v1/{model}/` prefix.

| Endpoint | Description |
|---|---|
| `GET /api/v1/{model}/windspeed` | Wind speed data |
| `GET /api/v1/{model}/production` | Energy production estimates |
| `GET /api/v1/{model}/timeseries` | Raw timeseries downloads |

**Supported models**: `era5-quantiles`, `era5-timeseries`, `wtk-timeseries`, `ensemble-quantiles`
34 changes: 34 additions & 0 deletions docs/06-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# API Migration Guide: Legacy --> v1

The legacy model-specific endpoints (`/wtk/*`, `/era5/*`) were removed in API v2.0.0. All functionality is available through the unified v1 API.

For full endpoint details and parameters, see the **interactive API docs** at `/api/docs` when the app is running.

## Route Structure

```
Legacy: /api/wtk/<endpoint> → /api/v1/wtk-timeseries/<endpoint>
Legacy: /api/era5/<endpoint> → /api/v1/era5-quantiles/<endpoint>
```

## Endpoint Mapping

| Legacy | v1 Equivalent |
|---|---|
| `GET /api/wtk/windspeed` | `GET /api/v1/wtk-timeseries/windspeed` |
| `GET /api/wtk/energy-production` | `GET /api/v1/wtk-timeseries/production` |
| `GET /api/wtk/download-csv` | `GET /api/v1/wtk-timeseries/timeseries` |
| `POST /api/wtk/download-csv-batch` | `POST /api/v1/wtk-timeseries/timeseries/batch` |
| `GET /api/wtk/nearest-locations` | `GET /api/v1/wtk-timeseries/grid-points` |
| `GET /api/wtk/available-powercurves` | `GET /api/v1/turbines` |
| `GET /api/era5/windspeed` | `GET /api/v1/era5-quantiles/windspeed` |
| `GET /api/era5/production` | `GET /api/v1/era5-quantiles/production` |
| `GET /api/era5/timeseries` | `GET /api/v1/era5-timeseries/timeseries` |
| `POST /api/era5/timeseries/batch` | `POST /api/v1/era5-timeseries/timeseries/batch` |
| `GET /api/era5/grid-points` | `GET /api/v1/era5-quantiles/grid-points` |
| `GET /api/era5/powercurves` | `GET /api/v1/turbines` |

## Notable Changes

- **Period** — path-based period (e.g. `/windspeed/{avg_type}`) is now a query parameter: `?period=`.
- **Turbine** — the `powercurve` query parameter is deprecated and the renamed and recommended query parameter is `turbine`.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Welcome to the WindWatts documentation.
3. [Backend Guide](03-backend.md) - API development.
4. [Frontend Guide](04-frontend.md) - UI development.
5. [Deployment](05-deployment.md) - Production deployment.
6. [Migration Guide](06-migration.md) - Migrating from legacy API endpoints to v1.

## Contributing

Expand Down
Loading