Standardize provider configuration structure
Issue Description
Currently, each provider (STIB, De Lijn, BKK) uses slightly different methods and structures for configuring monitored lines and stops. This inconsistency makes the system harder to maintain and configure.
Current State
-
STIB:
- Uses
STIB_STOPS with complex nested structure for lines and directions
- Has both legacy and new configuration formats
-
De Lijn:
- Uses simple
STOP_IDS list
- Separate
MONITORED_LINES list
-
BKK:
- Uses
STOP_IDS list
- Uses
MONITORED_LINES list
- Has additional provider-specific fields
Proposed Solution
Create a standardized configuration structure for all providers:
PROVIDER_CONFIG = {
'provider_name': {
'stops': [
{
'id': 'stop_id',
'name': 'stop_name', # Optional
'lines': { # Optional
'line_id': ['destination1', 'destination2']
},
'direction': 'direction' # Optional
}
],
'monitored_lines': ['line_id1', 'line_id2'], # Optional
'provider_specific': { # For any provider-specific settings
'key': 'value'
}
}
}
Implementation Steps
- Create migration scripts for each provider
- Update configuration loading code
- Update documentation
- Add validation for the new structure
- Deprecate old configuration formats
Success Criteria
- Single, consistent configuration format for all providers
- Clear documentation for users
- Backward compatibility or clear migration path
- Validation for configuration format
Standardize provider configuration structure
Issue Description
Currently, each provider (STIB, De Lijn, BKK) uses slightly different methods and structures for configuring monitored lines and stops. This inconsistency makes the system harder to maintain and configure.
Current State
STIB:
STIB_STOPSwith complex nested structure for lines and directionsDe Lijn:
STOP_IDSlistMONITORED_LINESlistBKK:
STOP_IDSlistMONITORED_LINESlistProposed Solution
Create a standardized configuration structure for all providers:
Implementation Steps
Success Criteria