diff --git a/README.md b/README.md index 2893422..8cc3779 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## jupyter_Pandas_GUI [Introduction](#introduction) | [Current Features](#current-features) | [Wishlist](#wishlist) | [Usage](#usage) | [Installation](#installation) | -[Issues or comments](#issues-or-comments) | +[Change Log](#change-log) | [Issues or comments](#issues-or-comments) | [License](#this-software-is-distributed-under-the-gnu-v3-license) #### Introduction: @@ -107,7 +107,15 @@ _Development_ Simply replace `$ pip install jupyter-Pandas-GUI` with `$ pip install -e ../jupyter_Pandas_GUI` in the _Production_ instructions. - +#### Change Log +* 0.5.2 + * Widget states autosaved when a new plot is made. + * Began making use of [JPSLUtils](https://github.com/JupyterPhysSciLab/JPSLUtils). +* 0.5.1 + * Possible to use pandas dataframes in namespaces other than the + user global namespace. + * Readme updates. +* 0.5.0 Initial beta release. #### Issues or comments [JupyterPhysSciLab/jupyter_Pandas_GUI](https://github.com/JupyterPhysSciLab/jupyter_Pandas_GUI) diff --git a/pandas_GUI/__init__.py b/pandas_GUI/__init__.py index aad1328..df254ab 100644 --- a/pandas_GUI/__init__.py +++ b/pandas_GUI/__init__.py @@ -13,4 +13,5 @@ # load any supporting files from pandas_GUI.new_pandas_column_GUI import new_pandas_column_GUI -from pandas_GUI.plot_Pandas_GUI import plot_pandas_GUI \ No newline at end of file +from pandas_GUI.plot_Pandas_GUI import plot_pandas_GUI +import JPSLUtils \ No newline at end of file diff --git a/pandas_GUI/plot_Pandas_GUI.py b/pandas_GUI/plot_Pandas_GUI.py index 939283c..d7fed89 100644 --- a/pandas_GUI/plot_Pandas_GUI.py +++ b/pandas_GUI/plot_Pandas_GUI.py @@ -34,6 +34,7 @@ def plot_pandas_GUI(dfs_info=None, show_text_col = False, **kwargs): insert_text_into_next_cell, insert_text_at_beginning_of_current_cell, \ insert_newline_at_end_of_current_cell, select_containing_cell, \ delete_selected_cell, iconselector, notice_group + import JPSLUtils if dfs_info == None: from .utils import find_pandas_dataframe_names @@ -533,11 +534,21 @@ def get_mirror_text(): text = figname+'.update_layout(title = \''+plot_title.value+'\', ' text += 'template = \''+ plot_template.value +'\')' insert_newline_at_end_of_current_cell(text) + text = figname +'.show()' + insert_newline_at_end_of_current_cell(text) + text = '# Force save widget states so that graph will still be' + insert_newline_at_end_of_current_cell(text) + text = '# available when notebook next opened in trusted state.' + insert_newline_at_end_of_current_cell(text) + jscode = 'Jupyter.actions.call(\\"widgets:save-with-widgets\\");' + text = 'JPSLUtils.OTJS(\''+jscode+'\')' + insert_newline_at_end_of_current_cell(text) # run the cell to build the plot - display(JS('Jupyter.notebook.get_selected_cell().execute()')) + JPSLUtils.OTJS('Jupyter.notebook.get_selected_cell().execute()') # remove the GUI cell select_containing_cell('pandasplotGUI') delete_selected_cell() + from time import sleep pass makeplotbut = Button(description = 'Make Plot', disabled = True) makeplotbut.on_click(makeplt_click) diff --git a/setup.py b/setup.py index 86f1234..6ee222a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="jupyter_Pandas_GUI", - version="0.5.1", + version="0.5.2", description="Pandas expression composers using Jupyter widgets.", long_description=long_description, long_description_content_type="text/markdown", @@ -23,6 +23,7 @@ 'numpy>=1.19.0', 'plotly>=4.14.3', 'ipywidgets>=7.6.2', + 'JPSLUtils>=0.5.3', ], classifiers=[ 'Development Status :: 4 - Beta',