Living Systems_

Debugging

Debugging inside Jinja templates using pdb/ipdb

I’m working on a static reporting tool using the Jinja2 templating engine for Python. I was trying to figure out a way to enter into the Jinja templating code with the pdb/ipdb commandline debugger. I tried creating an .ipdbrc file in my local directory with the line: path/to/template.html:<lineno> … but that didn’t work. What worked was to figure out the line that says : return self.environment.concat(self.root_render_func(ctx)) … inside the the jinja codebase, and put a breakpoint on that (which for me was on line 1299, but might vary depending on version):

Troubleshooting Nextflow pipelines

We have been evaluating Nextflow before in my work at pharmb.io , but that was before DSL2 and the support for re-usable modules (which was one reason we needed to develop our own tools to support our challenges, as explained in the paper ). Thus, there’s definitely some stuff to get into. Based on my years in bioinformatics and data science, I’ve seen that the number one skill that you need to develop is to be able to effectively troubleshoot things, because things will invariably fail in all kinds of ways.