nmk_workspace.resolvers¶
Nmk workspace plugin config item resolvers.
Classes¶
Resolver usable find sub-projects in the workspace tree. |
Module Contents¶
- class nmk_workspace.resolvers.SubProjectsResolver(model: nmk.model.model.NmkModel)¶
Bases:
nmk.model.resolver.NmkListConfigResolverResolver usable find sub-projects in the workspace tree.
Default behavior is to look sub-projects by iterating through git submodules. (other behaviors may be implemented if needed later).
- get_value(name: str, root: str, only_nmk_projects: bool = True, only_python_projects: bool = False) list[str]¶
Resolver for sub-projects list.
- Parameters:
root – root path of the workspace
only_nmk_projects – if True (default), only return sub-projects having a default nmk project file (nmk.yml)
only_python_projects – if True, only return sub-projects having a Python project file (pyproject.toml)
- Returns:
list of sub-projects paths relative to the workspace root