Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added reload to {{ stage_name }}.qmd #40

Merged
merged 9 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning][].
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
[semantic versioning]: https://semver.org/spec/v2.0.0.html

## [Unreleased]

- Improve instruction text in quarto template to get users started more quickly ([#40](https://github.com/Boehringer-Ingelheim/dso/pull/40))

## v0.9.0

### New Features
Expand Down
17 changes: 14 additions & 3 deletions src/dso/templates/stage/quarto/src/{{ stage_name }}.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,29 @@ require(conflicted)
require(dso)
```

Load the stage-specific 'params.yaml' config using the `read_params(..)` function. This function specifically loads
only the stage-dependent parameters that are defined in the 'params' section of the 'dvc.yaml' file.

```{r}
#| label: read_params
# read_params sets the stage directory, runs 'dso compile-config'
# and loads params defined in the 'dvc.yaml' 'params' section of the stage

params <- read_params("{{ stage_path }}")
```

When modifying the 'dvc.yaml', 'params.in.yaml', or 'params.yaml' files during development, use the 'reload(params)'
function to ensure proper application of the changes by rebuilding and reloading the configuration.

```{r}
#| label: reload_params

reload(params)
```

To locate your files relative to the stage path use `stage_here(..)`.

```{r}
#| label: obtain_files_relative_to_stage_dir

# stage_here locates your files relative to the stage path set in read_params
# e.g.
samplesheet <- readr::read_csv(stage_here(params$samplesheet))
```
Loading