Snakemake-Profiles / lsf

Snakemake profile for running jobs on an LSF cluster
MIT License
36 stars 22 forks source link

Complex shell quote escaping fails #40

Closed bricoletc closed 3 years ago

bricoletc commented 3 years ago

I found a case, described in #39, which failed on lsf cluster. I propose here a solution which made it run successfully.

Added

Some details of the changes:

39 issue:

Docs/gitignore:

The tests pass- I've not tested this exact version of the code on the cluster, so maybe should do that too. Cheers!

mbhall88 commented 3 years ago

Ah actually, I've just realised why the CI is failing. shlex.join was only added in python 3.8 (and also black formatting is failing). I would suggest using python 3.5 in your local venv for this project as this has happened to me a few times in the past also.

codecov-io commented 3 years ago

Codecov Report

Merging #40 (483eaae) into master (57302c6) will increase coverage by 0.04%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
+ Coverage   88.52%   88.57%   +0.04%     
==========================================
  Files           6        6              
  Lines         462      464       +2     
  Branches       44       45       +1     
==========================================
+ Hits          409      411       +2     
  Misses         46       46              
  Partials        7        7              
Flag Coverage Δ
unittests 88.57% <100.00%> (+0.04%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
{{cookiecutter.profile_name}}/lsf_config.py 100.00% <100.00%> (ø)
bricoletc commented 3 years ago

Ok! I found a workaround using python3.5-compatible shlex invocations.

For failing the black formatting, I see what you're doing; snakemake supports python>=3.5, but black is for python3.6+ only, so you dont install black using dev-requirements.txt else that would fail python3.5 CI. I added a note in CONTRIBUTING.md saying you need to install latest black- that means CI will pass.