Skip to content

feat(project): Add external project dependencies to project manifests. - #938

Open
jetuk wants to merge 1 commit into
pywr-project-multi-modelsfrom
pywr-project-external-projects
Open

jetuk wants to merge 1 commit into
pywr-project-multi-modelsfrom
pywr-project-external-projects

Conversation

@jetuk

@jetuk jetuk commented Nov 3, 2026

Copy link
Copy Markdown
Member

A manifest can now list other projects as dependencies, by a path to their manifest that may lead outside the project. Their network definitions, network sets and sub-networks are referred to by qualified names such as ea::river, and their models can be the networks of a multi-model. Dependencies load transitively, a project reached by several routes is loaded once, and cycles are reported. An optional SHA-256 hash pins a dependency's manifest, and a DependencyPolicy in the new ResolveOptions can deny dependencies or confine them to a directory.

A project's exports limit what others may use from it. Problems found inside a dependency are reported as being in it, and a dependency's set limits apply only to the sets that are selected from. Relative data paths in a dependency's files are rebased onto the root project, and provenance records the dependency each component came from.

The example's neighbouring network is now a separate project, which reads its demand from a CSV file of its own.

A manifest can now list other projects as dependencies, by a path to
their manifest that may lead outside the project. Their network
definitions, network sets and sub-networks are referred to by qualified
names such as `ea::river`, and their models can be the networks of a
multi-model. Dependencies load transitively, a project reached by
several routes is loaded once, and cycles are reported. An optional
SHA-256 hash pins a dependency's manifest, and a `DependencyPolicy` in
the new `ResolveOptions` can deny dependencies or confine them to a
directory.

A project's `exports` limit what others may use from it. Problems found
inside a dependency are reported as being in it, and a dependency's set
limits apply only to the sets that are selected from. Relative data
paths in a dependency's files are rebased onto the root project, and
provenance records the dependency each component came from.

The example's neighbouring network is now a separate project, which
reads its demand from a CSV file of its own.
@jetuk
jetuk requested a review from Batch21 November 3, 2026 22:06
@jetuk
jetuk added this pull request to stack #935 November 3, 2026 22:06

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