Skip to content

Commit cb8370c

Browse files
authored
Merge branch 'master' into dependabot/github_actions/astral-sh/setup-uv-7.6.0
2 parents 65f8cb2 + 01d9055 commit cb8370c

File tree

13 files changed

+139
-96
lines changed

13 files changed

+139
-96
lines changed

.claude/settings.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
{
2-
"model": "claude-sonnet-4-6"
2+
"model": "claude-sonnet-4-6",
3+
"permissions": {
4+
"allow": [
5+
"Bash(gh issue:*)",
6+
"Bash(gh auth:*)",
7+
"Bash(uv run:*)",
8+
"Bash(source .venv/bin/activate)",
9+
"WebFetch(domain:github.com)",
10+
"WebFetch(domain:api.github.com)"
11+
]
12+
}
313
}

.coderabbit.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ reviews:
128128
- "!**/*.db"
129129
- "!**/*.db-shm"
130130
- "!**/*.db-wal"
131-
- "!**/assets/**"
132131
- "!**/postman_collections/**"
133132
- "!**/uv.lock"
134133

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ tests/ — pytest integration tests
4040
- **Async**: All routes and service functions must be `async def`; use `AsyncSession` (never `Session`); use `aiosqlite` (never `sqlite3`); use SQLAlchemy 2.0 `select()` (never `session.query()`)
4141
- **API contract**: camelCase JSON via Pydantic `alias_generator=to_camel`; Python internals stay snake_case
4242
- **Models**: `PlayerRequestModel` (no `id`, used for POST/PUT) and `PlayerResponseModel` (includes `id: UUID`, used for GET/POST responses); never use the removed `PlayerModel`
43-
- **Primary key**: UUID surrogate key (`id`) — opaque, internal, used for all CRUD operations. UUID v4 for API-created records; UUID v5 (deterministic) for migration-seeded records. `squad_number` is the natural key — human-readable, domain-meaningful, preferred lookup for external consumers
43+
- **Primary key**: UUID surrogate key (`id`) — opaque, internal, used for GET by id only. UUID v4 for API-created records; UUID v5 (deterministic) for migration-seeded records. `squad_number` is the natural key — human-readable, domain-meaningful, used for all mutation endpoints (PUT, DELETE) and preferred for all external consumers
4444
- **Caching**: cache key `"players"` (hardcoded); clear on POST/PUT/DELETE; `X-Cache` header (HIT/MISS)
4545
- **Errors**: Catch specific exceptions with rollback in services; Pydantic validation returns 422 (not 400)
4646
- **Logging**: `logging` module only; never `print()`

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ dmypy.json
160160
# Cython debug symbols
161161
cython_debug/
162162

163+
# Claude Code
164+
.claude/settings.local.json
165+
163166
# PyCharm
164167
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165168
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore

.markdownlint.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"MD013": false,
3+
"MD024": {
4+
"siblings_only": true
5+
}
6+
}

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,22 @@ This project uses famous football coaches as release codenames, following an A-Z
4444

4545
---
4646

