Skip to content

sample yaml path docs are confusing #273

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

Closed
nsheff opened this issue Jun 9, 2020 · 3 comments
Closed

sample yaml path docs are confusing #273

nsheff opened this issue Jun 9, 2020 · 3 comments
Labels

Comments

@nsheff
Copy link
Contributor

nsheff commented Jun 9, 2020

is the sample_yaml_path relative to something? we should write that into the docs. now we say:

"""
Looper produces a yaml file that represents the sample. By default the file is saved in submission directory in {sample.sample_name}.yaml. You can override the default by specifying a sample_yaml_path attribute in the pipeline interface:

sample_yaml_path: {sample.sample_name}.yaml

This attribute, like the command_template, has access to any of the looper namespaces, in case you want to use them in the names of your sample yaml files.
"""

that explains how to override the default file name, but can you override the default directory ?

@nsheff nsheff added the docs label Jun 9, 2020
@stolarczyk
Copy link
Member

currently the result of path template rendering is appended to looper.output_dir, unless it's an absolute path. It is returned as is, then.

So, yes, directory overwriting is supported. But I need to double check if env vars are expanded after template rendering.

@stolarczyk
Copy link
Member

stolarczyk commented Jun 9, 2020

I need to double check if env vars are expanded after template rendering.

They are now on dev. So you can do:

  • {sample.attr}_file.yaml -- will be appened to the default directory (looper.output_dir)
  • $HOME/{sample.attr}_file.yaml -- absolute, portable path
  • /home/xxx/{sample.attr}_file.yaml -- absolute path

@nsheff
Copy link
Contributor Author

nsheff commented Jun 9, 2020

Ok I think we just need to make clear in the docs that absolute paths are allowed, or relative paths, which are then relative to the output dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants