github dannymcc/may v0.41.0

latest release: v0.41.1
11 hours ago

0.41.0

Features

  • Dual-fuel vehicles are now measured one fuel at a time. A petrol car converted to run on LPG gets a separate average consumption for each fuel on its vehicle page, instead of one figure that mixed petrol litres and LPG litres over the same odometer span and so described neither.
  • Each fill-up of such a vehicle can record the distance run on this fuel since the last fill-up of it, entered in the vehicle's own unit. The odometer cannot say which miles were run on which fuel, so this is the only way to get a figure for a stretch in which both fuels were used. The field appears only for vehicles that genuinely burn two fuels.
  • The fuel type and the distance attributed to it are carried in the CSV and JSON exports and in backups, so a dual-fuel history survives a restore. Over the REST API, fuel_type and fuel_distance can now be set when creating or updating a fill-up, as well as read. (#221)

Fixes

  • Consumption for a dual-fuel vehicle is no longer derived from an odometer span that covers ground run on the other fuel.

Other

  • README and the API documentation page updated: the dual-fuel behaviour, the unit the distance is entered in, and the fact that a vehicle's stats.average_consumption covers its primary fuel only. The API page also no longer describes fuel_type as read-only, which this release changed.

Upgrading

This release adds a column to the fuel logs table. Docker deployments run the migration on start-up; elsewhere, run flask db upgrade.

Visible change worth knowing about: on a dual-fuel vehicle, a stretch of history in which both fuels were used will now say the figure cannot be worked out rather than showing an average derived from the wrong distance. To restore it, edit those fill-ups and enter the distance run on that fuel. Vehicles running a single fuel are unaffected, as are diesels tracking AdBlue.

Don't miss a new may release

NewReleases is sending notifications on new releases.