Header not Compatible with Kernel Language
swissarthurfreeman opened this issue · comments
Operating system
Ubuntu 22.04 LTS on Docker
nbgrader --version
Python version 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
nbgrader version 0.8.4
jupyterhub --version
(if used with JupyterHub)
4.0.2
jupyter lab --version
3.6.5
Expected behavior
When an instructor generates the student version of an assignement, the generated version should not have an additional useless cell with python syntax based variable definitions,
NAME = ""
COLLABORATORS = ""
Actual behavior
When instructor generates student version via formgrader, even without having such a cell, nbgrader's pipeline adds that cell at some point.
Steps to reproduce the behavior
Create example scala notebook using the deployment at this link :
Accessing grader shared notebook server to create assignement,
When the user fetches it, the cell is there,
It of course does not compile as it is not valid scala code.
When user submits it and instructor autogrades, we get a compilation error. Same when student validates his notebook.
How can we modify / remove the appending of that header cell for it to work with Scala ? Note that I would also like to keep this
behavior for Python kernels.
Many thanks,
Gordon
The header shouldn't be include automatically.
Did you generate the example from the nbgrader quickstart
command ?
This command includes the following line in nbgrader_config.py:
c.IncludeHeaderFooter.header = "source/header.ipynb"
It also adds source/header.ipynb file, containing the cells you mentioned.
You can either comment/remove the config line in nbgrader_config.py file, or change the header notebook to something working with Scala.
Dear @brichet,
Thank you for your swift reply, it was indeed my mistake, I hadn't realised that nbrader quickstart was generating it's own config file which was overriding the one I had provided. The issue is now solved.
Many thanks !