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

Allow access to module name obj through local variable: #545

Open
iromeo opened this issue Oct 21, 2024 · 0 comments
Open

Allow access to module name obj through local variable: #545

iromeo opened this issue Oct 21, 2024 · 0 comments

Comments

@iromeo
Copy link
Contributor

iromeo commented Oct 21, 2024

image
shell.executable("bash")

configfile: "config/config.yaml"


module test1:
    snakefile:
        "module-test/Snakefile"
    config:
        config
    replace_prefix: 
        {"results/": "results/testmodule1/"}




module test2:
    snakefile:
        "module-test/Snakefile"
    config:
        config
    replace_prefix: 
        {"results/": "results/testmodule2/"}


use rule * from test1 as test1_*

use rule * from test2 as test2_*



rule all:
    default_target: True
    input:
        rules.test1_a.output,
        rules.test2_a.output


assert test1.some_func() == 15
assert test2.some_func() == 15

module-test:

configfile: "config.yaml" # does not exist, but this statement should be ignored on module import


def some_func():
    return 15


rule a:
    output:
        "results/test.out"
    shell:
        "echo {config[test]} > {output}"
        ```
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