AM 1136 boat charing: fix location status - #237
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the bridge / boat_charging service to improve how a location’s overall status (OPERATIVE/OCCUPIED/INOPERATIVE) is derived by factoring in a socket “available” signal (notably to handle offline/unavailable charging-station scenarios), and refreshes dependencies and tooling to match the updated behavior.
Changes:
- Update location status calculation to require both an “operative” connector status and an
availableflag when determining if a location is OPERATIVE. - Adjust the location-detail endpoint to enrich connector data with an
availablefield, and update/add tests + mock responses for the new behavior. - Regenerate dependency locks/exports and tweak
make lintto run without TTY allocation (for git hooks/CI).
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Dependency lock updates (multiple package version bumps). |
requirements.txt |
Regenerated exported requirements reflecting updated pinned versions. |
Makefile |
lint target now disables TTY allocation for non-interactive runs. |
bridge/boat_charging/views/location_view.py |
Status derivation updated; location-detail now injects available into connector dicts before computing status. |
bridge/boat_charging/tests/views/test_location_views.py |
Updates/adds tests for new availability-driven status behavior (incl. offline station case). |
bridge/boat_charging/tests/mock_data/location_detail.py |
Updates mock payloads to match new station/connector scenarios under test. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
RikSchefferAmsterdam
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the bridge / boat_charging service to improve how a location’s overall status (OPERATIVE/OCCUPIED/INOPERATIVE) is derived by factoring in a socket “available” signal (notably to handle offline/unavailable charging-station scenarios), and refreshes dependencies and tooling to match the updated behavior.
Changes:
availableflag when determining if a location is OPERATIVE.availablefield, and update/add tests + mock responses for the new behavior.make lintto run without TTY allocation (for git hooks/CI).Affected services
Definition of done
make openapi-diff)make dev)make requirements)- [ ] Infrastructure config updated (aapp_azure_infra)- [ ] Loadtests for relevant endpoints (aapp_testing_loadtests)After PR created (and deployed on dev):
Other notes
GitHub Copilot was used in writing the code