API reference#
- dso.here(rel_path=None)#
Get project root as a Path object
- dso.read_params(stage)#
Set stage dir and load parameters from the stage’s params.yaml
It is required to provide the path of the current stage relative to the project root to ensure that the correct config is loaded, no matter of the current working directory (as long as the working directory is any subdirectory of the project root). The function recompiles params.in.yaml to params.yaml on-the-fly to ensure that up-to-date params are always loaded.
Only parameters that are declared as
params
,dep
, oroutput
in dvc.yaml are loaded to ensure that one does not forget to keep thedvc.yaml
updated.Calls
set_stage()
internally.
- dso.set_stage(stage)#
Set the active stage for
stage_here()
This sets the stage dir in
dso.CONFIG
.
- dso.stage_here(rel_path=None)#
Get the absolute path to the current stage
The current stage is stored in
dso.CONFIG
and can be set usingdso.set_stage()
ordso.read_params()
.