fab.steps.grab.dependency_info#
This module contains a class that manages the dependencies specified in a dependencies.yaml file.
Classes
|
A simple dictionary-like class that stores the version information from a yaml file. |
|
A simple class to maintain source and ref attributes of a repository. |
- class fab.steps.grab.dependency_info.RepoInfo(source_ref=list(), path=PosixPath('.'))#
A simple class to maintain source and ref attributes of a repository. It maintains a list of sources and references, the idea being that the first one is checked out, then the following are merged into the checked out version.
This data is maintained in source_ref, a list of SourceRef instances.
Each RepoInfo also maintains one path, the location in which the source code is checked out to.
- class SourceRef(source, ref)#
A simple data class that stores a source and ref, and allows to access and update them individually. Source and ref can be None if there is no information for a repository.
- class fab.steps.grab.dependency_info.DependencyInfo(filename, only_repos=None)#
A simple dictionary-like class that stores the version information from a yaml file:
casim: source: git@github.com:MetOffice/casim.git ref: 2025.12.1 ...
The information can be accessed as a dictionary, e.g.:
gr = DependencyInfo("$LFRIC_APPS_SRC/dependencies.yaml") gr["casim"] --> {"source": "git@.../casim.git", "ref": "2025.12.1"}
A filter can be specified to restrict the repositories that are being handled.
The constructor will check that each dependency has indeed source and ref defined (note that for lfric_apps these are defined, but empty, indicating to use the current directory).
If the requested section does not exist, a key error is raised.
- get_repo_names()#