Skip to content

Commit

Permalink
Merge pull request #583 from maxplanck-ie/config_fix
Browse files Browse the repository at this point in the history
snakePipes config fix
  • Loading branch information
dpryan79 committed Mar 4, 2020
2 parents a33e5a9 + 1d292c0 commit 0994b34
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .ci_stuff/test_dag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ mkdir -p allelic_input
mkdir -p allelic_input/Ngenome
touch allelic_input/file.vcf.gz allelic_input/snpfile.txt

# Ensure an empty snakePipes config doesn't muck anything up
snakePipes config

# DNA mapping
WC=`DNA-mapping -i PE_input -o output .ci_stuff/organism.yaml --snakemakeOptions " --dryrun --conda-prefix /tmp" | tee >(cat 1>&2) | grep -v "Conda environment" | wc -l`
if [ ${PIPESTATUS[0]} -ne 0 ] || [ $WC -ne 886 ]; then exit 1 ; fi
Expand Down
11 changes: 10 additions & 1 deletion bin/snakePipes
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ def parse_arguments():
"(Default: %(default)s)",
default=defaults['tempDir'])

configParser.add_argument('--noToolsVersion',
dest='toolsVersion',
help="By default, tool versions are printed to a workflow-specific file. Specifying this disables that behavior.",
action="store_false")

email = configParser.add_argument_group(title="Email/SMTP options", description="These options are only used if/when --emailAddress is used.")
email.add_argument('--smtpServer',
help="SMTP server address. (Default: %(default)s)",
Expand Down Expand Up @@ -302,9 +307,13 @@ def updateConfig(args):
'onlySSL': args.onlySSL,
'emailSender': args.emailSender,
'smtpUsername': args.smtpUsername,
'smtpPassword': args.smtpPassword
'smtpPassword': args.smtpPassword,
'toolsVersion': args.toolsVersion
}
baseDir = os.path.dirname(snakePipes.__file__)
# Load, update and rewrite the default dictionary
currentDict = cof.load_configfile(os.path.join(baseDir, "shared", "defaults.yaml"), False)
cof.merge_dicts(currentDict, d)
cof.write_configfile(os.path.join(baseDir, "shared", "defaults.yaml"), d)


Expand Down
5 changes: 5 additions & 0 deletions docs/content/News.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
snakePipes News
===============

snakePipes 2.0.1
----------------

* Fixed a bug in `snakePipes config` that caused the `toolsVersion` variable to be removed from `defaults.yaml`. This is likely related to issue #579.

snakePipes 2.0.0
----------------

Expand Down
2 changes: 1 addition & 1 deletion snakePipes/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.0'
__version__ = '2.0.1'

0 comments on commit 0994b34

Please sign in to comment.