discussion and development of Emacs Snakemake mode
 help / color / mirror / code / Atom feed
From: Nicholas Knoblauch <knoblauch.nicholas@gene.com>
To: Kyle Meyer <kyle@kyleam.com>
Cc: snakemake-mode@inbox.kyleam.com
Subject: Re: [PATCH] mode: Add "container" and "envmodules" keywords
Date: Sun, 1 Nov 2020 15:04:26 -0600	[thread overview]
Message-ID: <D5A28139-EEF5-40D1-AF07-F2FAD0002645@gene.com> (raw)
In-Reply-To: <87eelcak64.fsf@kyleam.com>



> On Nov 1, 2020, at 2:36 PM, Kyle Meyer <kyle@kyleam.com> wrote:
> 
> Nicholas Knoblauch writes:
> 
>> Hi,
>> It would be great if snakemake-mode could support `envmodules` and
>> `containers` as top level commands as per
>> https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html?highlight=envmodules#using-environment-modules
>> and
>> https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html?highlight=envmodules#running-jobs-in-containers
> 
> Sure, thanks for noticing that they're missing.  Based on the docs, my
> understanding is that "envmodules" can only be used within a rule:
> 
>    rule bwa:
>        envmodules:
>            "bio/bwa/0.7.9"
>        [...]
> 
> On the other hand, it looks like "container" can be used either within a
> rule or at the top-level.  Is that correct?
> 

I believe you’re right.


>> Also, maybe I should file a separate issue about this (maybe it isn't even
>> a snakemake-mode question), but is there a way to force the "rule" line to
>> never indent (even if I hit 'Tab' on that line)?
>> I consistently run into whitespace issues with org-mode+snakemake-mode.
> 
> Hmm, not sure.  Starting a separate thread with a minimal reproducer
> would be great.  Thanks.
> 

Will do.  Thanks again!

> -- >8 --
> Subject: [PATCH] mode: Add "container" and "envmodules" keywords
> 
> Register "container" as both a field key and a top-level command
> because an example of both is present in the Snakemake docs.
> 
> Reported-by: Nicholas Knoblauch <knoblauch.nicholas@gene.com>
> ---
> NEWS              | 5 +++--
> snakemake-mode.el | 3 +++
> 2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/NEWS b/NEWS
> index f046551..2743025 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -2,8 +2,9 @@ NEWS -- history of user-visible changes             -*- mode: org; -*-
> 
> * master (unreleased)
> 
> -- Additional Snakemake keywords are now recognized: 'envvars' (new in
> -  Snakemake v5.11.0) and 'cache' keyword (new in v5.12.0).
> +- Additional Snakemake keywords are now recognized: 'envmodules' (new
> +  in Snakemake v5.9.0), 'envvars' (new in v5.11.0), 'container' (new
> +  in v5.11.0), and 'cache' (new in v5.12.0).
> 
> * v1.7.0
> 
> diff --git a/snakemake-mode.el b/snakemake-mode.el
> index 5f603ee..cc4d372 100644
> --- a/snakemake-mode.el
> +++ b/snakemake-mode.el
> @@ -85,7 +85,9 @@ (eval-and-compile
>                         (or "benchmark"
>                             "cache"
>                             "conda"
> +                            "container"
>                             "cwl"
> +                            "envmodules"
>                             "group"
>                             "input"
>                             "log"
> @@ -110,6 +112,7 @@ (eval-and-compile
>                         symbol-end))
>       (sm-command . ,(rx symbol-start
>                          (or "configfile"
> +                             "container"
>                              "envvars"
>                              "include"
>                              "localrules"
> 
> base-commit: 870e1f2379110e48c7f189832aa7663fcb0be836
> -- 
> 2.28.0
> 


  reply	other threads:[~2020-11-01 21:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-01 19:18 Add 'envmodules' and 'containers' to list of top level commands Nicholas Knoblauch
2020-11-01 20:36 ` [PATCH] mode: Add "container" and "envmodules" keywords Kyle Meyer
2020-11-01 21:04   ` Nicholas Knoblauch [this message]
2020-11-01 21:13     ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://git.kyleam.com/snakemake-mode

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D5A28139-EEF5-40D1-AF07-F2FAD0002645@gene.com \
    --to=knoblauch.nicholas@gene.com \
    --cc=kyle@kyleam.com \
    --cc=snakemake-mode@inbox.kyleam.com \
    --subject='Re: [PATCH] mode: Add "container" and "envmodules" keywords' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.kyleam.com/snakemake-mode/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).