Update gear type mappings and docs for consistency

Standardized gear type names in GEAR_ID_TO_NAME and GEAR_NAME_TO_ID, correcting typos and adding common variations. Updated the developer guide to reflect these changes and ensure consistency between code and documentation.
This commit is contained in:
João Vitória Silva
2025-08-01 14:49:51 +01:00
parent 89a4207480
commit 4447bced5a
2 changed files with 20 additions and 19 deletions

View File

@@ -13,7 +13,7 @@ GEAR_ID_TO_NAME = {
5: "ski",
6: "snowboard",
7: "windsurf",
8: "water spoards board",
8: "water_sports_board",
}
# Reverse gear type mapping, using the above-defined ID-to-name dictionary to create a name-to-ID dictionary
@@ -22,16 +22,18 @@ GEAR_NAME_TO_ID = {name.lower(): id for id, name in GEAR_ID_TO_NAME.items()}
# Space to add additional variations on gear names, for importing:
GEAR_NAME_TO_ID.update(
{
"bikes": 1,
"bike": 1,
"bicycle": 1,
"shoe": 2,
"shoes": 2,
"racket": 4,
"racquet": 4,
"ski": 5,
"skis": 5,
"wind surfboard": 7,
"wind surf board": 7,
"surfboard": 8,
"surf board": 8,
"paddle board": 8,
"snowboard": 6,
"windsurf": 7,
"water_sports_board": 8,
"surf_board": 8,
"stand_up_paddling_board": 8,
}
)

View File

@@ -152,7 +152,7 @@ The API is reachable under `/api/v1`. Below are some example endpoints. All endp
## Supported activity types
The table bellow details the activity types supported by Endurain. These values are defined programatically in backend/app/activities/activity/utils.py.
The table bellow details the activity types supported by Endurain.
| Name | Value |
| ---- | --- |
@@ -192,20 +192,19 @@ The table bellow details the activity types supported by Endurain. These values
## Supported gear types
The table bellow details the gear types supported by Endurain. These values are defined programatically in backend/app/gears/gear/utils.py.
The table bellow details the gear types supported by Endurain.
| Name | Value | Notes |
|--------------------|-------|-----------------------------------------|
| Bike | 1 | N/A |
| Shoes | 2 | N/A |
| Wetsuit | 3 | N/A |
| Racquet | 4 | N/A |
| Ski | 5 | N/A |
| Snowboard | 6 | N/A |
| Windsurf | 7 | N/A |
| Water sports board | 8 | Example: stand up paddle and surf board |
| bike | 1 | N/A |
| shoes | 2 | N/A |
| wetsuit | 3 | N/A |
| racquet | 4 | N/A |
| ski | 5 | N/A |
| snowboard | 6 | N/A |
| windsurf | 7 | N/A |
| water_sports_board | 8 | Example: stand up paddle and surf board |
All gear component types are defined programatically in backend/app/gears/gear_components/schema.py.
## Supported bike component gear types
The table bellow details the bike gear component types supported by Endurain: