Skip to content

Timedeltas and arrival/departure ports from MFP export - #372

Draft
j-atkins wants to merge 12 commits into
migrate-v4from
cruise-data
Draft

Timedeltas and arrival/departure ports from MFP export#372
j-atkins wants to merge 12 commits into
migrate-v4from
cruise-data

Conversation

@j-atkins

@j-atkins j-atkins commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

DRAFT

This PR uses the new exported fields from the MFP "Cruise Data" (see #362) to auto-fill the waypoints times using a user-prescribed --start-date and timedeltas from MFP when doing virtualship init --from-mfp.

Also, now that the ports of arrival/departure have been added to the MFP export these are now incorporated into the expedition.yaml, including a new Port model class. These act as special waypoints with times and locations but no instruments.

Further notes

  • Refactored virtualship init logic to a new module (cli/_initialise.py). Should help with readability and maintainability now that there is a lot more logic associated with this command, plus is consistent with the structure for other commands (plan and run).
  • Now adds comments to the expedition.yaml, marking e.g. # Port of Departure, Waypoint 1, Waypoint 2 and so on. This helps with config readability and is a previous user-feedback request.
  • Some of the new logic relies on the MFP export format staying the same and we do not have control over this. I have added checks along the way when ingesting (with instructions to raise an issue if a user believes something has changed). Ideally though we would also unit test for this to catch drift, but I don't know how we would go about this given it requires getting an up to date export from MFP.

TODOs

  • Ensure Port waypoints are handled properly when reading expedition.yaml back in plan or run
  • Check interaction with 'problems' module
  • Adapt plan tool
  • Update docs
  • More tests

Closes #362

@j-atkins
j-atkins changed the base branch from main to migrate-v4 August 13, 2026 07:07
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