47+
## [2.0.0 - Capello] - 2026-03-17
48+
49+
### Changed
50+
51+
- **BREAKING**: `PUT /players/{player_id}` replaced by `PUT /players/squadnumber/{squad_number}` — mutation endpoints now use Squad Number (natural key) instead of UUID (surrogate key), consistent with `GET /players/squadnumber/{squad_number}` (#521)
52+
- **BREAKING**: `DELETE /players/{player_id}` replaced by `DELETE /players/squadnumber/{squad_number}` — same rationale as above (#521)
53+
- `update_async` and `delete_async` (UUID-based) replaced by `update_by_squad_number_async` and `delete_by_squad_number_async` in `services/player_service.py` (#521)
54+
55+
### Fixed
56+
57+
- Removed stale `assets/` folder references from `Dockerfile`,
58+
`codecov.yml`, and `.coderabbit.yaml` after the folder was deleted
59+
when the README was migrated to Mermaid diagrams
60+
61+
---
62+
4763
## [1.1.0 - Bielsa] - 2026-03-02
4864

4965
### Added

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ LABEL org.opencontainers.image.source="https://github.com/nanotaboada/python-sam
4141

4242
# Copy metadata docs for container registries (e.g.: GitHub Container Registry)
4343
COPY README.md ./
44-
COPY assets/ ./assets/
4544

4645
# Copy pre-built wheels from builder
4746
COPY --from=builder /app/wheelhouse/ /app/wheelhouse/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ Interactive API documentation is available via Swagger UI at `http://localhost:9
184184
- `GET /players/{player_id}` — Get player by UUID (surrogate key)
185185
- `GET /players/squadnumber/{squad_number}` — Get player by squad number (natural key)
186186
- `POST /players/` — Create a new player
187-
- `PUT /players/{player_id}` — Update an existing player
188-
- `DELETE /players/{player_id}` — Remove a player
187+
- `PUT /players/squadnumber/{squad_number}` — Update an existing player
188+
- `DELETE /players/squadnumber/{squad_number}` — Remove a player
189189
- `GET /health` — Health check
190190

191191
### HTTP Requests

codecov.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ comment:
3939

4040
# https://docs.codecov.com/docs/ignoring-paths
4141
ignore:
42-
- "^assets/.*"
4342
- "^databases/.*"
4443
- "^models/.*"
4544
- "^rest/.*"

rest/players.rest

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
### https://marketplace.visualstudio.com/items?itemName=humao.rest-client
66
###
77
### Key design note:
8-
### squad_number = natural key (domain-meaningful, preferred for lookups)
9-
### id (UUID) = surrogate key (internal, opaque, used for CRUD operations)
8+
### squad_number = natural key (domain-meaningful, used for all CRUD operations)
9+
### id (UUID) = surrogate key (internal, opaque, used for GET by id only)
1010

1111
@baseUrl = http://localhost:9000
1212

@@ -68,12 +68,12 @@ GET {{baseUrl}}/players/squadnumber/10
6868
Accept: application/json
6969

7070
# ------------------------------------------------------------------------------
71-
# PUT /players/{player_id} — Update
72-
# Emiliano Martínez (squad 23): UUID v5, seeded by seed_001.
71+
# PUT /players/squadnumber/{squad_number} — Update
72+
# Emiliano Martínez (squad 23): seeded by seed_001.
7373
# ------------------------------------------------------------------------------
7474

75-
### PUT /players/{player_id} — Update an existing Player
76-
PUT {{baseUrl}}/players/b04965e6-a9bb-591f-8f8a-1adcb2c8dc39
75+
### PUT /players/squadnumber/{squad_number} — Update an existing Player
76+
PUT {{baseUrl}}/players/squadnumber/23
7777
Content-Type: application/json
7878

7979
{
@@ -90,15 +90,9 @@ Content-Type: application/json
9090
}
9191

9292
# ------------------------------------------------------------------------------
93-
# DELETE /players/{player_id} — Delete
94-
# Thiago Almada (squad 16): created by POST above. Since the UUID is generated
95-
# at runtime, retrieve it first via squad number, then substitute it below.
93+
# DELETE /players/squadnumber/{squad_number} — Delete
94+
# Thiago Almada (squad 16): created by POST above.
9695
# ------------------------------------------------------------------------------
9796

98-
### Step 1 — Look up Almada's UUID by squad number
99-
GET {{baseUrl}}/players/squadnumber/16
100-
Accept: application/json
101-
102-
### Step 2 — Delete Almada using the UUID returned above
103-
# Replace {player_id} with the id field from the response above.
104-
DELETE {{baseUrl}}/players/{player_id}
97+
### DELETE /players/squadnumber/{squad_number} — Delete an existing Player
98+
DELETE {{baseUrl}}/players/squadnumber/16

0 commit comments

Comments
 (0)