Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header not Compatible with Kernel Language #1820

Closed
swissarthurfreeman opened this issue Aug 28, 2023 · 2 comments
Closed

Header not Compatible with Kernel Language #1820

swissarthurfreeman opened this issue Aug 28, 2023 · 2 comments

Comments

@swissarthurfreeman
Copy link

swissarthurfreeman commented Aug 28, 2023

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,
Example Scala Notebook

Output of Generation

When the user fetches it, the cell is there,
User Fetched Notebook
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.
Screenshot from 2023-08-28 12-58-48

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

@brichet
Copy link
Contributor

brichet commented Aug 28, 2023

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.

@swissarthurfreeman
Copy link
Author

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants