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

Features/#262 checkpoints resolve/completion after rules keyword #459

Merged
merged 3 commits into from
Feb 4, 2022

Conversation

dakochik
Copy link
Contributor

@dakochik dakochik commented Dec 30, 2021

Now resolve/completion allow using checkpoints after 'rules' keyword.
#262

@dakochik dakochik changed the title Features/#262 checkpoints in use rule section Features/#262 checkpoints resolve/completion after rules keyword Dec 30, 2021
@iromeo
Copy link
Contributor

iromeo commented Jan 15, 2022

@dakochik PR is ok, have you checked the requested behaviour on runtime in snakemake? I'm not 100% sure that it is till true in up-to-date snakemake

As far as I remember we implement rules. without CP in order not to confuse the user, because normally he need to access it via syntax like checkpoints.foo.get(**wildcards).output.key1 in order to get checkpoint dependent rules to work correctly. So not sure that 1) the issue was correct 2) if it works so, not clear how to help users to differ CP usage syntax like in boo from all. Maybe is better not to implement the above feature at all.

@iromeo iromeo assigned dakochik and unassigned iromeo Jan 15, 2022
@dakochik
Copy link
Contributor Author

When I'm running an example from the issue, I'm getting an RE: expected string or bytes-like object in the first expand argument.
But when I'm running more simple example:

checkpoint foo:
    output: "{sample}_in"

rule boo:
    input: expand(rules.foo.output, sample=["boo"]) 
    output: "boo_out"
    run:
        shell("touch {output}")
        print(rules.foo.output)
        for rule in workflow.rules: 
            print("RULE",rule.name)
            print(rule.input)

I'm getting the following messages:

{sample}_in
RULE foo

RULE boo
boo_in

And no RE

IDK if it is really necessary feature (I think you are more experienced with snakemake to consider that), but looks like it is still a valid case.

@dakochik dakochik assigned iromeo and unassigned dakochik Jan 22, 2022
@iromeo iromeo merged commit 0b4f2b3 into master Feb 4, 2022
@iromeo iromeo deleted the features/#262-checkpoints-in-rules branch February 4, 2022 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants