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

output_dir parameter for more decorators #42

Closed
ghost opened this issue Mar 18, 2015 · 1 comment
Closed

output_dir parameter for more decorators #42

ghost opened this issue Mar 18, 2015 · 1 comment
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Mar 18, 2015

The output_dir named parameter for @transform in combination with suffix(...) is a tremendously helpful simplification that allows for an explicit separation of directory structure(s) from file naming. Extending that to, e.g., subdivide might clarify the pipeline code for these cases.

@bunbun bunbun added this to the 2.6.3 milestone Mar 18, 2015
@bunbun
Copy link
Collaborator

bunbun commented Mar 18, 2015

Thanks. This will be available in the next point release of ruffus 2.6.3 (?)

In the meantime, support is available in the git repository.

There is test code in test_suffix_output_dir.py.

Important:

For both
@tranform(suffix(...), output_dir = "something") and
@subdivide(suffix(...), output_dir = "something"),
the onus is on the Ruffus programmer not to do something senseless, like have a suffix() which includes a path / the parent directory:

    @transform(input = prev_task, filter = suffix("parent_dir/a.txt"), output = "parent_dir/b.txt", output_dir = "working_dir")
    def stupid_code(inputs, outputs):
        pass

There is no reasonable way of interpreting such code. Don't do it.

@bunbun bunbun closed this as completed Mar 18, 2015
@bunbun bunbun modified the milestones: Version 2.6, 2.6.3, Version 2.6.3 Mar 18, 2015
@bunbun bunbun self-assigned this Mar 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant