From 340ebfaff8565b2f1d624e7f4bb995c6876198db Mon Sep 17 00:00:00 2001 From: cjachekang Date: Tue, 29 Sep 2020 20:06:38 -0700 Subject: [PATCH 01/20] added functionality to delete Vis --- lux/core/frame.py | 11 +++++++++-- lux/vis/VisList.py | 4 ++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lux/core/frame.py b/lux/core/frame.py index e64932ab..b7229820 100644 --- a/lux/core/frame.py +++ b/lux/core/frame.py @@ -476,7 +476,8 @@ def exported(self) -> Union[Dict[str,VisList], VisList]: "See more: https://lux-api.readthedocs.io/en/latest/source/guide/FAQ.html#troubleshooting-tips" , stacklevel=2) return [] - exported_vis_lst =self._widget._exportedVisIdxs + self.removeDeletedRecs() + exported_vis_lst = self._widget._exportedVisIdxs exported_vis = [] if (exported_vis_lst=={}): warnings.warn( @@ -505,6 +506,12 @@ def exported(self) -> Union[Dict[str,VisList], VisList]: ,stacklevel=2) return [] + def removeDeletedRecs(self): + for action in self._widget.deletedIndices: + for index in self._widget.deletedIndices[action]: + self.recommendation[action].remove_index(index) + self._widget.deletedIndices = {} + def _repr_html_(self): from IPython.display import display from IPython.display import clear_output @@ -668,7 +675,7 @@ def rec_to_JSON(recs): # delete DataObjectCollection since not JSON serializable del rec_lst[idx]["collection"] return rec_lst - + # Overridden Pandas Functions def head(self, n: int = 5): self._prev = self diff --git a/lux/vis/VisList.py b/lux/vis/VisList.py index 121c8912..d9267d96 100644 --- a/lux/vis/VisList.py +++ b/lux/vis/VisList.py @@ -79,6 +79,10 @@ def remove_duplicates(self) -> None: Removes duplicate visualizations in Vis List """ self._collection = list(set(self._collection)) + + def remove_index(self, index): + self._collection.pop(index) + def _is_vis_input(self): if (type(self._input_lst[0])==Vis): return True From 0a3bd4136b01349a0216e1adb184124fe3685172 Mon Sep 17 00:00:00 2001 From: cjachekang Date: Sat, 3 Oct 2020 23:54:49 -0700 Subject: [PATCH 02/20] fixed deletion logic --- lux/core/frame.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lux/core/frame.py b/lux/core/frame.py index fab9b855..2f6a6010 100644 --- a/lux/core/frame.py +++ b/lux/core/frame.py @@ -516,8 +516,10 @@ def exported(self) -> Union[Dict[str,VisList], VisList]: def removeDeletedRecs(self): for action in self._widget.deletedIndices: + deletedSoFar = 0 for index in self._widget.deletedIndices[action]: - self.recommendation[action].remove_index(index) + self.recommendation[action].remove_index(index - deletedSoFar) + deletedSoFar += 1 self._widget.deletedIndices = {} def _repr_html_(self): From 6678c336ba7c388f45928ae599bc5c6ca8e42002 Mon Sep 17 00:00:00 2001 From: cjachekang Date: Sun, 4 Oct 2020 22:52:41 -0700 Subject: [PATCH 03/20] add observer to automatically update deletions --- lux/core/frame.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lux/core/frame.py b/lux/core/frame.py index c4574109..61af7994 100644 --- a/lux/core/frame.py +++ b/lux/core/frame.py @@ -29,13 +29,14 @@ class LuxDataFrame(pd.DataFrame): # MUST register here for new properties!! _metadata = ['_intent','data_type_lookup','data_type', 'data_model_lookup','data_model','unique_values','cardinality','_rec_info', '_pandas_only', - '_min_max','plot_config', '_current_vis','_widget', '_recommendation','_prev','_history'] + '_min_max','plot_config', '_current_vis','_widget', '_recommendation','_prev','_history', '_saved_export'] def __init__(self,*args, **kw): from lux.executor.PandasExecutor import PandasExecutor self._history = History() self._intent = [] self._recommendation = {} + self._saved_export = None self._current_vis = [] self._prev = None super(LuxDataFrame, self).__init__(*args, **kw) @@ -489,10 +490,11 @@ def exported(self) -> Union[Dict[str,VisList], VisList]: "See more: https://lux-api.readthedocs.io/en/latest/source/guide/FAQ.html#troubleshooting-tips" , stacklevel=2) return [] - self.removeDeletedRecs() exported_vis_lst = self._widget._exportedVisIdxs exported_vis = [] if (exported_vis_lst=={}): + if self._saved_export: + return self._saved_export warnings.warn( "\nNo visualization selected to export.\n" "See more: https://lux-api.readthedocs.io/en/latest/source/guide/FAQ.html#troubleshooting-tips" @@ -511,6 +513,7 @@ def exported(self) -> Union[Dict[str,VisList], VisList]: elif len(exported_vis_lst) == 1 and ("currentVis" not in exported_vis_lst): export_action = list(exported_vis_lst.keys())[0] exported_vis = VisList(list(map(self.recommendation[export_action].__getitem__, exported_vis_lst[export_action]))) + self._saved_export = exported_vis return exported_vis else: warnings.warn( @@ -519,13 +522,12 @@ def exported(self) -> Union[Dict[str,VisList], VisList]: ,stacklevel=2) return [] - def removeDeletedRecs(self): + def removeDeletedRecs(self, change): for action in self._widget.deletedIndices: deletedSoFar = 0 for index in self._widget.deletedIndices[action]: self.recommendation[action].remove_index(index - deletedSoFar) deletedSoFar += 1 - self._widget.deletedIndices = {} def _repr_html_(self): from IPython.display import display @@ -567,6 +569,9 @@ def _repr_html_(self): # df_to_display.maintain_recs() # compute the recommendations (TODO: This can be rendered in another thread in the background to populate self._widget) self.maintain_recs() + #Observers(callback_function, listen_to_this_variable) + self._widget.observe(self.removeDeletedRecs, names='deletedIndices') + # box = widgets.Box(layout=widgets.Layout(display='inline')) button = widgets.Button(description="Toggle Pandas/Lux",layout=widgets.Layout(width='140px',top='5px')) output = widgets.Output() From 5ad35f83405d3a1fc930e0db3ab436309bc4e7fe Mon Sep 17 00:00:00 2001 From: cjachekang Date: Tue, 13 Oct 2020 20:38:57 -0700 Subject: [PATCH 04/20] able to refresh widget on setting intent --- lux/core/frame.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/lux/core/frame.py b/lux/core/frame.py index 61af7994..1be641a2 100644 --- a/lux/core/frame.py +++ b/lux/core/frame.py @@ -529,6 +529,22 @@ def removeDeletedRecs(self, change): self.recommendation[action].remove_index(index - deletedSoFar) deletedSoFar += 1 + def setIntentOnButtonClick(self, change): + from IPython.display import display, clear_output + from lux.processor.Compiler import Compiler + + intent_action = list(self._widget.intentIndex.keys())[0] + vis = self.recommendation[intent_action][self._widget.intentIndex[intent_action][0]] + self.set_intent_as_vis(vis) + + self.maintain_metadata() + self.current_vis = Compiler.compile_intent(self, self._intent) + self.maintain_recs() + + with self.output: + clear_output() + display(self._widget) + def _repr_html_(self): from IPython.display import display from IPython.display import clear_output @@ -571,16 +587,17 @@ def _repr_html_(self): #Observers(callback_function, listen_to_this_variable) self._widget.observe(self.removeDeletedRecs, names='deletedIndices') + self._widget.observe(self.setIntentOnButtonClick, names='intentIndex') # box = widgets.Box(layout=widgets.Layout(display='inline')) button = widgets.Button(description="Toggle Pandas/Lux",layout=widgets.Layout(width='140px',top='5px')) - output = widgets.Output() + self.output = widgets.Output() # box.children = [button,output] # output.children = [button] # display(box) - display(button,output) + display(button,self.output) def on_button_clicked(b): - with output: + with self.output: if (b): self._toggle_pandas_display = not self._toggle_pandas_display clear_output() From 6c11f72506fce42499c9a2345557df9fef7db756 Mon Sep 17 00:00:00 2001 From: cjachekang Date: Wed, 14 Oct 2020 00:58:43 -0700 Subject: [PATCH 05/20] support for setting intent from frontend --- lux/core/frame.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lux/core/frame.py b/lux/core/frame.py index 1be641a2..f074b9ed 100644 --- a/lux/core/frame.py +++ b/lux/core/frame.py @@ -545,6 +545,9 @@ def setIntentOnButtonClick(self, change): clear_output() display(self._widget) + self._widget.observe(self.removeDeletedRecs, names='deletedIndices') + self._widget.observe(self.setIntentOnButtonClick, names='intentIndex') + def _repr_html_(self): from IPython.display import display from IPython.display import clear_output From a85e943022f6b3d55ad39f9d1522c44f9b85ab95 Mon Sep 17 00:00:00 2001 From: cjachekang Date: Mon, 19 Oct 2020 23:33:49 -0700 Subject: [PATCH 06/20] quick fix to output --- lux/core/frame.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lux/core/frame.py b/lux/core/frame.py index 7dbd4f4e..86946284 100644 --- a/lux/core/frame.py +++ b/lux/core/frame.py @@ -603,7 +603,7 @@ def _repr_html_(self): if len(self.recommendation) > 0: # box = widgets.Box(layout=widgets.Layout(display='inline')) button = widgets.Button(description="Toggle Pandas/Lux",layout=widgets.Layout(width='140px',top='5px')) - output = widgets.Output() + self.output = widgets.Output() # box.children = [button,output] # output.children = [button] # display(box) @@ -624,6 +624,7 @@ def on_button_clicked(b): else: warnings.warn("\nLux defaults to Pandas when there are no valid actions defined.",stacklevel=2) display(self.display_pandas()) + except(KeyboardInterrupt,SystemExit): raise except: From a4629946a9c5f41f21a2973418b11943ca5a1966 Mon Sep 17 00:00:00 2001 From: cjachekang Date: Thu, 22 Oct 2020 17:24:02 -0700 Subject: [PATCH 07/20] changed variable intentindex name --- lux/core/frame.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lux/core/frame.py b/lux/core/frame.py index 86946284..6ef8b775 100644 --- a/lux/core/frame.py +++ b/lux/core/frame.py @@ -530,19 +530,19 @@ def exported(self) -> Union[Dict[str,VisList], VisList]: ,stacklevel=2) return [] - def removeDeletedRecs(self, change): + def remove_deleted_recs(self, change): for action in self._widget.deletedIndices: deletedSoFar = 0 for index in self._widget.deletedIndices[action]: self.recommendation[action].remove_index(index - deletedSoFar) deletedSoFar += 1 - def setIntentOnButtonClick(self, change): + def set_intent_on_click(self, change): from IPython.display import display, clear_output from lux.processor.Compiler import Compiler - intent_action = list(self._widget.intentIndex.keys())[0] - vis = self.recommendation[intent_action][self._widget.intentIndex[intent_action][0]] + intent_action = list(self._widget.selectedIntentIndex.keys())[0] + vis = self.recommendation[intent_action][self._widget.selectedIntentIndex[intent_action][0]] self.set_intent_as_vis(vis) self.maintain_metadata() @@ -553,8 +553,8 @@ def setIntentOnButtonClick(self, change): clear_output() display(self._widget) - self._widget.observe(self.removeDeletedRecs, names='deletedIndices') - self._widget.observe(self.setIntentOnButtonClick, names='intentIndex') + self._widget.observe(self.remove_deleted_recs, names='deletedIndices') + self._widget.observe(self.set_intent_on_click, names='selectedIntentIndex') def _repr_html_(self): from IPython.display import display @@ -597,8 +597,8 @@ def _repr_html_(self): self.maintain_recs() #Observers(callback_function, listen_to_this_variable) - self._widget.observe(self.removeDeletedRecs, names='deletedIndices') - self._widget.observe(self.setIntentOnButtonClick, names='intentIndex') + self._widget.observe(self.remove_deleted_recs, names='deletedIndices') + self._widget.observe(self.set_intent_on_click, names='selectedIntentIndex') if len(self.recommendation) > 0: # box = widgets.Box(layout=widgets.Layout(display='inline')) From b3adac1decb81e3da7720b1f033ef671574b74dd Mon Sep 17 00:00:00 2001 From: cjachekang Date: Wed, 4 Nov 2020 16:12:23 -0800 Subject: [PATCH 08/20] added better error msg for > 1 intent for vis --- lux/vis/Vis.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lux/vis/Vis.py b/lux/vis/Vis.py index c4a4fd83..58911f08 100644 --- a/lux/vis/Vis.py +++ b/lux/vis/Vis.py @@ -42,6 +42,7 @@ def __repr__(self): return ( f"" ) + filter_intents = None channels, additional_channels = [], [] for clause in self._inferred_intent: @@ -150,6 +151,11 @@ def _repr_html_(self): else: from lux.core.frame import LuxDataFrame + if len(self._intent) != 1: + # VisList(intent, self._source)._repr_html_() + raise SyntaxError( + "For Vis, only use one intent. Otherwise, use VisList." + ) widget = luxwidget.LuxWidget( currentVis=LuxDataFrame.current_vis_to_JSON([self]), recommendations=[], From 13c728a04f4760620c421673091b4809b5b44162 Mon Sep 17 00:00:00 2001 From: cjachekang Date: Thu, 5 Nov 2020 14:09:08 -0800 Subject: [PATCH 09/20] reverting some changes --- lux/vis/Vis.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lux/vis/Vis.py b/lux/vis/Vis.py index 58911f08..37ca2bcc 100644 --- a/lux/vis/Vis.py +++ b/lux/vis/Vis.py @@ -151,11 +151,6 @@ def _repr_html_(self): else: from lux.core.frame import LuxDataFrame - if len(self._intent) != 1: - # VisList(intent, self._source)._repr_html_() - raise SyntaxError( - "For Vis, only use one intent. Otherwise, use VisList." - ) widget = luxwidget.LuxWidget( currentVis=LuxDataFrame.current_vis_to_JSON([self]), recommendations=[], From 98bd99effd14aa5cac1c306b64671d12a8bd993c Mon Sep 17 00:00:00 2001 From: cjachekang Date: Tue, 8 Dec 2020 16:10:32 -0800 Subject: [PATCH 10/20] Updated readme --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 970be056..bc49658b 100644 --- a/README.md +++ b/README.md @@ -134,16 +134,30 @@ To get started, Lux can be installed through [PyPI](https://pypi.org/project/lux pip install lux-api ``` -This installation includes the Lux Jupyter widget frontend, [lux-widget](https://pypi.org/project/lux-widget/). To activate the Jupyter notebook extension: +This installation includes the Lux Jupyter widget frontend, [lux-widget](https://pypi.org/project/lux-widget/). + +## Setup in Jupyter Notebook, VSCode + +To use Lux in [Jupyter notebook](https://github.com/jupyter/notebook) or [VSCode](https://code.visualstudio.com/docs/python/jupyter-support), activate the notebook extension: ```bash jupyter nbextension install --py luxwidget jupyter nbextension enable --py luxwidget ``` -If the installation happens correctly, you should see two `- Validating: OK` after executing the two lines above. +If the installation happens correctly, you should see two `- Validating: OK` after executing the two lines above. + +## Setup in Jupyter Lab + +To use Lux in [Jupyter Lab](https://github.com/jupyterlab/jupyterlab), activate the lab extension: + +```bash + jupyter labextension install @jupyter-widgets/jupyterlab-manager + jupyter labextension install luxwidget +``` + +Note that Lux currently only works with Jupyter notebooks in Chrome. -Note that Lux currently only works with Jupyter notebooks in Chrome. Support for Jupyter Lab will be coming soon. If you encounter issues with the installation, please refer to [this page](https://lux-api.readthedocs.io/en/latest/source/guide/FAQ.html#troubleshooting-tips) to troubleshoot the installation. Follow [these instructions](https://lux-api.readthedocs.io/en/latest/source/getting_started/installation.html#manual-installation-dev-setup) to set up Lux for development purposes. # Support and Resources From 361f702b0a635c886527027cc7d110c336e3c772 Mon Sep 17 00:00:00 2001 From: cjachekang Date: Tue, 8 Dec 2020 16:38:29 -0800 Subject: [PATCH 11/20] updated readthedoc documentation --- doc/source/getting_started/installation.rst | 2 +- doc/source/guide/FAQ.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/getting_started/installation.rst b/doc/source/getting_started/installation.rst index 27be673f..b5d2a9b1 100644 --- a/doc/source/getting_started/installation.rst +++ b/doc/source/getting_started/installation.rst @@ -23,7 +23,7 @@ To activate the JupyterLab extension: .. code-block:: bash jupyter labextension install @jupyter-widgets/jupyterlab-manager - jupyter lab build + jupyter labextension install luxwidget Additional Requirements ----------------------- diff --git a/doc/source/guide/FAQ.rst b/doc/source/guide/FAQ.rst index a346fa80..ceabfeff 100644 --- a/doc/source/guide/FAQ.rst +++ b/doc/source/guide/FAQ.rst @@ -81,6 +81,7 @@ The Lux Jupyter widget does not show up when I print a dataframe. - If you are able to import lux successfully and you do not see the "Toggle button" when you print the dataframe, it may be possible that Lux is not compatible with your browser. Lux is compatible with Google Chrome, but have not been extensively tested on Safari or Firefox. - If you recieve the error message :code:`A Jupyter widget could not be displayed because the widget state could not be found.` This could happen if the kernel storing the widget is no longer available, or if the widget state was not saved in the notebook. You may be able to create the widget by running the appropriate cells.`, you may want to restart the notebook and rerun the cell. - If you receive the error message :code:`ModuleNotFoundError: No module named 'luxwidget'`, it is possible that your luxwidget and lux-api versions are not in sync. The latest version of lux-api requires luxwidget v0.1 or above. Try running the following code: + - If you receive the error message :code:`PermissionError: [Errno 13] Permission denied.` during the execution of the command :code:`jupyter nbextension install --py luxwidget`, then you can add the flag :code:`--user` (:code:`jupyter nbextension enable --py --user luxwidget`). .. code-block:: bash From 5c0562bc6e68d950273f949a22795572309d474f Mon Sep 17 00:00:00 2001 From: cjachekang Date: Tue, 8 Dec 2020 16:46:32 -0800 Subject: [PATCH 12/20] added config to default display documentation --- doc/source/guide/FAQ.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/guide/FAQ.rst b/doc/source/guide/FAQ.rst index ceabfeff..61c9800b 100644 --- a/doc/source/guide/FAQ.rst +++ b/doc/source/guide/FAQ.rst @@ -28,13 +28,13 @@ How do I set the Lux widgets to show up on default? .. code-block:: python - df.default_display = "lux" + df.config.default_display = "lux" To switch back to Pandas as the default display: .. code-block:: python - df.default_display = "pandas" + df.config.default_display = "pandas" I want to change the opacity of my chart, add title, change chart font size, etc. How do I modify chart settings? """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" From eb9e0ffc8fa6ea2610ecbfdc19fff9bf0ea46e32 Mon Sep 17 00:00:00 2001 From: Doris Lee Date: Wed, 9 Dec 2020 11:38:53 +0800 Subject: [PATCH 13/20] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bc49658b..5aa3ef0e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Mailing List - + Binder @@ -29,7 +29,7 @@ Lux is a Python library that makes data science easier by automating aspects of Here is a [1-min video](https://www.youtube.com/watch?v=qmnYP-LmbNU) introducing Lux, and [slides](http://dorisjunglinlee.com/files/Zillow_07_2020_Slide.pdf) from a more extended talk. -Try out Lux on your own in a live Jupyter Notebook [here](https://mybinder.org/v2/gh/lux-org/lux-binder/master?urlpath=tree/demo/cars_demo.ipynb)! +Try out Lux on your own in a live Jupyter Notebook [here](https://mybinder.org/v2/gh/lux-org/lux-binder/master?urlpath=lab/tree/demo/cars_demo.ipynb)! # Getting Started @@ -156,7 +156,7 @@ To use Lux in [Jupyter Lab](https://github.com/jupyterlab/jupyterlab), activate jupyter labextension install luxwidget ``` -Note that Lux currently only works with Jupyter notebooks in Chrome. +Note that JupyterLab and VSCode is supported only for lux-widget version >=0.1.2, if you have an earlier version, please upgrade to the latest version of [lux-widget](https://pypi.org/project/lux-widget/). Lux currently only works with the Chrome browser. If you encounter issues with the installation, please refer to [this page](https://lux-api.readthedocs.io/en/latest/source/guide/FAQ.html#troubleshooting-tips) to troubleshoot the installation. Follow [these instructions](https://lux-api.readthedocs.io/en/latest/source/getting_started/installation.html#manual-installation-dev-setup) to set up Lux for development purposes. @@ -168,6 +168,6 @@ Other additional resources: - Sign up for the early-user [mailing list](https://forms.gle/XKv3ejrshkCi3FJE6) to stay tuned for upcoming releases, updates, or user studies. - Visit [ReadTheDoc](https://lux-api.readthedocs.io/en/latest/) for more detailed documentation. -- Clone [lux-binder](https://github.com/lux-org/lux-binder) to try out these [hands-on exercises](https://github.com/lux-org/lux-binder/tree/master/exercise) or [tutorial series](https://github.com/lux-org/lux-binder/tree/master/tutorial) on how to use Lux. +- Try out these hands-on exercises (`exercise/`) or tutorial series (`tutorial/`) on [Binder](https://mybinder.org/v2/gh/lux-org/lux-binder/master?urlpath=lab/). Or clone and run [lux-binder](https://github.com/lux-org/lux-binder) locally. - Join our community [Slack](https://lux-project.slack.com/join/shared_invite/zt-iwg84wfb-fBPaGTBBZfkb9arziy3W~g) to discuss and ask questions. - Report any bugs, issues, or requests through [Github Issues](https://github.com/lux-org/lux/issues). From 0837ba7b655879a8d993fc8764061a136bbac127 Mon Sep 17 00:00:00 2001 From: Cjache Kang Date: Fri, 12 Feb 2021 12:49:01 -0800 Subject: [PATCH 14/20] Conda support --- README.md | 11 ++++++- conda.recipe/lux-api/meta.yaml | 43 +++++++++++++++++++++++++++ conda.recipe/lux-widget/meta.yaml | 48 +++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 conda.recipe/lux-api/meta.yaml create mode 100644 conda.recipe/lux-widget/meta.yaml diff --git a/README.md b/README.md index a38fa727..affc43cd 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,16 @@ To get started, Lux can be installed through [PyPI](https://pypi.org/project/lux pip install lux-api ``` -This installation includes the Lux Jupyter widget frontend, [lux-widget](https://pypi.org/project/lux-widget/). +This installation includes the Lux Jupyter widget frontend, [lux-widget](https://pypi.org/project/lux-widget/). + +To install with conda: + +```bash + # only required if you have not added conda-forge to your channels yet + conda config --add channels conda-forge + + conda instaa lux-api +``` ## Setup in Jupyter Notebook, VSCode diff --git a/conda.recipe/lux-api/meta.yaml b/conda.recipe/lux-api/meta.yaml new file mode 100644 index 00000000..33e43a36 --- /dev/null +++ b/conda.recipe/lux-api/meta.yaml @@ -0,0 +1,43 @@ +{% set name = "lux-api" %} +{% set version = "0.2.2" %} + + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/lux-api-{{ version }}.tar.gz + sha256: 01c5605a16b6130f159ab7d1d9d4ffd6fdc49ea854d9ab0f6481194e701c4a1f + +build: + number: 0 + noarch: python + script: {{ PYTHON }} -m pip install . -vv + +requirements: + host: + - pip + - python >=3.6 + run: + - python >=3.6 + - scipy >=1.3.3 altair>=4.0.0 numpy>=1.16.5 pandas>=1.1.0 scikit-learn>=0.22 + +test: + imports: + - lux + - lux._config + commands: + - pip check + requires: + - pip + +about: + home: https://github.com/lux-org/lux + summary: A Python API for Intelligent Data Discovery + license: Apache-2.0 + license_file: LICENSE + +extra: + recipe-maintainers: + - dorisjlee diff --git a/conda.recipe/lux-widget/meta.yaml b/conda.recipe/lux-widget/meta.yaml new file mode 100644 index 00000000..12a965ea --- /dev/null +++ b/conda.recipe/lux-widget/meta.yaml @@ -0,0 +1,48 @@ +{% set name = "lux-widget" %} +{% set version = "0.1.3" %} + + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/lux-widget-{{ version }}.tar.gz + sha256: f410138514f355c8c9de4f1f8c9534495c5418e9ea1041e8eff03a84b507b60b + +build: + number: 0 + noarch: python + script: {{ PYTHON }} -m pip install . -vv + +requirements: + host: + - ipywidgets >=7.5.0 + - jupyter + - notebook >=4.0.0 + - pip + - python >=3.6 + run: + - ipywidgets >=7.5.0 + - jupyter + - notebook >=4.0.0 + - python >=3.6 + +test: + imports: + - luxwidget + - luxwidget.nbextension + commands: + - pip check + requires: + - pip + +about: + home: https://github.com/lux-org/lux-widget + summary: Jupyter Widget for Intelligent Data Discovery + license: Apache-2.0 + license_file: LICENSE + +extra: + recipe-maintainers: + - dorisjlee From 95fdd7ea9cb87dbb1081b380748266253412f9c7 Mon Sep 17 00:00:00 2001 From: Cjache Kang Date: Fri, 12 Feb 2021 12:51:08 -0800 Subject: [PATCH 15/20] fixed indentation on readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2a23c7aa..0622d463 100644 --- a/README.md +++ b/README.md @@ -144,10 +144,10 @@ This installation includes the Lux Jupyter widget frontend, [lux-widget](https:/ To install with conda: ```bash - # only required if you have not added conda-forge to your channels yet - conda config --add channels conda-forge +# only required if you have not added conda-forge to your channels yet +conda config --add channels conda-forge - conda instaa lux-api +conda instaa lux-api ``` ## Setup in Jupyter Notebook, VSCode From dba56a639e6832e13e012b8c05357272891e7225 Mon Sep 17 00:00:00 2001 From: Cjache Kang Date: Fri, 12 Feb 2021 12:51:51 -0800 Subject: [PATCH 16/20] fixed typo in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0622d463..782560f5 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ To install with conda: # only required if you have not added conda-forge to your channels yet conda config --add channels conda-forge -conda instaa lux-api +conda install lux-api ``` ## Setup in Jupyter Notebook, VSCode From 0200af5fdca8c4e7921121a552d2058b41e8e4cf Mon Sep 17 00:00:00 2001 From: Doris Lee Date: Mon, 15 Feb 2021 11:05:00 +0800 Subject: [PATCH 17/20] Update README.md change conda install instruction into one-liner --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 782560f5..693a6e76 100644 --- a/README.md +++ b/README.md @@ -139,17 +139,14 @@ To get started, Lux can be installed through [PyPI](https://pypi.org/project/lux pip install lux-api ``` -This installation includes the Lux Jupyter widget frontend, [lux-widget](https://pypi.org/project/lux-widget/). - -To install with conda: +If you use [conda](https://docs.conda.io/en/latest/), you can install Lux via: ```bash -# only required if you have not added conda-forge to your channels yet -conda config --add channels conda-forge - -conda install lux-api +conda install -c conda-forge lux-api ``` +Both the PyPI and conda installation include includes the Lux Jupyter widget frontend, [lux-widget](https://pypi.org/project/lux-widget/). + ## Setup in Jupyter Notebook, VSCode To use Lux in [Jupyter notebook](https://github.com/jupyter/notebook) or [VSCode](https://code.visualstudio.com/docs/python/jupyter-support), activate the notebook extension: From aa41a04f065165ff35cdb1cb2c1e43a52827dd4f Mon Sep 17 00:00:00 2001 From: Cjache Kang Date: Mon, 15 Feb 2021 17:55:03 -0800 Subject: [PATCH 18/20] added documentation for updating recipes --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a6598459..fa280b74 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,3 +73,6 @@ make html This generates all the HTML documentation files in `doc/_build/html/`. The configuration file `conf.py` contains information related to Sphinx settings. The Sphinx documentations are written as ReStructuredText (`*.rst` files) and mostly stored in the `source/` folder. The documentation inside `source/reference` is auto-generated by Sphinx. The repository is linked with [ReadTheDocs](https://readthedocs.org/projects/lux-api/), which triggers the build for the latest documentation based on the most recent commit. As a result, we do not commit anything inside `doc/_build` in the Github repository. +# Updating the Conda Recipe + +In order to update the conda recipe on conda forge, you can follow the steps [here](https://conda-forge.org/#update_recipe). Conda recipes can be updated when either a new dependency is needed or when the version number needs to be updated. \ No newline at end of file From 8072a805f560e09d1c789c202304628764c3a736 Mon Sep 17 00:00:00 2001 From: Cjache Kang Date: Mon, 15 Feb 2021 18:02:54 -0800 Subject: [PATCH 19/20] moving lux-widget yaml to lux-widget repo --- conda.recipe/lux-widget/meta.yaml | 48 ---------------------------- conda.recipe/{lux-api => }/meta.yaml | 0 2 files changed, 48 deletions(-) delete mode 100644 conda.recipe/lux-widget/meta.yaml rename conda.recipe/{lux-api => }/meta.yaml (100%) diff --git a/conda.recipe/lux-widget/meta.yaml b/conda.recipe/lux-widget/meta.yaml deleted file mode 100644 index 12a965ea..00000000 --- a/conda.recipe/lux-widget/meta.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{% set name = "lux-widget" %} -{% set version = "0.1.3" %} - - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/lux-widget-{{ version }}.tar.gz - sha256: f410138514f355c8c9de4f1f8c9534495c5418e9ea1041e8eff03a84b507b60b - -build: - number: 0 - noarch: python - script: {{ PYTHON }} -m pip install . -vv - -requirements: - host: - - ipywidgets >=7.5.0 - - jupyter - - notebook >=4.0.0 - - pip - - python >=3.6 - run: - - ipywidgets >=7.5.0 - - jupyter - - notebook >=4.0.0 - - python >=3.6 - -test: - imports: - - luxwidget - - luxwidget.nbextension - commands: - - pip check - requires: - - pip - -about: - home: https://github.com/lux-org/lux-widget - summary: Jupyter Widget for Intelligent Data Discovery - license: Apache-2.0 - license_file: LICENSE - -extra: - recipe-maintainers: - - dorisjlee diff --git a/conda.recipe/lux-api/meta.yaml b/conda.recipe/meta.yaml similarity index 100% rename from conda.recipe/lux-api/meta.yaml rename to conda.recipe/meta.yaml From f65171978574314fb0e7105762825ceb5af7f19f Mon Sep 17 00:00:00 2001 From: Doris Lee Date: Tue, 16 Feb 2021 12:28:57 +0800 Subject: [PATCH 20/20] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fa280b74..ad2ce1a9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,4 +75,4 @@ This generates all the HTML documentation files in `doc/_build/html/`. The confi # Updating the Conda Recipe -In order to update the conda recipe on conda forge, you can follow the steps [here](https://conda-forge.org/#update_recipe). Conda recipes can be updated when either a new dependency is needed or when the version number needs to be updated. \ No newline at end of file +In order to update the conda recipe on conda forge, you can follow the steps [here](https://conda-forge.org/#update_recipe). The conda recipe needs to be updated when either a new dependency is added or when the version number needs to be updated in the case of a new release.