Skip to content

Handle instruments: null at waypoints#300

Merged
j-atkins merged 5 commits intomainfrom
instruments-null
Mar 3, 2026
Merged

Handle instruments: null at waypoints#300
j-atkins merged 5 commits intomainfrom
instruments-null

Conversation

@j-atkins
Copy link
Collaborator

@j-atkins j-atkins commented Mar 3, 2026

This PR fixes the waypoint instruments handling in _calc_wp_stationkeeping_time() to be able to properly handle instrument: null at a waypoint in the expedition.yaml.

Convert expedition.schedule.instrument to an empty list when it is null in YAML. null is takenas NoneType in Python and cannot be used for the various checks later in the function.

  • Tests

@j-atkins j-atkins marked this pull request as draft March 3, 2026 08:12
@j-atkins j-atkins marked this pull request as ready for review March 3, 2026 10:20
@j-atkins j-atkins requested a review from erikvansebille March 3, 2026 10:21
Copy link
Member

@erikvansebille erikvansebille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I assume that the test fails on the old code?

@j-atkins
Copy link
Collaborator Author

j-atkins commented Mar 3, 2026

Again, I assume that the test fails on the old code?

Yes, indeed, the previous version fails

@j-atkins j-atkins merged commit 91d0b38 into main Mar 3, 2026
9 of 10 checks passed
@j-atkins j-atkins deleted the instruments-null branch March 3, 2026 13:39
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.

2 participants