From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms12 with LMTPS id cBwwJWgcn1+HAwAAsNZ9tg (envelope-from ) for ; Sun, 01 Nov 2020 20:36:56 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KOMUIWgcn1+JLwAA1q6Kng (envelope-from ) for ; Sun, 01 Nov 2020 20:36:56 +0000 Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1F63A9405D3 for ; Sun, 1 Nov 2020 20:36:54 +0000 (UTC) Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id AE3F3986E1; Sun, 1 Nov 2020 15:36:52 -0500 (EST) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=aWKR7noXKk87BgCBAA2cnjDjTOA=; b=mFFbzk GxFiNQkST8Yiz0CdGDuz4jGewQmSPbFvfgd7ljC7MFMQyCgnwceObDzuI3WbuonM jbMVXSMGx+7tBNvFwdCP50pGS+atN1lhT+ekyNlcuos0rDfpC8tm3BfcQSLD6KRR M9Ej586nUAjAVBO5semkoMTTy001DaKg6MIq0= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id A4CB0986E0; Sun, 1 Nov 2020 15:36:52 -0500 (EST) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=cbn6rbFnxtCQSE6rUflWa/p7zwxKWRR2Ju8g2G+aQi4=; b=DBMpN6f37kimORFjqmgjbvjvadh8zOrxETpi4/FgvPDek2988KpqkdNmL9zQL5qyHGkAZk400CQtje7vtRR9FNVkK7cxlwFnCQih9iolg52XJIPvxvowZDZENNYa7x5yc04MbxjisRTgnPdXx1IpltpVUGZHBLO9aflNgg8fhyQ= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 06E7D986DF; Sun, 1 Nov 2020 15:36:52 -0500 (EST) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Nicholas Knoblauch Cc: snakemake-mode@inbox.kyleam.com Subject: [PATCH] mode: Add "container" and "envmodules" keywords In-Reply-To: References: Date: Sun, 01 Nov 2020 15:36:51 -0500 Message-ID: <87eelcak64.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: F918A5C2-1C81-11EB-9A64-D152C8D8090B-24757444!pb-smtp1.pobox.com X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=mFFbzk G; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=DBMpN6f3; dmarc=none; spf=pass (aspmx1.migadu.com: domain of kyle@kyleam.com designates 64.147.108.70 as permitted sender) smtp.mailfrom=kyle@kyleam.com X-Spam-Score: -1.00 X-TUID: OOTjGVaEV06K 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? > 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. -- >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 --- 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