project
Description
Project management for SysML v2 and KerML based on Sysand.
Index
Classes
The project (its |
||
Base class of every error raised by the |
||
Result of |
Functions
Find the project and the workspace enclosing |
||
Find the root directory of the project containing |
Functions
- discover(path: str | pathlib.Path = '.') syside.project.Discovery
Find the project and the workspace enclosing
path.This is the same lookup every CLI command performs first: walk up from
pathto the nearest directory holding.project.json(or.meta.json), and separately to the nearest one holding.workspace.json. Paths are canonicalized, assysand.root()does. A tool that must not operate inside a workspace checksworkspace_rootbefore doing anything else.- Raises:
- ProjectError: a directory could not be read, or
.workspace.jsonis malformed.
- ProjectError: a directory could not be read, or
- root(path: str | pathlib.Path = '.') pathlib.Path | None
Find the root directory of the project containing
path.- Args:
path: Path to start searching from. Defaults to the current directory.
- Returns:
The canonicalized project root as a
Path, orNoneifpathis not inside a project.