summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-16Change Emacs requirement for Emacs 24 to Emacs 24.5Kyle Meyer
python.el changed its indentation engine in Emacs 24.5. We rely on a python-indent-calculate-indentation that is specific for the newer version. Re: #28
2018-08-16Silence byte-compilerKyle Meyer
2018-08-16snakemake-mode-setup-mmm: Fix quoting in docstringKyle Meyer
2018-05-19mode: Add "singularity" as to the list of top-level commandsKyle Meyer
In addition the per-rule singularity field, Snakemake supports a top-level global directive (since v4.8.0, I think).
2018-05-19mode: Add "ancient" as to the list of built-insKyle Meyer
This has been around since Snakemake 3.9.0.
2018-03-20mode: Add "cwl" to the list of field keysKyle Meyer
2018-01-28Bump versionv1.3.0Kyle Meyer
2018-01-25mode: Add "singularity" to the list of field keysKyle Meyer
Closes #24.
2018-01-20Update copyright yearsKyle Meyer
2018-01-20snakemake-test.el: Remove email for copyright lineKyle Meyer
2018-01-20Makefile: Update magit-popup.el's URLKyle Meyer
magit-popup.el is in its own repository as of Magit's 4d5d9bfa
2017-10-30mode: Recognize "configfile" as a subworkflow keyKyle Meyer
Subworkflow blocks support a "configfile" field as of Snakemake's 1f02ae9 (Allow to specify configfile for subworkflows., 2016-08-24). Add "configfile" as a field-key so that the subworkflow variant is fontified as a key rather than a command. As with "workdir", the tradeoff is that an indented, non-subworkflow "configfile" is fontified as a key rather than a command. Fixes #23.
2017-10-30snakemake-font-lock-keywords: Fix indentationKyle Meyer
2017-10-10mode: Add ".smk" as a file suffixKyle Meyer
Closes #22.
2017-09-30.travis.yml: Use Python 3.6Kyle Meyer
Snakemake 4.0.0 requires Python 3.6.
2017-09-20mode: Recognize "unpack" as a Snakemake built-inKyle Meyer
This function was added in Snakemake v3.10.0.
2017-07-04guix-snakemake-environment: Edit descriptionKyle Meyer
2017-04-30Bump versionv1.2.1Kyle Meyer
2017-04-30Merge branch 'graph-no-imagemagick'Kyle Meyer
2017-04-30graphs: Display file if Emacs lacks ImageMagick supportKyle Meyer
To display the graph, snakemake-graph and snakemake-graph-this-file call image-mode in a buffer with the snakemake graph output. This is convenient because it works without using an output file, but displaying the graph fails if Emacs was compiled without ImageMagick support. When Emacs doesn't have ImageMagick support, fall back to saving the file and then displaying it.
2017-04-30snakemake-graph-save: Return the name of the output fileKyle Meyer
This will allow the graphing commands to save and display the graph when the user is running an Emacs that was not built with ImageMagick support. When the user provides all-blank input or does not confirm an overwrite, raise a user error so that the caller doesn't have to check for a nil return value.
2017-04-06Bump versionv1.2.0Kyle Meyer
2017-04-01Add a user option to always send commands to a terminalKyle Meyer
The primary motivation behind having a terminal interface is that it works better with tools like Guix because the environment persists across calls. And the primary reason one would want to use Guix with Snakemake is so that the dependencies to a workflow/analysis can be specified and tightly controlled. However, the user can accidentally step outside of this controlled environment by running a build command before running snakemake-term-start. The changes from this mistake can be hard to confidently reverse and may require a wide removal of output files. If a user wanted to make sure to only use the Guix-controlled environment, one approach would be to remove the Snakemake executable from the environment in which Emacs is started (most likely the default environment), exposing it only in the workflow environments. The problem with this is that snakemake.el requires the Snakemake executable for things like generating lists of targets. Also, it would be a global change, but a user could reasonably want to control dependencies with Guix for one project but go through the compile interface for another. Add a user option that allows the user to avoid the compile interface at a global or per-project level.
2017-03-31Include an example of a snakemake-shell-file-name scriptKyle Meyer
2017-03-31snakemake-term-start: s/manifest.scm/guix.scm/ in script exampleKyle Meyer
The "-l" flag of "guix environment" doesn't take a manifest; it takes a file that evaluates to a package or a list of packages.
2017-03-31snakemake-term-start: autoloadKyle Meyer
2017-03-31snakemake-build-targets: set directoryKyle Meyer
snakemake-build-targets needs to set default-directory to the Snakefile directory so that snakemake-term-process correctly reports whether there is an active terminal when the user initiates the call from a subdirectory. Conceptually, it also makes sense to handle the directory change in snakemake-build-targets. The docstrings for the lower-level snakemake-compile-targets and snakemake-term-build-targets specify that they correspond to a "snakemake ..." call, which implies that their caller is responsible for making sure they are called from the Snakefile directory.
2017-03-26snakemake-snakefile-directory: Abbreviate directory in error messageKyle Meyer
2017-03-26Merge branch 'term'Kyle Meyer
2017-03-26snakemake-root-dir-function: Add custom function fieldKyle Meyer
2017-03-26Add a terminal interface for running SnakemakeKyle Meyer
Snakemake commands are currently executed through compile. In general, this works fine, but it doesn't work well when Snakemake should be executed in a different environment than the one in which the current Emacs session was started. For example, Guix commands like 'guix environment ...' manipulate environmental variables to expose particular software. With the current setup, snakemake-program could be set to a wrapper script that creates the environment and then calls Snakemake: guix environment -l manifest.scm --ad-hoc snakemake --pure \ -- snakemake $@ But the disadvantage of this approach is that it adds the environmental setup time to _each_ Snakemake call. To work better with tools like Guix, let's add an alternative interface that allows commands to be executed in a terminal session. Instead of the above script, snakemake-shell-file-name can be set to a script with guix environment -l manifest.scm --ad-hoc snakemake --pure Now the environmental setup cost is limited to starting the terminal.
2017-03-26snakemake-root-dir-function: Define defcustom type as radioKyle Meyer
2017-03-26Rename snakemake-compileKyle Meyer
Make the name and popup description more general so that they still apply when the terminal interface is added.
2017-03-26snakemake-build-targets-at-point: Don't set directoryKyle Meyer
snakemake-compile-targets already takes care of setting default-directory to the Snakefile directory.
2017-03-26Modify sections in preparation for a terminal interfaceKyle Meyer
2017-03-26snakemake-build-targets-at-point: Remove unnecessary variableKyle Meyer
2017-03-26Move snakemake--make-commandKyle Meyer
This is in preparation for the addition of a terminal interface. No code change is intended.
2017-03-26snakemake-compile-targets: Remove an unnecessary let*Kyle Meyer
2017-03-26Rename snakemake--define-compile-commandKyle Meyer
This is in preparation for the addition of a terminal interface, at which point this function will be used beyond the compilation interface.
2017-03-26snakemake-read-file-target: Fix a docstring typoKyle Meyer
2017-03-26Update copyright yearsKyle Meyer
2017-02-26snakemake-mode-setup-mmm: Protect doc-string's single quotesKyle Meyer
As of Emacs 25, single quotes in doc-strings are rendered according to text-quoting-style, which by default results in single quotes being displayed as curved quotes. Instead of protecting single quotes with "\\=", switch some to double quotes (which still need to be escaped, but in a less jarring way), and avoid quoting symbols, which are better represented within `'.
2017-02-26snakemake-mode-setup-mmm: Touch up doc-stringKyle Meyer
The changes to the first paragraph will make the following commit cleaner. Also, there's no need to tell users where to set mmm-global-mode.
2017-02-22snakemake-file-targets: Update Workflow callKyle Meyer
The snakemakepath argument of Workflow was removed in Snakemake v3.9.1 (062a2e0).
2016-11-24Fix doc-string typoKyle Meyer
2016-11-22Bump versionv1.1.0Kyle Meyer
2016-11-22Merge branch 'km/rx-builtin'Kyle Meyer
2016-11-17snakemake-rx-constituents: Support more built-in Snakemake objectsKyle Meyer
Using "input" here overrides the highlighting of "input" by python-font-lock-keywords, although in either case font-lock-builtin-face is used. The addition of "output" to the regexp means that output and input are now displayed with a consistent face in run blocks. Fixes #20.
2016-11-17snakemake-font-lock-keywords: Increase field key precedenceKyle Meyer
Instead of distinguishing built-ins from field keys by a trailing "(", make the field key regexp, which is more specific, have a higher precedence. This allows Snakemake built-ins to be highlighted correctly even if they are not called as functions.
2016-11-17snakemake-rx-constituents: Replace sm-func with sm-builtinKyle Meyer
The sm-builtin regexp will be extended to support built-in Snakemake objects like "input" and "output", at which point "function" will no longer be an accurate description.