Skip to content

Commit 59614d1

Browse files
Hardcode location of notebook report latex template
1 parent 36858f5 commit 59614d1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

install/notebook_report.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
try:
1919
notebook_path = sys.argv[1]
2020
except IndexError:
21-
notebook_path = PATH_PREFIX + 'notebook.ipynb'
21+
notebook_path = os.path.abspath(os.curdir) + 'notebook.ipynb'
2222
with open(notebook_path, 'r') as f:
2323
notebook = nbformat.read(f, as_version=4)
2424

@@ -27,7 +27,10 @@
2727

2828
# Set up the export config
2929
c = Config()
30-
c.LatexExporter.template_file = PATH_PREFIX + 'notebook_template.tplx'
30+
if os.path.exists('/share/notebook_template.tplx'):
31+
c.LatexExporter.template_file = '/share/notebook_template.tplx'
32+
else:
33+
c.LatexExporter.template_file = '/opt/onecodex/notebook_template.tplx'
3134

3235
notebook.metadata['vars'] = {
3336
'trusted': True,

0 commit comments

Comments
 (0)