Use configurable templated header with jinja2 as in batchspawner
I feel https://github.com/jupyterhub/batchspawner is using an interesting way of templating job script. See SlurmSpawner for instance.
I know we used some templated script before too, but we did not make use of jinja2 thus being force to define some useless parameters to avoid issues. This would allow us to me more easily compatible with different job scheduler versions (i.e. Torque vs PBS), and be much more generic.
Any thoughts?
See historic discussion on the current code here https://github.com/dask/dask-jobqueue/issues/7#issuecomment-370473064.
I think this is a good idea. I think our current approach made sense as a starting point but poses some challenges when maintaining many job schedulers.
I'm interested in implementing the headers as Jinja2 templates. See #338 for more details.