Rename edge to reach throughout network extension#642
Merged
jpalm3r merged 2 commits intoedge_observationsfrom Apr 24, 2026
Merged
Rename edge to reach throughout network extension#642jpalm3r merged 2 commits intoedge_observationsfrom
jpalm3r merged 2 commits intoedge_observationsfrom
Conversation
Renames all network-related 'edge' terminology to 'reach' to align with DHI nomenclature as requested in issue #641. Changes: - EdgeBreakPoint -> ReachBreakPoint - NetworkEdge -> NetworkReach - BasicEdge -> BasicReach - EdgeObservation -> ReachObservation - Network.__init__(edges=) -> Network.__init__(reaches=) - Network.find(edge=) -> Network.find(reach=) - Network._edges -> Network._reaches - NetworkModelResult._extract_edge() -> _extract_reach() - xarray coordinate 'edge' -> 'reach' - EdgeCoords -> ReachCoords in timeseries layer - observation() factory: gtype='edge' -> gtype='reach' - recall() return dict: 'edge' key -> 'reach' key - All docs, tests, and error messages updated Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ecomodeller
approved these changes
Apr 24, 2026
Member
ecomodeller
left a comment
There was a problem hiding this comment.
Approving — rename is in the right direction and matches DHI terminology.
A few leftover references worth a quick follow-up:
src/modelskill/timeseries/_point.py:246still referencesEdgeCoordsin a type hint (mypy flags it; only silent at runtime because offrom __future__ import annotations).tests/test_network.py:452, 469, 485, 500— fourtest_extract_edge_observation_*functions not renamed.tests/test_network.py:88-89— localedges = [...]variable passed toNetwork(reaches=...).docs/user-guide/network.qmd:183— "(nodes, edges, lengths)" reads inconsistently next to the newreachesvocabulary.
NetworkX g0.add_edge(...) calls in network.py are correctly left as-is (graph-theory sense).
Collaborator
Author
|
Just fixed the remaining "edge" mentions, will merge now. |
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.
Closes #641
Summary
Renames all network-related "edge" terminology to "reach" to align with DHI nomenclature.
Class renames
EdgeBreakPoint→ReachBreakPointNetworkEdge→NetworkReachBasicEdge→BasicReachEdgeObservation→ReachObservationEdgeCoords→ReachCoords(internal timeseries layer)API changes
Network(edges=...)→Network(reaches=...)Network.find(edge=...)→Network.find(reach=...)Network.recall()return dict:'edge'key →'reach'keyobservation(gtype='edge')→observation(gtype='reach')'edge'→'reach'in datasetsNetworkModelResult._extract_edge()→_extract_reach()Files updated
src/modelskill/network.pysrc/modelskill/obs.pysrc/modelskill/model/network.pysrc/modelskill/model/adapters/_res1d.pysrc/modelskill/timeseries/_coords.pysrc/modelskill/timeseries/_point.pysrc/modelskill/timeseries/_timeseries.pysrc/modelskill/__init__.pysrc/modelskill/matching.pytests/test_network.pytests/test_match.pydocs/user-guide/network.qmddocs/_quarto.ymlAll 652 tests pass.