Skip to content

Release v0.41.0 - #335

Merged
dannymcc merged 2 commits into
mainfrom
dev
Aug 25, 2026
Merged

Release v0.41.0#335
dannymcc merged 2 commits into
mainfrom
dev

Conversation

@dannymcc

Copy link
Copy Markdown
Owner

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.

@dannymcc
dannymcc merged commit ba039aa into main Aug 25, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c5f52e4e-a3eb-4d17-b71e-e935a5a52b8d

📥 Commits

Reviewing files that changed from the base of the PR and between 01d1234 and 066fb66.

⛔ Files ignored due to path filters (1)
  • app/translations/messages.pot is excluded by !app/translations/**
📒 Files selected for processing (15)
  • CHANGELOG.md
  • README.md
  • app/models.py
  • app/routes/api.py
  • app/routes/fuel.py
  • app/routes/vehicles.py
  • app/services/backup_restore.py
  • app/templates/api/docs.html
  • app/templates/fuel/form.html
  • app/templates/vehicles/view.html
  • config.py
  • migrations/versions/d0e1f2a3b4c5_add_fuel_distance_to_fuel_logs.py
  • tests/test_backup_restore.py
  • tests/test_exports.py
  • tests/test_fuel.py
 ______________________________________________________________________
< Stop swallowing exceptions. They don't become less real in the dark. >
 ----------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant