Skip to content

Commit

Permalink
Merge pull request #47 from mbhall88/hotfix/#45
Browse files Browse the repository at this point in the history
Support quoted jobid from snakemake v7.1.1
  • Loading branch information
mbhall88 authored Apr 16, 2022
2 parents d7c0d8a + 1aa7d7b commit 32e94ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ This document tracks changes to the `master` branch of the profile.

- Default project and queue will be removed from the submission command if they are present in the `lsf.yaml`

### Fixed

- Support quoted jobid from `snakemake>=v7.1.1` [[#45][45]]

## [0.1.2] - 01/04/2021

### Added
Expand Down Expand Up @@ -83,6 +87,7 @@ This document tracks changes to the `master` branch of the profile.
[9]: https://github.com/Snakemake-Profiles/lsf/pull/9
[36]: https://github.com/Snakemake-Profiles/lsf/issues/36
[39]: https://github.com/Snakemake-Profiles/lsf/issues/39
[45]: https://github.com/Snakemake-Profiles/lsf/issues/45
[0.1.0]: https://github.com/Snakemake-Profiles/lsf/releases/tag/0.1.0
[0.1.1]: https://github.com/Snakemake-Profiles/lsf/releases/tag/0.1.1
[0.1.2]: https://github.com/Snakemake-Profiles/lsf/releases/tag/0.1.2
Expand Down
9 changes: 7 additions & 2 deletions {{cookiecutter.profile_name}}/lsf_status.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3

import shlex
import sys
import time
from pathlib import Path
Expand Down Expand Up @@ -198,8 +199,12 @@ def get_status(self) -> str:


if __name__ == "__main__":
jobid = int(sys.argv[1])
outlog = sys.argv[2]
# need to support quoted and unquoted jobid
# see https://github.com/Snakemake-Profiles/lsf/issues/45
split_args = shlex.split(" ".join(sys.argv[1:]))
jobid = int(split_args[0])
outlog = split_args[1]

if CookieCutter.get_unknwn_behaviour().lower() == "wait":
kill_unknown = False
elif CookieCutter.get_unknwn_behaviour().lower() == "kill":
Expand Down

0 comments on commit 32e94ba

Please sign in to comment.