Skip to content

Commit

Permalink
Merge pull request #372 from informatics-lab/fix-feature-ui
Browse files Browse the repository at this point in the history
Use data.FEATURE_FLAGS to access web based feature flags
  • Loading branch information
andrewgryan authored May 7, 2020
2 parents bb17099 + 14e7ae6 commit a09444c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion forest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
.. automodule:: forest.presets
"""
__version__ = '0.16.0'
__version__ = '0.16.1'

from .config import *
from . import (
Expand Down
8 changes: 4 additions & 4 deletions forest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def on_change(event):
"profile": "Display Profile"
}
available_features = {k: display_names[k]
for k in display_names.keys() if config.features[k]}
for k in display_names.keys() if data.FEATURE_FLAGS[k]}

tools_panel = tools.ToolsPanel(available_features)
tools_panel.connect(store)
Expand Down Expand Up @@ -256,7 +256,7 @@ def on_change(event):
controls.connect(store)

# Add support for a modal dialogue
if config.features["multiple_colorbars"]:
if data.FEATURE_FLAGS["multiple_colorbars"]:
view = forest.components.modal.Tabbed()
else:
view = forest.components.modal.Default()
Expand Down Expand Up @@ -327,7 +327,7 @@ def on_change(event):
])

tool_figures = {}
if config.features["time_series"]:
if data.FEATURE_FLAGS["time_series"]:
# Series sub-figure widget
series_figure = bokeh.plotting.figure(
plot_width=400,
Expand All @@ -351,7 +351,7 @@ def on_change(event):

tool_figures["series_figure"] = series_figure

if config.features["profile"]:
if data.FEATURE_FLAGS["profile"]:
# Profile sub-figure widget
profile_figure = bokeh.plotting.figure(
plot_width=300,
Expand Down

0 comments on commit a09444c

Please sign in to comment.