Repository: plotly/dash
Pull request #690 (2019-04-15 21:31:18)

:bug: this fix the inconsistency of dev_tools os environment 
this is a fix in previous merge about dev tools configs
![image](https://user-images.githubusercontent.com/1394467/56166622-2154ed80-5fa4-11e9-8e1f-9ee055066684.png)
we should be consistent with the dash-docs/dev-tools section about the OS environment name convention.

Note: this only affects the OS environment name convention and the config name in `store.state`


Patch:
diff --git a/dash/_configs.py b/dash/_configs.py
index e187a5f08..3c441141f 100644
--- a/dash/_configs.py
+++ b/dash/_configs.py
@@ -21,8 +21,8 @@ def load_dash_env_vars():
                 'DASH_INCLUDE_ASSETS_FILES',
                 'DASH_SERVE_DEV_BUNDLES',
                 'DASH_DEBUG',
-                'DASH_DEV_TOOLS_UI',
-                'DASH_DEV_TOOLS_PROPS_CHECK',
+                'DASH_UI',
+                'DASH_PROPS_CHECK',
                 'DASH_HOT_RELOAD',
                 'DASH_HOT_RELOAD_INTERVAL',
                 'DASH_HOT_RELOAD_WATCH_INTERVAL',
diff --git a/dash/dash.py b/dash/dash.py
index f3a810f6b..595b646dc 100644
--- a/dash/dash.py
+++ b/dash/dash.py
@@ -243,8 +243,8 @@ class Dash(object):
             'hot_reload_interval': 3000,
             'hot_reload_watch_interval': 0.5,
             'hot_reload_max_retry': 8,
-            'dev_tools_ui': False,
-            'dev_tools_props_check': False,
+            'ui': False,
+            'props_check': False,
         })
 
         # add a handler for components suites errors to return 404
@@ -335,8 +335,8 @@ class Dash(object):
         config = {
             'url_base_pathname': self.url_base_pathname,
             'requests_pathname_prefix': self.config.requests_pathname_prefix,
-            'dev_tools_ui': self._dev_tools.dev_tools_ui,
-            'dev_tools_props_check': self._dev_tools.dev_tools_props_check,
+            'ui': self._dev_tools.ui,
+            'props_check': self._dev_tools.props_check,
         }
         if self._dev_tools.hot_reload:
             config['hot_reload'] = {
@@ -1267,8 +1267,8 @@ class Dash(object):
         Available dev_tools environment variables:
 
             - DASH_DEBUG
-            - DASH_DEV_TOOLS_UI
-            - DASH_DEV_TOOLS_PROPS_CHECK
+            - DASH_UI
+            - DASH_PROPS_CHECK
             - DASH_SERVE_DEV_BUNDLES
             - DASH_HOT_RELOAD
             - DASH_HOT_RELOAD_INTERVAL
@@ -1311,11 +1311,11 @@ class Dash(object):
         """
         debug = debug or get_combined_config('debug', None, debug)
 
-        self._dev_tools['dev_tools_ui'] = get_combined_config(
-            'dev_tools_ui', dev_tools_ui, default=debug
+        self._dev_tools['ui'] = get_combined_config(
+            'ui', dev_tools_ui, default=debug
         )
-        self._dev_tools['dev_tools_props_check'] = get_combined_config(
-            'dev_tools_props_check', dev_tools_props_check, default=debug
+        self._dev_tools['props_check'] = get_combined_config(
+            'props_check', dev_tools_props_check, default=debug
         )
         self._dev_tools['serve_dev_bundles'] = get_combined_config(
             'serve_dev_bundles', dev_tools_serve_dev_bundles, default=debug)


Test patch:
diff --git a/tests/test_configs.py b/tests/test_configs.py
index 28abb82bb..28417f09f 100644
--- a/tests/test_configs.py
+++ b/tests/test_configs.py
@@ -107,25 +107,25 @@ class TestConfigs(unittest.TestCase):
         self.assertEqual('/requests/routes/assets/reset.css', path)
 
     def test_get_combined_config_dev_tools_ui(self):
-        val1 = get_combined_config('dev_tools_ui', None, default=False)
+        val1 = get_combined_config('ui', None, default=False)
         self.assertEqual(
             val1, False,
             "should return the default value if None is provided for init and environment")
-        os.environ['DASH_DEV_TOOLS_UI'] = 'true'
-        val2 = get_combined_config('dev_tools_ui', None, default=False)
+        os.environ['DASH_UI'] = 'true'
+        val2 = get_combined_config('ui', None, default=False)
         self.assertEqual(val2, True, "should return the set environment value as True")
-        val3 = get_combined_config('dev_tools_ui', False, default=True)
+        val3 = get_combined_config('ui', False, default=True)
         self.assertEqual(val3, False, "init value overrides the environment value")
 
-    def test_get_combined_config_dev_tools_props_check(self):
-        val1 = get_combined_config('dev_tools_props_check', None, default=False)
+    def test_get_combined_config_props_check(self):
+        val1 = get_combined_config('props_check', None, default=False)
         self.assertEqual(
             val1, False,
             "should return the default value if None is provided for init and environment")
-        os.environ['DASH_DEV_TOOLS_PROPS_CHECK'] = 'true'
-        val2 = get_combined_config('dev_tools_props_check', None, default=False)
+        os.environ['DASH_PROPS_CHECK'] = 'true'
+        val2 = get_combined_config('props_check', None, default=False)
         self.assertEqual(val2, True, "should return the set environment value as True")
-        val3 = get_combined_config('dev_tools_props_check', False, default=True)
+        val3 = get_combined_config('props_check', False, default=True)
         self.assertEqual(val3, False, "init value overrides the environment value")
 
     def test_load_dash_env_vars_refects_to_os_environ(self):