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

docs: explain how to mask envvars #27

Closed
wants to merge 1 commit into from
Closed
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: 3 additions & 1 deletion docs/further.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ If the shared scratch is e.g. specific for each job (e.g. controlled by a ``$JOB
```yaml
default-storage-provider: fs
local-storage-prefix: /local/work/$USER
remote-job-local-storage-prefix: /local/work/$USER/$JOBID
remote-job-local-storage-prefix: /local/work/$USER/\$JOBID
shared-fs-usage:
- persistence
- software-deployment
- sources
- source-cache
```

Here, in case a used variable can only expanded within the remote job, make sure to mask the expansion upon starting Snakemake by preceeding the variable declaration with a backslash (``\$JOBID``).

Note that the non-remote job local storage prefix is still always needed, because Snakemake can also decide to run certain jobs without submission to the cluster or cloud.
This can happen either on dev request because a certain rule is very lightweight, or by Snakemake's own decision, e.g. in case of rules that just format a template (see `docs <https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#template-rendering-integration>`_).