diff --git a/CHANGELOG.md b/CHANGELOG.md index 90b4234f9..dc9b85149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ * Changed property `fullChromosomeLabels` so that it can be updated using dash callbacks * Changed Imputer (deprecated) to SimpleImputer in Clustergram component. * Changed property name `impute_function` to `imputer_parameters` in Clustergram component. +* Changed install requirement to Dash version 0.40.0 or greater. ### Added * Added ability to define custom colours in styles parser for Molecule3D. diff --git a/dash_bio/AlignmentChart.py b/dash_bio/AlignmentChart.py index a8bb78d93..01a7339a7 100644 --- a/dash_bio/AlignmentChart.py +++ b/dash_bio/AlignmentChart.py @@ -112,26 +112,3 @@ def __init__(self, id=Component.UNDEFINED, eventDatum=Component.UNDEFINED, data= raise TypeError( 'Required argument `' + k + '` was not specified.') super(AlignmentChart, self).__init__(**args) - - def __repr__(self): - if(any(getattr(self, c, None) is not None - for c in self._prop_names - if c is not self._prop_names[0]) - or any(getattr(self, c, None) is not None - for c in self.__dict__.keys() - if any(c.startswith(wc_attr) - for wc_attr in self._valid_wildcard_attributes))): - props_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self._prop_names - if getattr(self, c, None) is not None]) - wilds_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self.__dict__.keys() - if any([c.startswith(wc_attr) - for wc_attr in - self._valid_wildcard_attributes])]) - return ('AlignmentChart(' + props_string + - (', ' + wilds_string if wilds_string != '' else '') + ')') - else: - return ( - 'AlignmentChart(' + - repr(getattr(self, self._prop_names[0], None)) + ')') diff --git a/dash_bio/AlignmentViewer.py b/dash_bio/AlignmentViewer.py index 93973c4af..7d12a104f 100644 --- a/dash_bio/AlignmentViewer.py +++ b/dash_bio/AlignmentViewer.py @@ -112,26 +112,3 @@ def __init__(self, id=Component.UNDEFINED, eventDatum=Component.UNDEFINED, data= raise TypeError( 'Required argument `' + k + '` was not specified.') super(AlignmentViewer, self).__init__(**args) - - def __repr__(self): - if(any(getattr(self, c, None) is not None - for c in self._prop_names - if c is not self._prop_names[0]) - or any(getattr(self, c, None) is not None - for c in self.__dict__.keys() - if any(c.startswith(wc_attr) - for wc_attr in self._valid_wildcard_attributes))): - props_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self._prop_names - if getattr(self, c, None) is not None]) - wilds_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self.__dict__.keys() - if any([c.startswith(wc_attr) - for wc_attr in - self._valid_wildcard_attributes])]) - return ('AlignmentViewer(' + props_string + - (', ' + wilds_string if wilds_string != '' else '') + ')') - else: - return ( - 'AlignmentViewer(' + - repr(getattr(self, self._prop_names[0], None)) + ')') diff --git a/dash_bio/Circos.py b/dash_bio/Circos.py index bd478d479..ccf746116 100644 --- a/dash_bio/Circos.py +++ b/dash_bio/Circos.py @@ -57,26 +57,3 @@ def __init__(self, enableDownloadSVG=Component.UNDEFINED, enableZoomPan=Componen raise TypeError( 'Required argument `' + k + '` was not specified.') super(Circos, self).__init__(**args) - - def __repr__(self): - if(any(getattr(self, c, None) is not None - for c in self._prop_names - if c is not self._prop_names[0]) - or any(getattr(self, c, None) is not None - for c in self.__dict__.keys() - if any(c.startswith(wc_attr) - for wc_attr in self._valid_wildcard_attributes))): - props_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self._prop_names - if getattr(self, c, None) is not None]) - wilds_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self.__dict__.keys() - if any([c.startswith(wc_attr) - for wc_attr in - self._valid_wildcard_attributes])]) - return ('Circos(' + props_string + - (', ' + wilds_string if wilds_string != '' else '') + ')') - else: - return ( - 'Circos(' + - repr(getattr(self, self._prop_names[0], None)) + ')') diff --git a/dash_bio/Ideogram.py b/dash_bio/Ideogram.py index 1c2b6e78a..c970f4c0b 100644 --- a/dash_bio/Ideogram.py +++ b/dash_bio/Ideogram.py @@ -165,26 +165,3 @@ def __init__(self, id=Component.REQUIRED, style=Component.UNDEFINED, className=C raise TypeError( 'Required argument `' + k + '` was not specified.') super(Ideogram, self).__init__(**args) - - def __repr__(self): - if(any(getattr(self, c, None) is not None - for c in self._prop_names - if c is not self._prop_names[0]) - or any(getattr(self, c, None) is not None - for c in self.__dict__.keys() - if any(c.startswith(wc_attr) - for wc_attr in self._valid_wildcard_attributes))): - props_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self._prop_names - if getattr(self, c, None) is not None]) - wilds_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self.__dict__.keys() - if any([c.startswith(wc_attr) - for wc_attr in - self._valid_wildcard_attributes])]) - return ('Ideogram(' + props_string + - (', ' + wilds_string if wilds_string != '' else '') + ')') - else: - return ( - 'Ideogram(' + - repr(getattr(self, self._prop_names[0], None)) + ')') diff --git a/dash_bio/Molecule3dViewer.py b/dash_bio/Molecule3dViewer.py index aea4c2d43..0aa4bb857 100644 --- a/dash_bio/Molecule3dViewer.py +++ b/dash_bio/Molecule3dViewer.py @@ -42,26 +42,3 @@ def __init__(self, id=Component.UNDEFINED, selectionType=Component.UNDEFINED, ba raise TypeError( 'Required argument `' + k + '` was not specified.') super(Molecule3dViewer, self).__init__(**args) - - def __repr__(self): - if(any(getattr(self, c, None) is not None - for c in self._prop_names - if c is not self._prop_names[0]) - or any(getattr(self, c, None) is not None - for c in self.__dict__.keys() - if any(c.startswith(wc_attr) - for wc_attr in self._valid_wildcard_attributes))): - props_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self._prop_names - if getattr(self, c, None) is not None]) - wilds_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self.__dict__.keys() - if any([c.startswith(wc_attr) - for wc_attr in - self._valid_wildcard_attributes])]) - return ('Molecule3dViewer(' + props_string + - (', ' + wilds_string if wilds_string != '' else '') + ')') - else: - return ( - 'Molecule3dViewer(' + - repr(getattr(self, self._prop_names[0], None)) + ')') diff --git a/dash_bio/NeedlePlot.py b/dash_bio/NeedlePlot.py index 451c29597..e0c960603 100644 --- a/dash_bio/NeedlePlot.py +++ b/dash_bio/NeedlePlot.py @@ -51,26 +51,3 @@ def __init__(self, id=Component.UNDEFINED, mutationData=Component.UNDEFINED, xla raise TypeError( 'Required argument `' + k + '` was not specified.') super(NeedlePlot, self).__init__(**args) - - def __repr__(self): - if(any(getattr(self, c, None) is not None - for c in self._prop_names - if c is not self._prop_names[0]) - or any(getattr(self, c, None) is not None - for c in self.__dict__.keys() - if any(c.startswith(wc_attr) - for wc_attr in self._valid_wildcard_attributes))): - props_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self._prop_names - if getattr(self, c, None) is not None]) - wilds_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self.__dict__.keys() - if any([c.startswith(wc_attr) - for wc_attr in - self._valid_wildcard_attributes])]) - return ('NeedlePlot(' + props_string + - (', ' + wilds_string if wilds_string != '' else '') + ')') - else: - return ( - 'NeedlePlot(' + - repr(getattr(self, self._prop_names[0], None)) + ')') diff --git a/dash_bio/OncoPrint.py b/dash_bio/OncoPrint.py index 55abc250f..5de6bdd68 100644 --- a/dash_bio/OncoPrint.py +++ b/dash_bio/OncoPrint.py @@ -60,26 +60,3 @@ def __init__(self, id=Component.UNDEFINED, eventDatum=Component.UNDEFINED, data= raise TypeError( 'Required argument `' + k + '` was not specified.') super(OncoPrint, self).__init__(**args) - - def __repr__(self): - if(any(getattr(self, c, None) is not None - for c in self._prop_names - if c is not self._prop_names[0]) - or any(getattr(self, c, None) is not None - for c in self.__dict__.keys() - if any(c.startswith(wc_attr) - for wc_attr in self._valid_wildcard_attributes))): - props_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self._prop_names - if getattr(self, c, None) is not None]) - wilds_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self.__dict__.keys() - if any([c.startswith(wc_attr) - for wc_attr in - self._valid_wildcard_attributes])]) - return ('OncoPrint(' + props_string + - (', ' + wilds_string if wilds_string != '' else '') + ')') - else: - return ( - 'OncoPrint(' + - repr(getattr(self, self._prop_names[0], None)) + ')') diff --git a/dash_bio/SequenceViewer.py b/dash_bio/SequenceViewer.py index 5be2c195d..c467d9010 100644 --- a/dash_bio/SequenceViewer.py +++ b/dash_bio/SequenceViewer.py @@ -76,26 +76,3 @@ def __init__(self, id=Component.UNDEFINED, sequence=Component.UNDEFINED, showLin raise TypeError( 'Required argument `' + k + '` was not specified.') super(SequenceViewer, self).__init__(**args) - - def __repr__(self): - if(any(getattr(self, c, None) is not None - for c in self._prop_names - if c is not self._prop_names[0]) - or any(getattr(self, c, None) is not None - for c in self.__dict__.keys() - if any(c.startswith(wc_attr) - for wc_attr in self._valid_wildcard_attributes))): - props_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self._prop_names - if getattr(self, c, None) is not None]) - wilds_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self.__dict__.keys() - if any([c.startswith(wc_attr) - for wc_attr in - self._valid_wildcard_attributes])]) - return ('SequenceViewer(' + props_string + - (', ' + wilds_string if wilds_string != '' else '') + ')') - else: - return ( - 'SequenceViewer(' + - repr(getattr(self, self._prop_names[0], None)) + ')') diff --git a/dash_bio/Speck.py b/dash_bio/Speck.py index a38cfe6e1..e81d3c923 100644 --- a/dash_bio/Speck.py +++ b/dash_bio/Speck.py @@ -61,26 +61,3 @@ def __init__(self, id=Component.UNDEFINED, data=Component.UNDEFINED, scrollZoom= raise TypeError( 'Required argument `' + k + '` was not specified.') super(Speck, self).__init__(**args) - - def __repr__(self): - if(any(getattr(self, c, None) is not None - for c in self._prop_names - if c is not self._prop_names[0]) - or any(getattr(self, c, None) is not None - for c in self.__dict__.keys() - if any(c.startswith(wc_attr) - for wc_attr in self._valid_wildcard_attributes))): - props_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self._prop_names - if getattr(self, c, None) is not None]) - wilds_string = ', '.join([c+'='+repr(getattr(self, c, None)) - for c in self.__dict__.keys() - if any([c.startswith(wc_attr) - for wc_attr in - self._valid_wildcard_attributes])]) - return ('Speck(' + props_string + - (', ' + wilds_string if wilds_string != '' else '') + ')') - else: - return ( - 'Speck(' + - repr(getattr(self, self._prop_names[0], None)) + ')') diff --git a/requirements.txt b/requirements.txt index 40192dc98..ad1713502 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,13 +5,9 @@ biopython colour==0.1.5 cython>=0.19 -dash==0.37.0 +dash>=0.40.0 dash-bio==0.0.8rc13 -dash-core-components==0.43.1 dash-daq==0.1.4 -dash-html-components==0.13.5 -dash-renderer==0.18.0 -dash-table==3.4.0 gunicorn jsonschema matplotlib diff --git a/setup.py b/setup.py index 8f77abc0d..b106cd8c0 100644 --- a/setup.py +++ b/setup.py @@ -18,8 +18,7 @@ install_requires=[ 'biopython', 'colour', - 'dash>=0.37.0', - 'dash-html-components', + 'dash>=0.40.0', 'pandas', 'parmed', 'plotly', diff --git a/tests/dashbio_demos/app_alignment_viewer.py b/tests/dashbio_demos/app_alignment_viewer.py index 2433e4d50..9ba2fd3bd 100644 --- a/tests/dashbio_demos/app_alignment_viewer.py +++ b/tests/dashbio_demos/app_alignment_viewer.py @@ -104,11 +104,11 @@ def layout(): html.Div([ html.Div(id='alignment-control-tabs', children=[ dcc.Tabs( - id='alignment-tabs', + id='alignment-tabs', value='what-is', children=[ dcc.Tab( label='About', - value='alignment-tab-about', + value='what-is', children=html.Div(className='alignment-tab', children=[ html.H4( "What is Alignment Viewer?" diff --git a/tests/dashbio_demos/app_circos.py b/tests/dashbio_demos/app_circos.py index 9aed12833..a51a2d232 100644 --- a/tests/dashbio_demos/app_circos.py +++ b/tests/dashbio_demos/app_circos.py @@ -922,7 +922,7 @@ def layout(): ), html.Div(id='circos-control-tabs', children=[ - dcc.Tabs(id='circos-tabs', children=[ + dcc.Tabs(id='circos-tabs', value='what-is', children=[ dcc.Tab( label='About', value='what-is', diff --git a/tests/dashbio_demos/app_clustergram.py b/tests/dashbio_demos/app_clustergram.py index 2501724d2..754bd1f04 100644 --- a/tests/dashbio_demos/app_clustergram.py +++ b/tests/dashbio_demos/app_clustergram.py @@ -125,7 +125,7 @@ def layout(): ), html.Div(id='clustergram-control-tabs', children=[ - dcc.Tabs(id='clustergram-tabs', children=[ + dcc.Tabs(id='clustergram-tabs', value='what-is', children=[ dcc.Tab( label='About', value='what-is', diff --git a/tests/dashbio_demos/app_ideogram.py b/tests/dashbio_demos/app_ideogram.py index 4fec5a9e9..b93120782 100644 --- a/tests/dashbio_demos/app_ideogram.py +++ b/tests/dashbio_demos/app_ideogram.py @@ -426,7 +426,7 @@ def layout(): return html.Div(id='ideogram-body', children=[ html.Div(id='ideogram-container'), html.Div(id='ideogram-control-tabs', children=[ - dcc.Tabs(id='ideogram-tabs', children=[ + dcc.Tabs(id='ideogram-tabs', value='what-is', children=[ dcc.Tab( label='About', value='what-is', diff --git a/tests/dashbio_demos/app_manhattan_plot.py b/tests/dashbio_demos/app_manhattan_plot.py index fa1dd876d..90f293feb 100644 --- a/tests/dashbio_demos/app_manhattan_plot.py +++ b/tests/dashbio_demos/app_manhattan_plot.py @@ -53,7 +53,7 @@ def layout(): ), html.Div(id='manhattan-control-tabs', children=[ - dcc.Tabs(id='manhattan-tabs', children=[ + dcc.Tabs(id='manhattan-tabs', value='what-is', children=[ dcc.Tab( label='About', value='what-is', diff --git a/tests/dashbio_demos/app_molecule3d.py b/tests/dashbio_demos/app_molecule3d.py index 439de3a5d..d26cd7c8b 100644 --- a/tests/dashbio_demos/app_molecule3d.py +++ b/tests/dashbio_demos/app_molecule3d.py @@ -41,11 +41,10 @@ def layout(): return html.Div( id="mol3d-body", children=[ - html.Div( id='mol3d-control-tabs', children=[ - dcc.Tabs([ + dcc.Tabs(id='mol3d-tabs', value='what-is', children=[ dcc.Tab( label='About', value='what-is', @@ -231,7 +230,6 @@ def layout(): ), ]), - html.Div(id='mol3d-tabs-content') ]), html.Div( diff --git a/tests/dashbio_demos/app_needle_plot.py b/tests/dashbio_demos/app_needle_plot.py index ff6a29e50..1ca8ba258 100644 --- a/tests/dashbio_demos/app_needle_plot.py +++ b/tests/dashbio_demos/app_needle_plot.py @@ -120,7 +120,7 @@ def layout(): ), html.Div(id='needleplot-control-tabs', children=[ - dcc.Tabs(id='needleplot-tabs', children=[ + dcc.Tabs(id='needleplot-tabs', value='what-is', children=[ dcc.Tab( label='About', value='what-is', diff --git a/tests/dashbio_demos/app_sequence_viewer.py b/tests/dashbio_demos/app_sequence_viewer.py index 68f6a80ca..b3dd9bb09 100644 --- a/tests/dashbio_demos/app_sequence_viewer.py +++ b/tests/dashbio_demos/app_sequence_viewer.py @@ -151,7 +151,7 @@ def layout(): ), html.Div(id='seq-view-control-tabs', children=[ - dcc.Tabs(id='seq-view-tabs', children=[ + dcc.Tabs(id='seq-view-tabs', value='what-is', children=[ dcc.Tab( label='About', value='what-is', diff --git a/tests/dashbio_demos/app_speck.py b/tests/dashbio_demos/app_speck.py index 0b05c33de..79a1a26a6 100644 --- a/tests/dashbio_demos/app_speck.py +++ b/tests/dashbio_demos/app_speck.py @@ -134,7 +134,7 @@ def layout(): ), html.Div(id='speck-control-tabs', children=[ - dcc.Tabs(id='speck-tabs', children=[ + dcc.Tabs(id='speck-tabs', value='what-is', children=[ dcc.Tab( label='About', value='what-is', @@ -236,14 +236,6 @@ def layout(): id='speck-store-preset-atom-style', data=None ), - dcc.Store( - id='speck-view-updated', - data=None - ), - - html.Div( - id='speck-idk' - ) ]) @@ -267,13 +259,6 @@ def show_hide_preset_controls(presets_enable): return {'display': 'none'} return {'display': 'inline-block'} - @app.callback( - Output('speck-view-updated', 'data'), - [Input('speck', 'view')] - ) - def update_something(_): - return 'update' - @app.callback( Output('speck', 'data'), [Input('speck-molecule-dropdown', 'value')]