Skip to content

feat(project): Add sub-networks to project manifests. - #936

Open
jetuk wants to merge 1 commit into
pywr-project-network-definitionsfrom
pywr-project-sub-networks
Open

jetuk wants to merge 1 commit into
pywr-project-network-definitionsfrom
pywr-project-sub-networks

Conversation

@jetuk

@jetuk jetuk commented Nov 3, 2026

Copy link
Copy Markdown
Member

A sub-network is a directory holding a base network and network sets for part of a wider model. Its sets are referred to by qualified names, such as upper::options. Sub-networks are inactive unless a model lists them in sub_networks or a network definition names one as its base, and selecting from an inactive sub-network is an error. A sub-network's set limits only apply when it is active.

Relative data paths in a sub-network's files are rebased onto the project root when they are loaded; output paths are left unchanged. Composing a model now fails if any placeholders are left unresolved, and provenance records the sub-network each component came from.

The example project now holds its catchment inflows in a sub-network.

A sub-network is a directory holding a base network and network sets for
part of a wider model. Its sets are referred to by qualified names, such
as `upper::options`. Sub-networks are inactive unless a model lists them
in `sub_networks` or a network definition names one as its `base`, and
selecting from an inactive sub-network is an error. A sub-network's set
limits only apply when it is active.

Relative data paths in a sub-network's files are rebased onto the project
root when they are loaded; output paths are left unchanged. Composing a
model now fails if any placeholders are left unresolved, and provenance
records the sub-network each component came from.

The example project now holds its catchment inflows in a sub-network.
@jetuk
jetuk requested a review from Batch21 November 3, 2026 22:05
@jetuk
jetuk added this pull request to stack #935 November 3, 2026 22:05

This branch has not been deployed

No deployments
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.

1 participant