Skip to content

Modifications

Adrian Wilke edited this page Nov 18, 2019 · 5 revisions

Process every notebook, even on timeouts

    def convert_single_notebook(self, notebook_filename):
        self.log.info("Sanitizing %s", notebook_filename)
        self._sanitizing = True
        self._init_preprocessors()
        super(Autograde, self).convert_single_notebook(notebook_filename)

        notebook_filename = os.path.join(self.writer.build_directory, os.path.basename(notebook_filename))
        self.log.info("Autograding %s", notebook_filename)
        self._sanitizing = False
        self._init_preprocessors()
        try:
            super(Autograde, self).convert_single_notebook(notebook_filename)
        except:
            self.log.error("Error while autograding %s", notebook_filename)
            pass
        finally:
            self._sanitizing = True

Do not delete autograded directories on errors

self.log.warning("NOT Removing failed assignment: {}".format(dest))
#self.log.warning("Removing failed assignment: {}".format(dest))
#rmtree(dest)

Find code files

  • find / -name "autograde.py" | grep nbgrader
  • find / -name "base.py" | grep nbgrader
  • on conda installations, the lib path is used (not the pkgs path)
Clone this wiki locally