Skip to content

Move HydrophoneLocations into shared DTO, initialize it from Orcasite feeds, and drive email map URI tests from it#510

Open
Copilot wants to merge 7 commits into
mainfrom
copilot/move-hydrophone-locations-to-utilities
Open

Move HydrophoneLocations into shared DTO, initialize it from Orcasite feeds, and drive email map URI tests from it#510
Copilot wants to merge 7 commits into
mainfrom
copilot/move-hydrophone-locations-to-utilities

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

Hydrophone location mappings were defined only in AIForOrcas.Client.Web, while NotificationSystem.Tests.Unit duplicated location-name expectations inline. This change centralizes the mapping in a reusable project, initializes that shared map from Orcasite feed data when available, makes the email map URI tests consume the same initialization path, and trims unused DTO API surface that was introduced during the move.

  • Shared hydrophone location mapping

    • Moved HydrophoneLocations from AIForOrcas.Client.Web to AIForOrcas.DTO
    • Kept the API members that have in-repo callers (Initialize, GetIdByLocation, Locations)
    • Removed unused LocationToIdMap and HydrophoneIds properties after verifying they had no callers in the repository
  • Orcasite-backed initialization

    • Added an AIForOrcas.DTO reference to NotificationSystem
    • Updated OrcasiteHelper.InitializeAsync() to use the feeds array from Orcasite to build the shared { location name -> node_name } map and call HydrophoneLocations.Initialize(...)
    • Kept the hard-coded DTO mapping as the fallback when the Orcasite API call fails or returns no usable mapping
  • NotificationSystem test alignment

    • Added a reference from NotificationSystem.Tests.Unit to AIForOrcas.DTO
    • Replaced InlineData in EmailTemplateTests with MemberData backed by HydrophoneLocations.Locations
    • Derived expected image names from the shared hydrophone IDs via HydrophoneLocations.GetIdByLocation(locationName)
    • Updated the email map URI tests to initialize a real OrcasiteHelper with mocked Orcasite feed data via InitializeAsync() instead of hand-mocking slug lookups
  • Effect on duplicated test data

    • Removes hand-maintained test cases that had already drifted from the shared mapping (Mast Center/MaST Center, Haro Strait)
    • Keeps the tests focused on verifying email map URI generation against the same location data path used by the application

Copilot AI linked an issue May 26, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Move hydrophone locations to utilities project Move HydrophoneLocations into shared DTO and drive email map URI tests from it May 26, 2026
Copilot AI requested a review from dthaler May 26, 2026 17:10
Comment thread NotificationSystem/NotificationSystem.Tests.Unit/EmailTemplateTests.cs Outdated
Copilot AI requested a review from dthaler May 26, 2026 18:07
@dthaler dthaler marked this pull request as ready for review May 26, 2026 18:08
@dthaler dthaler requested review from TruaShamu and tongwynn May 26, 2026 18:09
@dthaler dthaler added the notification system Issues relating to the notification system label May 26, 2026
Comment thread ModeratorFrontEnd/AIForOrcas/AIForOrcas.DTO/HydrophoneLocations.cs Outdated
Comment thread ModeratorFrontEnd/AIForOrcas/AIForOrcas.DTO/HydrophoneLocations.cs Outdated
Copilot AI requested a review from dthaler May 26, 2026 18:26
@dthaler

This comment was marked as resolved.

Copilot AI changed the title Move HydrophoneLocations into shared DTO and drive email map URI tests from it Move HydrophoneLocations into shared DTO, initialize it from Orcasite feeds, and drive email map URI tests from it May 26, 2026
Copilot AI requested a review from dthaler May 26, 2026 20:02
@dthaler

This comment was marked as resolved.

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

Labels

notification system Issues relating to the notification system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read hydrophone locations from orcasite

2 participants