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 2A9SJeIin1/ZXQAAsNZ9tg (envelope-from ) for ; Sun, 01 Nov 2020 21:04:34 +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 WItLIeIin186QAAA1q6Kng (envelope-from ) for ; Sun, 01 Nov 2020 21:04:34 +0000 Received: from ridesmtaext02.roche.com (ridesmtaext02.roche.com [198.21.25.78]) (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 AAAD4940105 for ; Sun, 1 Nov 2020 21:04:33 +0000 (UTC) Received: from ridesmtaint01.roche.com (ridesmtaint01.roche.com [198.21.25.79]) by ridesmtaext02.roche.com with ESMTP id 0A1L4Usj017761-0A1L4Usl017761 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 1 Nov 2020 21:04:30 GMT Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ridesmtaint01.roche.com with ESMTP id 0A1L4TRK019592-0A1L4TRM019592 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=CAFAIL) for ; Sun, 1 Nov 2020 21:04:30 GMT Received: by mail-pg1-f199.google.com with SMTP id z31so7629118pgk.8 for ; Sun, 01 Nov 2020 13:04:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=+hQab+zKMxonQOm0nnP9T5HnVaQ1xTzigadv8JhM0II=; b=T4oK5wpRREF6daLP0sn/DHPGwAObRuixx+q42SVOyQoUjdcvKM/LpJPgBi1Wf4gHxS MBeIO9PI3SePs+k1SXxPjtJOZaIXiQ4CiSWQ2kJtPyrArDZqbq30pjGhEV9PiFxISIX+ 5wv35yBRmj/z0XM+GY5/tcXT1nWbmcPSwW2qYqaiNBU4PdLZWn9u7xXbAB97t1Vo0GRg CO+M/NzT2eu37gsOwKduLr5nLtO2YgZAoa4UMWjvJkRcV+CfM91TWwyBg23B6D3l8BWK tTf11ZAld+nfFeuOnlBysuSFSGQYuSbX/HMK1y7aD76JRGT9Np7p3+EtemKevUZixkM+ EPEQ== X-Gm-Message-State: AOAM532FYJtQk9gej2FF62Hf2G2pGnOC1QCM/1FZalgAuSraLYylpScc kycjx+ICjGl7UIxrqDU/hKy3cBhWzXsh+iJTYx+Y319/LfPuoSbxcTlUMY4cgE1Dv0yj13PgVMD NNw5gLEEyATAtoWWi2Rvtqd9wwhQ= X-Received: by 2002:a63:a74b:: with SMTP id w11mr10902168pgo.425.1604264669703; Sun, 01 Nov 2020 13:04:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLh/6JPk65kLwfqk5lxbNrljl904d+7NPZ91nTe/vWQlm1JrqH4ifSE8Ei3sd047v0KXoPoQ== X-Received: by 2002:a63:a74b:: with SMTP id w11mr10902163pgo.425.1604264669469; Sun, 01 Nov 2020 13:04:29 -0800 (PST) Received: from knoblaun-glhv2n.ind.roche.com ([198.21.24.251]) by smtp.gmail.com with ESMTPSA id lt22sm9708238pjb.13.2020.11.01.13.04.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Nov 2020 13:04:28 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: [PATCH] mode: Add "container" and "envmodules" keywords From: Nicholas Knoblauch In-Reply-To: <87eelcak64.fsf@kyleam.com> Date: Sun, 1 Nov 2020 15:04:26 -0600 Cc: snakemake-mode@inbox.kyleam.com Content-Transfer-Encoding: quoted-printable Message-Id: References: <87eelcak64.fsf@kyleam.com> To: Kyle Meyer X-Mailer: Apple Mail (2.3445.104.17) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; d=gene.com; s=fmailg01; c=relaxed/relaxed; h=content-type:mime-version:subject:from:date:cc:message-id:references:to; bh=+hQab+zKMxonQOm0nnP9T5HnVaQ1xTzigadv8JhM0II=; b=qJWfFhjDlADFwD+YUWecg5D+IvPy7zYyr6sj6em7mnDqyw5Q73nw0bMnrs/knAkg8ghb9ZDTMxfV hnHiHDpbLrep29RpjkAZX4TVJw4wg4daUjz8AaHra98KkJpN4w924FC/EwKp3n+IzCTqoCdloOMt QmHj+kfc0FuQTQAdecCFvN/t/WRBJetVIT1Len2LEKFLSN0QJ9l1HnfR0NUR/BhxcGCYQ7R8xZmJ 7Ph+SPxAW00eaxNOshlJDh+E8QVWIIFC12RiTOThtFrlO+UfOPVGj/MBHYYqapXKDK92/ONWHFgO oI4xtycBOV6JdyDtOSl4vx4kMzMjG3np+atTiw== X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gene.com header.s=fmailg01 header.b=qJWfFhjD; dmarc=pass (policy=quarantine) header.from=gene.com; spf=pass (aspmx1.migadu.com: domain of knoblauch.nicholas@gene.com designates 198.21.25.78 as permitted sender) smtp.mailfrom=knoblauch.nicholas@gene.com X-Spam-Score: -1.00 X-TUID: Wbl+sX1wYQXy > On Nov 1, 2020, at 2:36 PM, Kyle Meyer wrote: >=20 > Nicholas Knoblauch writes: >=20 >> 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?high= light=3Denvmodules#using-environment-modules >> and >> = https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html?high= light=3Denvmodules#running-jobs-in-containers >=20 > Sure, thanks for noticing that they're missing. Based on the docs, my > understanding is that "envmodules" can only be used within a rule: >=20 > rule bwa: > envmodules: > "bio/bwa/0.7.9" > [...] >=20 > On the other hand, it looks like "container" can be used either within = a > rule or at the top-level. Is that correct? >=20 I believe you=E2=80=99re 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. >=20 > Hmm, not sure. Starting a separate thread with a minimal reproducer > would be great. Thanks. >=20 Will do. Thanks again! > -- >8 -- > Subject: [PATCH] mode: Add "container" and "envmodules" keywords >=20 > Register "container" as both a field key and a top-level command > because an example of both is present in the Snakemake docs. >=20 > Reported-by: Nicholas Knoblauch > --- > NEWS | 5 +++-- > snakemake-mode.el | 3 +++ > 2 files changed, 6 insertions(+), 2 deletions(-) >=20 > 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; -*- >=20 > * master (unreleased) >=20 > -- 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). >=20 > * v1.7.0 >=20 > 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" >=20 > base-commit: 870e1f2379110e48c7f189832aa7663fcb0be836 > --=20 > 2.28.0 >=20