# HG changeset patch
# User petr-novak
# Date 1569324476 14400
# Node ID 039c45c01b47825d4097a9a96e62d97583263bab
# Parent 1a766f9f623dca745dd512eab074014053be43ab
Uploaded
diff -r 1a766f9f623d -r 039c45c01b47 dante.py
--- a/dante.py Mon Sep 16 03:54:45 2019 -0400
+++ b/dante.py Tue Sep 24 07:27:56 2019 -0400
@@ -414,34 +414,35 @@
def get_version(path, LAST_DB):
'''Return version is run from git repository '''
- try:
- branch = subprocess.check_output("git rev-parse --abbrev-ref HEAD",
- shell=True,
- cwd=path).decode('ascii').strip()
- shorthash = subprocess.check_output("git log --pretty=format:'%h' -n 1 ",
- shell=True,
- cwd=path).decode('ascii').strip()
- revcount = len(subprocess.check_output("git log --oneline",
- shell=True,
- cwd=path).decode('ascii').split())
- version_string = (
- "##-----------------------------------------------\n"
- "##PIPELINE VERSION : "
- "{branch}-rv-{revcount}({shorthash})\n"
- "##PROTEIN DATABASE VERSION : {PD}\n"
- "##-----------------------------------------------\n").format(
- branch=branch,
- shorthash=shorthash,
- revcount=revcount,
- PD=os.path.basename(LAST_DB))
- except:
- version_string = (
- "##-----------------------------------------------\n"
- "##PROTEIN DATABASE VERSION : {PD}\n"
- "##-----------------------------------------------\n").format(
- PD=os.path.basename(LAST_DB)
- )
-
+ version_string = (
+ "##-----------------------------------------------\n"
+ "##PROTEIN DATABASE VERSION : {PD}\n"
+ "##-----------------------------------------------\n").format(
+ PD=os.path.basename(LAST_DB)
+ )
+ if os.path.exists(".git"):
+ try:
+ branch = subprocess.check_output("git rev-parse --abbrev-ref HEAD",
+ shell=True,
+ cwd=path).decode('ascii').strip()
+ shorthash = subprocess.check_output("git log --pretty=format:'%h' -n 1 ",
+ shell=True,
+ cwd=path).decode('ascii').strip()
+ revcount = len(subprocess.check_output("git log --oneline",
+ shell=True,
+ cwd=path).decode('ascii').split())
+ version_string = (
+ "##-----------------------------------------------\n"
+ "##PIPELINE VERSION : "
+ "{branch}-rv-{revcount}({shorthash})\n"
+ "##PROTEIN DATABASE VERSION : {PD}\n"
+ "##-----------------------------------------------\n").format(
+ branch=branch,
+ shorthash=shorthash,
+ revcount=revcount,
+ PD=os.path.basename(LAST_DB))
+ except:
+ pass
return version_string
diff -r 1a766f9f623d -r 039c45c01b47 dante_gff_to_dna.xml
--- a/dante_gff_to_dna.xml Mon Sep 16 03:54:45 2019 -0400
+++ b/dante_gff_to_dna.xml Tue Sep 24 07:27:56 2019 -0400
@@ -22,7 +22,7 @@
-
+