discussion and development of Emacs Snakemake mode
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: snakemake-mode@inbox.kyleam.com
Subject: [PATCH 2/3] transient: Replace --jobs with --cores
Date: Mon, 21 Feb 2022 22:02:06 -0500	[thread overview]
Message-ID: <20220222030207.204401-3-kyle@kyleam.com> (raw)
In-Reply-To: <20220222030207.204401-1-kyle@kyleam.com>

--cores was added as a synonym for --jobs in v3.10.0 (2012), and, as
of v6.5.0, --cores and --jobs are distinct things for cloud/cluster
jobs.  Wait to add --jobs until it's requested.
---
 NEWS         |  4 ++++
 snakemake.el | 12 ++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index 73e2e20..64db66f 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,10 @@ NEWS -- history of user-visible changes             -*- mode: org; -*-
   transient, ~snakemake~.  snakemake.el now depends on Transient
   rather than Magit Popup.
 
+- The ~--jobs~ argument in the ~snakemake~ transient has been replaced
+  by ~--cores~ to follow upstream changes.  ~--cores~ is bound to
+  ~-c~, and ~--use-conda~ has been moved from ~-c~ to ~-C~.
+
 - The 'name' keyword (new in Snakemake v5.31.0) is now recognized.
 
 * v1.8.0
diff --git a/snakemake.el b/snakemake.el
index 61f6cbb..91fef4f 100644
--- a/snakemake.el
+++ b/snakemake.el
@@ -733,17 +733,17 @@ (transient-define-argument snakemake:--allowed-rules ()
   :argument "--allowed-rules="
   :reader 'snakemake-read-rules)
 
-(transient-define-argument snakemake:--jobs ()
-  :description "Number of jobs"
+(transient-define-argument snakemake:--cores ()
+  :description "Number of cores"
   :class 'transient-option
-  :key "-j"
-  :argument "--jobs=")
+  :key "-c"
+  :argument "--cores=")
 
 ;;;###autoload (autoload 'snakemake "snakemake" nil t)
 (transient-define-prefix snakemake
   "Transient for running Snakemake."
   ["Arguments"
-   ("-c" "Use conda" "--use-conda")
+   ("-C" "Use conda" "--use-conda")
    ("-f" "Force" "--force")
    ("-i" "Ignore temp()" "--notemp")
    ("-n" "Dry run" "--dryrun")
@@ -751,7 +751,7 @@ (transient-define-prefix snakemake
    ("-r" "Print reason" "--reason")
    ("-t" "Touch files" "--touch")
    (snakemake:--allowed-rules)
-   (snakemake:--jobs)]
+   (snakemake:--cores)]
   ["Actions"
    [("c" "Edit and run command" snakemake-build)]
    [("p" "Build target at point" snakemake-build-targets-at-point)
-- 
2.34.0


  parent reply	other threads:[~2022-02-22  3:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22  3:02 [PATCH 0/3] Switch to Transient Kyle Meyer
2022-02-22  3:02 ` [PATCH 1/3] Rewrite snakemake-popup as a transient Kyle Meyer
2022-02-22  3:02 ` Kyle Meyer [this message]
2022-02-22  3:02 ` [PATCH 3/3] transient: Use --cores=all by default 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=20220222030207.204401-3-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=snakemake-mode@inbox.kyleam.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).