Skip to content

Commit

Permalink
Merge pull request #7381 from bollwyvl/gh-7368-page-config-defaults
Browse files Browse the repository at this point in the history
use setdefault for buildAvailable and buildCheck
  • Loading branch information
blink1073 committed Nov 10, 2019
2 parents a441eb9 + 9d7fd99 commit 3d1e5ee
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions docs/source/user/extensions.rst
Expand Up @@ -142,6 +142,29 @@ If you ignore the rebuild notice by mistake, simply refresh your browser
window to trigger a new rebuild check.


Disabling Rebuild Checks
~~~~~~~~~~~~~~~~~~~~~~~~

In some cases, such as automated testing, you may wish to disable the startup
rebuild checks altogether. This can be achieved through setting ``buildCheck``
and ``buildAvailable`` in ``jupyter_notebook_config.json`` (or ``.py`` equivalent)
in any of the ``config`` locations returned by ``jupyter --paths``.


.. code:: json
{
"LabApp": {
"tornado_settings": {
"page_config_data": {
"buildCheck": false,
"buildAvailable": false,
}
}
}
}
Managing Installed Extensions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
4 changes: 2 additions & 2 deletions jupyterlab/extension.py
Expand Up @@ -139,8 +139,8 @@ def load_jupyter_server_extension(nbapp):
core_mode = False

page_config = web_app.settings.setdefault('page_config_data', dict())
page_config['buildAvailable'] = not core_mode and not dev_mode
page_config['buildCheck'] = not core_mode and not dev_mode
page_config.setdefault('buildAvailable', not core_mode and not dev_mode)
page_config.setdefault('buildCheck', not core_mode and not dev_mode)
page_config['devMode'] = dev_mode
page_config['token'] = nbapp.token

Expand Down

0 comments on commit 3d1e5ee

Please sign in to comment.