From 255df461a80c20e39adb9629a62c438eba5d211b Mon Sep 17 00:00:00 2001 From: Raul Bardaji Date: Tue, 2 Feb 2021 16:16:01 +0100 Subject: [PATCH] bug in widget --- docs/examples/emso-qc-widget.ipynb | 1013 ----------------------- mooda/__init__.py | 2 +- mooda/util/md_widgets/widget_emso_qc.py | 120 ++- setup.py | 2 +- 4 files changed, 81 insertions(+), 1056 deletions(-) delete mode 100644 docs/examples/emso-qc-widget.ipynb diff --git a/docs/examples/emso-qc-widget.ipynb b/docs/examples/emso-qc-widget.ipynb deleted file mode 100644 index da91023..0000000 --- a/docs/examples/emso-qc-widget.ipynb +++ /dev/null @@ -1,1013 +0,0 @@ -{ - "metadata": { - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.4-final" - }, - "orig_nbformat": 2, - "kernelspec": { - "name": "python3", - "display_name": "Python 3", - "language": "python" - } - }, - "nbformat": 4, - "nbformat_minor": 2, - "cells": [ - { - "source": [ - "# How to download EMSO data and perform QC data tests with a Jupyter Notebook Widget" - ], - "cell_type": "markdown", - "metadata": {} - }, - { - "source": [ - "This widget is developed with [mooda.widget_emso()](https://github.com/rbardaji/mooda/blob/master/docs/examples/emso-widget.md) and [mooda.widget_qc()](https://github.com/rbardaji/mooda/blob/master/docs/examples/qc-widget.md)." - ], - "cell_type": "markdown", - "metadata": {} - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "output_type": "display_data", - "data": { - "text/html": " \n " - }, - "metadata": {} - }, - { - "output_type": "display_data", - "data": { - "application/vnd.plotly.v1+json": { - "config": { - "plotlyServerURL": "https://plot.ly" - }, - "data": [ - { - "lat": [ - 48.9656, - 53.2308, - 37.30135, - 37.2888, - 43.8264, - 41.182, - 44.318, - 43.98, - 44.7, - 42.8, - 29.1717, - 36.8288, - 40.8568, - 40.7934, - 40.8703, - 42.793 - ], - "lon": [ - -16.36905, - -9.2609, - -32.27659, - -32.27562, - 9.1117, - 1.75235, - 30.417, - 29.936, - 30.779, - 6.17, - -15.9167, - 21.6068, - 28.1523, - 29.0312, - 28.5244, - 6.038 - ], - "marker": { - "size": 14 - }, - "mode": "markers", - "text": [ - "PAP-1", - "Galway-coast-buoy", - "EXIF0001", - "EXIF0002", - "W1M3A", - "OBSEA", - "EUXRo02", - "EUXRo03", - "EUXRo01", - "ANTARES", - "ESTOC-C", - "68422", - "Marmara-BPR3", - "Marmara-BPR2", - "Marmara-BPR1", - "ALBATROSS" - ], - "type": "scattermapbox" - } - ], - "layout": { - "autosize": true, - "height": 350, - "hovermode": "closest", - "mapbox": { - "accesstoken": "pk.eyJ1IjoiYmFyZGFqaSIsImEiOiJjank0Z283NjkxMWtxM2NxOGJqaHp5Njh0In0.KAdUAjLEHxqPgFzv4w0-ew", - "bearing": 0, - "center": { - "lat": 41.806684375, - "lon": 7.213743125 - }, - "pitch": 0, - "style": "satellite", - "zoom": 2.5 - }, - "margin": { - "b": 0, - "l": 0, - "r": 0, - "t": 0 - }, - "template": { - "data": { - "bar": [ - { - "error_x": { - "color": "#2a3f5f" - }, - "error_y": { - "color": "#2a3f5f" - }, - "marker": { - "line": { - "color": "#E5ECF6", - "width": 0.5 - } - }, - "type": "bar" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "#E5ECF6", - "width": 0.5 - } - }, - "type": "barpolar" - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#2a3f5f", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "#2a3f5f" - }, - "baxis": { - "endlinecolor": "#2a3f5f", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "#2a3f5f" - }, - "type": "carpet" - } - ], - "choropleth": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "choropleth" - } - ], - "contour": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "contour" - } - ], - "contourcarpet": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "contourcarpet" - } - ], - "heatmap": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "heatmap" - } - ], - "heatmapgl": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "heatmapgl" - } - ], - "histogram": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "histogram" - } - ], - "histogram2d": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "histogram2d" - } - ], - "histogram2dcontour": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "histogram2dcontour" - } - ], - "mesh3d": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "mesh3d" - } - ], - "parcoords": [ - { - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "parcoords" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ], - "scatter": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatter" - } - ], - "scatter3d": [ - { - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatter3d" - } - ], - "scattercarpet": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattercarpet" - } - ], - "scattergeo": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattergeo" - } - ], - "scattergl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattergl" - } - ], - "scattermapbox": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattermapbox" - } - ], - "scatterpolar": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterpolar" - } - ], - "scatterpolargl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterpolargl" - } - ], - "scatterternary": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterternary" - } - ], - "surface": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "surface" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#EBF0F8" - }, - "line": { - "color": "white" - } - }, - "header": { - "fill": { - "color": "#C8D4E3" - }, - "line": { - "color": "white" - } - }, - "type": "table" - } - ] - }, - "layout": { - "annotationdefaults": { - "arrowcolor": "#2a3f5f", - "arrowhead": 0, - "arrowwidth": 1 - }, - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ], - "sequential": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ] - }, - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#2a3f5f" - }, - "geo": { - "bgcolor": "white", - "lakecolor": "white", - "landcolor": "#E5ECF6", - "showlakes": true, - "showland": true, - "subunitcolor": "white" - }, - "hoverlabel": { - "align": "left" - }, - "hovermode": "closest", - "mapbox": { - "style": "light" - }, - "paper_bgcolor": "white", - "plot_bgcolor": "#E5ECF6", - "polar": { - "angularaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "bgcolor": "#E5ECF6", - "radialaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - } - }, - "scene": { - "xaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - }, - "yaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - }, - "zaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - } - }, - "shapedefaults": { - "line": { - "color": "#2a3f5f" - } - }, - "ternary": { - "aaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "baxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "bgcolor": "#E5ECF6", - "caxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - } - }, - "title": { - "x": 0.05 - }, - "xaxis": { - "automargin": true, - "gridcolor": "white", - "linecolor": "white", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "white", - "zerolinewidth": 2 - }, - "yaxis": { - "automargin": true, - "gridcolor": "white", - "linecolor": "white", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "white", - "zerolinewidth": 2 - } - } - } - } - }, - "text/html": "
\n \n \n
\n \n
" - }, - "metadata": {} - }, - { - "output_type": "display_data", - "data": { - "text/plain": "VBox(children=(HBox(children=(Label(value='User:'), Text(value='bardaji'), Label(value='Password:'), Text(valu…", - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "03752cffd5d14462ad531e7ede804c0f" - } - }, - "metadata": {} - } - ], - "source": [ - "import mooda as md\n", - "\n", - "wf = md.WaterFrame()\n", - "\n", - "gui = md.widget_emso_qc(wf, user='bardaji', password='1234test')\n", - "gui" - ] - }, - { - "source": [ - "Now, we can seve the WaterFrame in a file." - ], - "cell_type": "markdown", - "metadata": {} - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "output_type": "display_data", - "data": { - "text/plain": "VBox(children=(Label(value='Save as...'), HBox(children=(Label(value='Name:'), Text(value=''))), HBox(children…", - "application/vnd.jupyter.widget-view+json": { - "version_major": 2, - "version_minor": 0, - "model_id": "d2697d7aba1d4dd18e960ae5160fc6e7" - } - }, - "metadata": {} - } - ], - "source": [ - "gui_save = md.widget_save(wf)\n", - "gui_save" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ] -} \ No newline at end of file diff --git a/mooda/__init__.py b/mooda/__init__.py index e034b12..e383e9e 100644 --- a/mooda/__init__.py +++ b/mooda/__init__.py @@ -6,4 +6,4 @@ from .util import concat, iplot_location, iplot_timeseries, md5, \ es_create_indexes, EMSO, widget_qc, widget_emso, widget_emso_qc, widget_save -__version__ = '1.9.0' +__version__ = '1.9.1' diff --git a/mooda/util/md_widgets/widget_emso_qc.py b/mooda/util/md_widgets/widget_emso_qc.py index e94ce0b..f2cf40a 100644 --- a/mooda/util/md_widgets/widget_emso_qc.py +++ b/mooda/util/md_widgets/widget_emso_qc.py @@ -47,6 +47,11 @@ def widget_emso_qc(wf, depth_range: List[float]=[-10, 10000], """ pyo.init_notebook_mode() + # Layout config + label_width = '7rem' + sublabel_width = '5rem' + checkbox_width = '8rem' + def show_result(wf, parameter_in, chart_title=''): # Change name of flags wf2 = wf.copy() @@ -64,13 +69,20 @@ def show_result(wf, parameter_in, chart_title=''): fig.show() # Sing in - user_label = widgets.Label('User:') + authentification_title = widgets.HTML('Authentification') + user_label = widgets.Label('User:', + layout=widgets.Layout(width=label_width)) input_user = widgets.Text(value=user) - password_label = widgets.Label('Password:') - input_password = widgets.Text(value=password) - token_label = widgets.Label('Token:') + password_label = widgets.Label('Password:', + layout=widgets.Layout(width=label_width)) + input_password = widgets.Password(value=password) + or_label = widgets.Label('or', layout=widgets.Layout(width=label_width)) + token_label = widgets.Label('Token:', + layout=widgets.Layout(width=label_width)) input_token = widgets.Text(value=token) + break_label = widgets.Label('') + # map emso = mooda.EMSO(user=input_user.value, password=input_password.value, token=input_token.value) @@ -78,7 +90,9 @@ def show_result(wf, parameter_in, chart_title=''): pio.show(map_dict) # Platform code - platform_label = widgets.Label('Platform code:') + data_title = widgets.HTML('Downloading data') + platform_label = widgets.Label('Platform code:', + layout=widgets.Layout(width=label_width)) platform_codes = emso.get_info_platform_code() input_platform = widgets.Dropdown(options=platform_codes, value=platform_codes[0], disabled=False) @@ -106,17 +120,20 @@ def show_result(wf, parameter_in, chart_title=''): end_date = None # Parameters - parameters_label = widgets.Label('Parameters:') + parameters_label = widgets.Label('Parameters:', + layout=widgets.Layout(width=label_width)) input_parameters = widgets.SelectMultiple(options=parameter_list, rows=10, disabled=False, value=[parameter_list[0]]) # Size - size_label = widgets.Label('Size:') + size_label = widgets.Label('Size:', + layout=widgets.Layout(width=label_width)) input_size = widgets.BoundedIntText(value=10, min=1, step=1) # Depth - depth_label = widgets.Label('Depth:') + depth_label = widgets.Label('Depth:', + layout=widgets.Layout(width=label_width)) input_depth = widgets.FloatRangeSlider(value=[depth_min, depth_max], min=depth_min, max=depth_max, step=0.1, @@ -126,7 +143,8 @@ def show_result(wf, parameter_in, chart_title=''): readout=True, readout_format='.1f') # Time - start_date_label = widgets.Label('Start date:') + start_date_label = widgets.Label('Start date:', + layout=widgets.Layout(width=label_width)) input_start_date = widgets.DatePicker(disabled=False, min_date=date( int(start_date.split('-')[0]), @@ -141,7 +159,8 @@ def show_result(wf, parameter_in, chart_title=''): int(start_date.split('-')[1]), int(start_date.split('-')[2]))) - end_date_label = widgets.Label('End date:') + end_date_label = widgets.Label('End date:', + layout=widgets.Layout(width=label_width)) input_end_date = widgets.DatePicker(disabled=False, min_date=date( int(start_date.split('-')[0]), @@ -156,28 +175,38 @@ def show_result(wf, parameter_in, chart_title=''): int(end_date.split('-')[1]), int(end_date.split('-')[2]))) - qc_label = widgets.Label('QC Tests') + qc_label = widgets.HTML('Data QC Tests - Select the test to run') + # Layout config + checkbox_width = '8rem' # Reset flags - reset_label = widgets.Label('Reset flags:') - reset_checkbox = widgets.Checkbox(description='Do it!') + # reset_label = widgets.Label('Reset flags:') + reset_checkbox = widgets.Checkbox(description='Reset flags', + style={'description_width': '0'}, + layout=widgets.Layout(width=checkbox_width)) # Flat test - flat_label = widgets.Label('Flat test:') + flat_checkbox = widgets.Checkbox(description='Flat test', + style={'description_width': '0'}, + layout=widgets.Layout(width=checkbox_width)) + window_label = widgets.Label('Window:', + layout=widgets.Layout(width=sublabel_width)) window_flat = widgets.IntText(value=2, - description='Window:', disabled=False, color='black') - flat_checkbox = widgets.Checkbox(description='Do it!') + # Range test - range_label = widgets.Label('Range test:') - range_checkbox = widgets.Checkbox(description='Do it!') + # range_label = widgets.Label('Range test:') + range_checkbox = widgets.Checkbox(description='Range test', + style={'description_width': '0'}, + layout=widgets.Layout(width=checkbox_width)) + limit_label = widgets.Label('Limits:', + layout=widgets.Layout(width=sublabel_width)) limits = widgets.FloatRangeSlider(value=[range_test[0], range_test[1]], min=range_test[0], max=range_test[1], step=0.1, - description='Limits:', disabled=False, continuous_update=False, orientation='horizontal', @@ -185,20 +214,23 @@ def show_result(wf, parameter_in, chart_title=''): readout_format='.1f') # Spike test - spike_label = widgets.Label('Spike test:') - spike_checkbox = widgets.Checkbox(description='Do it!') - window_spike = widgets.IntText(value=spike_window, - description='Window:', disabled=False, - color='black') - threshold = widgets.FloatText(value=spike_threshold, - description='Threshold:', disabled=False, - color='black') + # spike_label = widgets.Label('Spike test:') + spike_checkbox = widgets.Checkbox(description='Spike test', + style={'description_width': '0'}, + layout=widgets.Layout(width=checkbox_width)) + window_spike = widgets.IntText(value=spike_window, disabled=False, + color='black') + threshold_label = widgets.Label('Threshold:', + layout=widgets.Layout(width=sublabel_width)) + threshold = widgets.FloatText(value=spike_threshold, disabled=False, + color='black') + influence_label = widgets.Label('Influence:', + layout=widgets.Layout(width=sublabel_width)) influence = widgets.FloatSlider( value=spike_influence, min=0, max=1, step=0.1, - description='Influence:', disabled=False, continuous_update=False, orientation='horizontal', @@ -208,8 +240,9 @@ def show_result(wf, parameter_in, chart_title=''): ) # Replace - replace_label = widgets.Label('Replace QC:') - replace_checkbox = widgets.Checkbox(description='Do it!') + # replace_label = widgets.Label('Replace QC:') + replace_checkbox = widgets.Checkbox(description='Replace flags', + style={'description_width': '0'}) def update_components(_): # Update all components @@ -349,9 +382,8 @@ def on_button_clicked(_): # linking button and function together using a button's method button.on_click(on_button_clicked) - - user_box = widgets.HBox([user_label, input_user, password_label, - input_password]) + user_box = widgets.HBox([user_label, input_user]) + password_box = widgets.HBox([password_label, input_password]) token_box = widgets.HBox([token_label, input_token]) platform_box = widgets.HBox([platform_label, input_platform]) parameters_box = widgets.HBox([parameters_label, input_parameters]) @@ -359,14 +391,20 @@ def on_button_clicked(_): depth_box = widgets.HBox([depth_label, input_depth]) start_date_box = widgets.HBox([start_date_label, input_start_date]) end_date_box = widgets.HBox([end_date_label, input_end_date]) - reset_box = widgets.HBox([reset_label, reset_checkbox]) - flat_box = widgets.HBox([flat_label, flat_checkbox, window_flat]) - range_box = widgets.HBox([range_label, range_checkbox, limits]) - spike_column = widgets.VBox([window_spike, threshold, influence]) - spike_box = widgets.HBox([spike_label, spike_checkbox, spike_column]) - replace_box = widgets.HBox([replace_label, replace_checkbox]) - - main_box = widgets.VBox([user_box, token_box, platform_box, parameters_box, + reset_box = widgets.HBox([reset_checkbox]) + flat_box = widgets.HBox([flat_checkbox, window_label, window_flat]) + range_box = widgets.HBox([range_checkbox, limit_label, limits]) + spike_window_column = widgets.HBox([window_label, window_spike]) + spike_threshold_column = widgets.HBox([threshold_label, threshold]) + spike_influence_column = widgets.HBox([influence_label, influence]) + spike_column = widgets.VBox([spike_window_column, spike_threshold_column, + spike_influence_column]) + spike_box = widgets.HBox([spike_checkbox, spike_column]) + replace_box = widgets.HBox([replace_checkbox]) + + main_box = widgets.VBox([authentification_title, user_box, password_box, + or_label, token_box, data_title, + platform_box, parameters_box, size_box, depth_box, start_date_box, end_date_box, qc_label, reset_box, flat_box, range_box, spike_box, replace_box, button, out, out2]) diff --git a/setup.py b/setup.py index 188d227..3bed244 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ NAME = 'mooda' -VERSION = '1.9.0' +VERSION = '1.9.1' DESCRIPTION = 'Module for Ocean Observatory Data Analysis' LONG_DESCRIPTION = (""" MOODA - Module for Ocean Observatory Data Analysis