pledge4future/WePledge

Bug Collection Emission Planner Endpoint

Opened this issue · 3 comments

This is a bug collection issue of the status quo of the emission planner backend endpoint.


Description: Transportation mode plane together with addresses not working.
Request:

{
    "transportationMode": "Plane",
    "seatingClass": "economy class",
    "distance": 0,
    "startAddress": "MockStreet",
    "startCity": "Heidelberg",
    "startCountry": "Germany",
    "destinationAddress": "MockStreetBerlin",
    "destinationCity": "Berlin",
    "destinationCountry": "Germany"
}

Response:

1 validation error for Airportiata_code str type expected (type=type_error.str)

PlugIn Hybrig is not a valid fuel type.
Request:

{
    "transportationMode": "Car",
    "size": "Average",
    "fuelType": "Plug_In Hybrid",
    "distance": "30"
}

Response:

{
    "success": false,
    "message": "1 validation error for CarEmissionParameters\nfuel_type\n  'plug_in_hybrid' is not a valid CarFuelType (type=value_error)",
    "co2e": null,
    "__typename": "PlanTrip"
}

This is a bug collection issue of the status quo of the emission planner backend endpoint.

Description: Electricity Car not working. Request: { "success": false, "message": "index 0 is out of bounds for axis 0 with size 0", "co2e": null, "__typename": "PlanTrip" } Response: 'index 0 is out of bounds for axis 0 with size 0'

Description: Transportation mode plane together with addresses not working. Request: { "transportationMode": "Plane", "seatingClass": "economy class", "distance": 0, "startAddress": "MockStreet", "startCity": "Heidelberg", "startCountry": "Germany", "destinationAddress": "MockStreetBerlin", "destinationCity": "Berlin", "destinationCountry": "Germany" } Response: 1 validation error for Airportiata_code str type expected (type=type_error.str)

What was the query for the electric car that was not working?

What was the query for the electric car that was not working?

I can't remember but it seems to work now :)

More issues extracted from : #313

  • Currently, the estimation only works if all three transportation modes are used → should also work with only one or two modes
  • Plug-in hybrid car does not work
  • When entering address, you have to enter a country to get en emission estimate