Command reference#
dso#
$ dso --help
Usage: dso [OPTIONS] COMMAND [ARGS]...
Root command
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --quiet -q INTEGER RANGE Reduce verbosity. -q disables info messages, │
│ -qq disables warnings. Errors messages cannot │
│ be disabled. The same can be achieved by │
│ setting the env var DSO_QUIET=1 or │
│ DSO_QUIET=2, respectively. │
│ --verbose -v Increase logging verbosity to include debug │
│ messages. The same can be achieved by setting │
│ the env var DSO_VERBOSE=1. │
│ --version Show the version and exit. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ compile-config Compile params.in.yaml into params.yaml using Jinja2 │
│ templating and resolving recursive templates. │
│ create Create stage folder structure subcommand. │
│ exec Dso wrappers around various tools │
│ get-config Get the configuration for a given stage and print it to │
│ STDOUT in yaml format. │
│ init Initialize a new project. A project can contain several │
│ stages organized in arbitrary subdirectories. │
│ lint Lint a dso project │
│ repro Wrapper around dvc repro, compiling configuration before │
│ running. │
│ watermark Add a watermark to an image │
╰──────────────────────────────────────────────────────────────────────────────╯
dso compile-config#
$ dso compile-config --help
Usage: dso compile-config [OPTIONS] [ARGS]...
Compile params.in.yaml into params.yaml using Jinja2 templating and resolving
recursive templates.
If passing no arguments, configs will be resolved for the current working
directory (i.e. all parent configs, and all configs in child directories).
Alternatively a list of paths can be specified. In that case, all configs
related to these paths will be compiled (useful for using with pre-commit).
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
dso create#
$ dso create --help
Usage: dso create [OPTIONS] COMMAND [ARGS]...
Create stage folder structure subcommand.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ folder Create a new folder. A folder can contain subfolders or stages. │
│ stage Create a new stage. │
╰──────────────────────────────────────────────────────────────────────────────╯
dso create folder#
$ dso create folder --help
Usage: dso create folder [OPTIONS] [NAME]
Create a new folder. A folder can contain subfolders or stages.
Technically, nothing prevents you from just using mkdir. This command
additionally adds some default files that might be useful, e.g. an empty
dvc.yaml.
You can specify a path to an existing folder. In that case all template files
that do not exist will be copied to the folder. Existing files will never be
overwritten.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
dso create stage#
$ dso create stage --help
Usage: dso create stage [OPTIONS] [NAME]
Create a new stage.
A stage can be in any subfolder of the projects. Stages shall not be nested.
Available templates:
• bash: Execute a simple bash snippet or call an external script (e.g.
nextflow)
• quarto: Generate a report using quarto
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --template [bash|quarto] │
│ --description TEXT │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
dso exec#
$ dso exec --help
Usage: dso exec [OPTIONS] COMMAND [ARGS]...
Dso wrappers around various tools
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ quarto Render a quarto stage. Quarto parameters are inherited from │
│ params.yaml │
╰──────────────────────────────────────────────────────────────────────────────╯
dso exec quarto#
$ dso exec quarto --help
Usage: dso exec quarto [OPTIONS] STAGE
Render a quarto stage. Quarto parameters are inherited from params.yaml
A quarto stage is assmed to have the following structure:
• One or multiple .qmd files in src
• Reports will be stored in report
No _quarto.yml shall be present as it will be automatically created
tempoarily. Instead supply quarto parameters in params.in.yaml under the key
dso.quarto.
Parameters
stage Path to the stage, e.g. . for the current directory.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --skip-compile Do not compile configs before linting. The same can be │
│ achieved by setting the DSO_SKIP_COMPILE=1 env var. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
dso get-config#
$ dso get-config --help
Usage: dso get-config [OPTIONS] STAGE
Get the configuration for a given stage and print it to STDOUT in yaml format.
The path to the stage must be relative to the root dir of the project.
By default, the configuration is filtered to include only the keys that are
mentioned in dvc.yaml to force declaring all dependencies.
If multiple stages are defined in a single dvc.yaml, the stage name MUST be
specified using path/to/stage:stage_name unless --all is given.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --all Include all parameters, not only those mentioned in │
│ dvc.yaml │
│ --skip-compile Do not compile configs before loading it. The same can │
│ be achieved by setting the DSO_SKIP_COMPILE=1 env var. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
dso init#
$ dso init --help
Usage: dso init [OPTIONS] [NAME]
Initialize a new project. A project can contain several stages organized in
arbitrary subdirectories.
If you wish to initialize DSO in an existing project, you can specify an
existing directory. In this case, it will initialize files from the template
that do not exist yet, but never overwrite existing files.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --description TEXT │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
dso lint#
$ dso lint --help
Usage: dso lint [OPTIONS] [ARGS]...
Lint a dso project
Performs consistency checks according to a set of rules.
If passing no arguments, linting will be performed for the current working
directory. Alternatively a list of paths can be specified. In that case, all
stages related to any of the files are linted (useful for using with
pre-commit).
Configurations are compiled before linting.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --skip-compile Do not compile configs before linting. The same can be │
│ achieved by setting the DSO_SKIP_COMPILE=1 env var. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
dso repro#
$ dso repro --help
Usage: dso repro [OPTIONS] [ARGS]...
Wrapper around dvc repro, compiling configuration before running.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯
dso watermark#
$ dso watermark --help
Usage: dso watermark [OPTIONS] INPUT_IMAGE OUTPUT_IMAGE
Add a watermark to an image
To be called from the dso-r package for implementing a custom graphics device.
Can also be used standalone for watermarking images.
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ * --text TEXT Text to use as watermark │
│ [required] │
│ --tile_size <INTEGER INTEGER>... watermark text will be │
│ arranged in tile of this │
│ size (once at top left, │
│ once at middle right). │
│ Specify the tile size as │
│ e.g. 120 80 │
│ --font_size INTEGER │
│ --font_outline INTEGER │
│ --font_color TEXT Use RGBA (e.g. #AAAAAA88) │
│ to specify transparency │
│ --font_outline_color TEXT Use RGBA (e.g. #AAAAAA88) │
│ to specify transparency │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