Repository navigation
Import Occupancy Status from GTFS-RT Vehicle Positions - #5372
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5372 +/- ##
=============================================
+ Coverage 66.60% 66.64% +0.04%
- Complexity 15279 15397 +118
=============================================
Files 1790 1794 +4
Lines 69364 69682 +318
Branches 7306 7345 +39
=============================================
+ Hits 46197 46437 +240
- Misses 20690 20757 +67
- Partials 2477 2488 +11
☔ View full report in Codecov by Sentry. |
|
Was it that we use the config change label only when we create breaking changes? I will try to avoid doing that here (just need to figure out how to set default for the features). |
|
We went through the renaming commit issues with @t2gran today and came to the conclusion that it's not worth it to recreate commits to avoid missing history as the problem was only affecting a few small files. |
|
This branch has conflicts. |
|
@sam-hickey-ibigroup You will be interested to hear that realtime occupancy information is coming to OTP. |
| * a module for the repository as well as the service. | ||
| */ | ||
| @Module | ||
| public interface RealtimeVehicleRepositoryModule { |
There was a problem hiding this comment.
Naming:
public interface RealtimeVehicleRepository {
There was a problem hiding this comment.
Hmm we already have a RealtimeVehicleRepository, this is a different class.
| * a module for the service without the repository, which is injected from the loading phase. | ||
| */ | ||
| @Module | ||
| public interface RealtimeVehicleServiceModule { |
There was a problem hiding this comment.
Rename:
public interface RealtimeVehicleService {
| List<T> dft = (defaultValues instanceof List<T>) | ||
| ? (List<T>) defaultValues | ||
| : List.copyOf(defaultValues); |
There was a problem hiding this comment.
I would put this into ListUtils (or create CollectionsUtils):
@Nullable
public static <T> toString(Collection<T> c) {
if(c == null) {
return null;
}
return ((c instanceof List<T> list) ? list : List.copyOf(defaultValues)).toString();
}
Note! This is also handling null. If we should return "[]" and not null is a matter of taste. Both will work here.
| * If vehicle/carriage is not in use / unavailable, or passengers are only allowed to alight due to e.g. crowding | ||
| * The vehicle or carriage is not accepting passengers. |
There was a problem hiding this comment.
Tip: If you do not want to maintain all this doc in multiple places you could use the DocumentedEnum interface.
Co-authored-by: Thomas Gran <t2gran@gmail.com>
…json/ParameterBuilder.java Co-authored-by: Thomas Gran <t2gran@gmail.com>
…ernal/DefaultRealtimeVehicleService.java Co-authored-by: Leonard Ehrenfried <mail@leonard.io>
leonardehrenfried
left a comment
There was a problem hiding this comment.
I think we want to also generate the documentation for the default values of enum sets but that can come in a separate PR.
Summary
Issue
closes #5364
Unit tests
Added
Documentation
Updated but might need slightly more
Changelog
From title