Skip to content

Commit

Permalink
Merge pull request #774 from jhamrick/config-options
Browse files Browse the repository at this point in the history
Add missing config options
  • Loading branch information
jhamrick committed Jun 14, 2017
2 parents 5665555 + 01c1c9c commit 7b9b431
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions nbgrader/apps/baseapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,17 @@ def _load_config(self, cfg, **kwargs):
cfg.Exchange.merge(cfg.TransferApp)
del cfg.TransferApp

if 'BaseNbConvertApp' in cfg:
self.log.warning(
"Use BaseConverter in config, not BaseNbConvertApp. Outdated config:\n%s",
'\n'.join(
'BaseNbConvertApp.{key} = {value!r}'.format(key=key, value=value)
for key, value in cfg.BaseNbConvertApp.items()
)
)
cfg.BaseConverter.merge(cfg.BaseNbConvertApp)
del cfg.BaseNbConvertApp

super(NbGrader, self)._load_config(cfg, **kwargs)
if self.coursedir:
self.coursedir._load_config(cfg)
Expand Down
7 changes: 7 additions & 0 deletions nbgrader/apps/nbgraderapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from .. import plugins
from ..coursedir import CourseDirectory
from .. import exchange
from .. import converters
from .baseapp import nbgrader_aliases, nbgrader_flags
from . import (
NbGrader,
Expand Down Expand Up @@ -266,6 +267,12 @@ def _classes_default(self):
if hasattr(ex, "class_traits") and ex.class_traits(config=True):
classes.append(ex)

# include all the converters
for ex_name in converters.__all__:
ex = getattr(converters, ex_name)
if hasattr(ex, "class_traits") and ex.class_traits(config=True):
classes.append(ex)

return classes

@catch_config_error
Expand Down

0 comments on commit 7b9b431

Please sign in to comment.