Refactoring for solving network dependencies#612
Merged
jpalm3r merged 5 commits intojapr/network-supportfrom Mar 18, 2026
Merged
Refactoring for solving network dependencies#612jpalm3r merged 5 commits intojapr/network-supportfrom
jpalm3r merged 5 commits intojapr/network-supportfrom
Conversation
ecomodeller
approved these changes
Mar 17, 2026
Member
ecomodeller
left a comment
There was a problem hiding this comment.
Looks good — clean extraction of the networkx/mikeio1d dependencies into the opt-in module.
ecomodeller
approved these changes
Mar 17, 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.
networkxandmikeio1dare soft dependencies only needed for network model results, but they were imported unconditionally via model/network.py, causing import modelskill to fail in environments where those packages are not installed (e.g. CI runninguv sync --group test --no-dev).The fix moves all network-related building blocks (
NetworkNode,NetworkEdge,EdgeBreakPoint,BasicNode,BasicEdge,Network) into a new opt-in modulemodelskill.network, which users import explicitly only when they need network functionality. The model/network.py module now only containsNodeModelResultandNetworkModelResult, withnetworkxandmikeio1dnever touched during a normalimport modelskill.A [project.optional-dependencies] entry is also added so pip users can install network support with pip install modelskill[networks].