Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add currentFuelPercent and currentRangeMeters to RentalVehichle in the GTFS GraphQL API #6272

Open
wants to merge 36 commits into
base: dev-2.x
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7fb3810
add currentFuelPercent to VehicleRentalVehicle and gtfs graphql API
JustCris654 Nov 5, 2024
b61c9f3
add currentRangeMeters to VehicleRentalVehicle and gtfs graphql API
JustCris654 Nov 22, 2024
1fa55b0
fix comment typo
JustCris654 Nov 22, 2024
4686f7c
use Distance class for currentRangeMeters
JustCris654 Dec 2, 2024
e93c828
add greater and less than methods for Distance
JustCris654 Dec 2, 2024
49c4682
Distance class tests
JustCris654 Dec 2, 2024
54292e2
represent currentRangeMeters with integer type
JustCris654 Dec 3, 2024
851c8b5
format RentalVehicleImpl file
JustCris654 Dec 3, 2024
d26799f
proper naming for static variables
JustCris654 Dec 3, 2024
e0bd36a
use Ratio scalar for currentFuelPercent
JustCris654 Dec 4, 2024
e9a572d
rename currentRangeMeters to currentRange
JustCris654 Dec 4, 2024
498d547
move conversion of Distance to-from meters to the api and gbfs mapping
JustCris654 Dec 4, 2024
eda75c8
remove unused code Distance class
JustCris654 Dec 4, 2024
3e7bf5b
group range and percent in fuel type
JustCris654 Dec 9, 2024
7d15f00
log warn if fuelPercent is invalid
JustCris654 Dec 9, 2024
9b9b585
check currentRangeMeters validity in free rental vehicle
JustCris654 Dec 11, 2024
c90bdd4
Ratio class
JustCris654 Dec 11, 2024
346449b
Ratio class for fuel percent validation
JustCris654 Dec 17, 2024
6edf98b
Ratio class and test format
JustCris654 Dec 17, 2024
0b1920d
fix check when range is required
JustCris654 Dec 17, 2024
54b0bc0
format GbfsFreeVehicleStatusMapper
JustCris654 Dec 17, 2024
f3e0a71
add range to scooter in GbfsFreeVehicleStatusMapperTest
JustCris654 Dec 17, 2024
26d8d7d
general fixes Ratio.java and Distance.java
JustCris654 Jan 7, 2025
4788055
RentalvehicleFuel properties docs comments
JustCris654 Jan 8, 2025
ff8411a
javadoc comment for Ratio class
JustCris654 Jan 9, 2025
6778169
check getCurrentFuelPercent null value and drop NPE
JustCris654 Jan 9, 2025
62e671f
Example on factory method with validation error handler passed in as …
t2gran Jan 9, 2025
f7d6b36
Cleanup Ratio implementation
t2gran Jan 9, 2025
4312caf
throttle invalid current fuel percent log
JustCris654 Jan 16, 2025
cd38992
Merge remote-tracking branch 'otp_master/pr-6272' into rentalVehicle_…
JustCris654 Jan 16, 2025
17a9d79
use Ratio refactor in tests
JustCris654 Jan 16, 2025
c941f62
Merge branch 'dev-2.x' into rentalVehicle_new_gbfs_fields
JustCris654 Jan 16, 2025
742bcd0
change distance value from meters to millimeters
JustCris654 Jan 21, 2025
c5a998d
factory method implementation for Distance
JustCris654 Jan 22, 2025
9e30029
expose Ratio and Distance from RentalVehicleFuel class
JustCris654 Jan 22, 2025
c00e615
Merge branch 'dev-2.x' into rentalVehicle_new_gbfs_fields
JustCris654 Jan 22, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class TestFreeFloatingRentalVehicleBuilder {

private double latitude = DEFAULT_LATITUDE;
private double longitude = DEFAULT_LONGITUDE;
private Ratio currentFuelPercent = new Ratio(DEFAULT_CURRENT_FUEL_PERCENT);
private Ratio currentFuelPercent = Ratio.of(DEFAULT_CURRENT_FUEL_PERCENT);
private Double currentRangeMeters = DEFAULT_CURRENT_RANGE_METERS;
private VehicleRentalSystem system = null;
private String network = NETWORK_1;
Expand All @@ -44,7 +44,7 @@ public TestFreeFloatingRentalVehicleBuilder withCurrentFuelPercent(
if (currentFuelPercent == null) {
this.currentFuelPercent = null;
} else {
this.currentFuelPercent = new Ratio(currentFuelPercent);
this.currentFuelPercent = Ratio.ofBoxed(currentFuelPercent, ignore -> {}).orElse(null);
JustCris654 marked this conversation as resolved.
Show resolved Hide resolved
}
return this;
}
Expand Down
Loading