From 0082fcd9bc1240d8a4c1c7b9a2d85ef729d029e5 Mon Sep 17 00:00:00 2001 From: Rupert Swarbrick Date: Thu, 2 Apr 2026 16:37:26 +0100 Subject: [PATCH] Explicitly add proj_root to FlowCfg This gets loaded up from the hjson file (and nothing will work if it's missing). Eventually, we need to do that more carefully, but this change is helpful because it tells pyright about the existence and type of FlowCfg.proj_root. This will always have type str (because it gets loaded directly from an hjson file). Add an explicit cast to Path when calling the WorkspaceConfig constructor. Signed-off-by: Rupert Swarbrick --- src/dvsim/flow/base.py | 1 + src/dvsim/job/deploy.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dvsim/flow/base.py b/src/dvsim/flow/base.py index 4ae7d2c3..e9e692d5 100644 --- a/src/dvsim/flow/base.py +++ b/src/dvsim/flow/base.py @@ -77,6 +77,7 @@ def __init__(self, flow_cfg_file, hjson_data, args, mk_config) -> None: self.project = "" self.scratch_path = "" self.scratch_base_path = "" + self.proj_root = "" # Add exports using 'exports' keyword - these are exported to the child # process' environment. diff --git a/src/dvsim/job/deploy.py b/src/dvsim/job/deploy.py index 71247b85..a258e1b8 100644 --- a/src/dvsim/job/deploy.py +++ b/src/dvsim/job/deploy.py @@ -128,7 +128,7 @@ def get_job_spec(self) -> "JobSpec": ), workspace_cfg=WorkspaceConfig( timestamp=self.sim_cfg.args.timestamp, - project_root=self.sim_cfg.proj_root, + project_root=Path(self.sim_cfg.proj_root), scratch_root=Path(self.sim_cfg.scratch_root), scratch_path=Path(self.sim_cfg.scratch_path), ),