jckantor / nbpages

Command line tool to maintain a repository of Jupyter notebooks.
https://jckantor.github.io/nbpages/
MIT License
1 stars 4 forks source link

Extend --remove_solution_code to include autograder tests #20

Closed adowling2 closed 3 years ago

adowling2 commented 4 years ago

Mimic the syntax of Vocareum.

adowling2 commented 4 years ago

Here is the documentation: https://help.vocareum.com/en/articles/3658959-grading-with-jupyter-notebook

We need to strip out cells that are marked as Autograder test with nbgrader. We should have lint search for ### BEGIN HIDDEN TESTS and ### END HIDDEN TESTS in all code cells not marked as Autograder test by nbgrader. Sometimes I forget to mark the cells.

adowling2 commented 3 years ago

@jckantor I just ran nbpages --remove_solution_code and got this output:

- remove solution code from 01.01-Jupyter-Notebooks.ipynb
- remove hidden tests code from 01.01-Jupyter-Notebooks.ipynb
- remove hidden tests code from 01.01-Jupyter-Notebooks.ipynb

Why is it double printing?

adowling2 commented 3 years ago

The trick was running nbpages --remove_solution_code --publish.

jckantor commented 3 years ago

A message is printed for every cell that is removed. If there is more than one hidden test then there are multiple messages. Will change this for a more informative message.

jckantor commented 3 years ago

This feature has been renamed --remove_code, and implemented in a more generic and testable method. Documentatiion has been added to the readme file. Going to close this one out.