Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to executor documentation. #363

Merged
merged 244 commits into from Apr 17, 2021
Merged

Update to executor documentation. #363

merged 244 commits into from Apr 17, 2021

Conversation

thyneb19
Copy link
Contributor

Overview

Update to executor documentation.

19thyneb and others added 30 commits October 15, 2020 11:26
Uses unique value metadata to verify if a value is valid
frame.py was trying to import luxWidget instead of luxwidget
… with SQL Executor

Some interestingness functions required the number of observations in the data and visualization, so I added these values to the metadata to make the scoring work when using the SQL executor

Added tests for SQL executor
Removed lines that changed Year column type to datetime
SQL Executor tests interfering with travis build, commenting out for now
Issue where validator was relying on metadata which was not yet generated, moved metadata calculation before validation step in frame.py
Renamed num_obs to length, removed ordinal variable from Executor mapping function
* Merging Recent SQL Executor changes

* Fix to Validator

Uses unique value metadata to verify if a value is valid

* Fix Bug with Widget Rendering

frame.py was trying to import luxWidget instead of luxwidget

* Added Number of Observations to MetaData, Fixed Interestingness issue with SQL Executor

Some interestingness functions required the number of observations in the data and visualization, so I added these values to the metadata to make the scoring work when using the SQL executor

Added tests for SQL executor

* Re-added Licensing Headers

* Adding Recent frame.py changes

* Adjusted SQL Executor Tests

Removed lines that changed Year column type to datetime

* Update Frame with new Action Registering

* Resolving Conflicts in frame.py

* Commenting out local SQL Executor tests

SQL Executor tests interfering with travis build, commenting out for now

* Update correlation.py

* Update frame.py

* Fixing Code Format

* Cleaning up Pandas Executor imports

* Fix Validation Bug

Issue where validator was relying on metadata which was not yet generated, moved metadata calculation before validation step in frame.py

* Changed metadata variable name

Renamed num_obs to length, removed ordinal variable from Executor mapping function

Co-authored-by: 19thyneb <thyne.boonmark@gmail.com>
Co-authored-by: Doris Lee <dorisjunglinlee@gmail.com>
Updated travis.yml file to create postgresql database in test instance.

Added script to populate test database with data.
Updated database credentials
* Merging Recent SQL Executor changes

* Fix to Validator

Uses unique value metadata to verify if a value is valid

* Fix Bug with Widget Rendering

frame.py was trying to import luxWidget instead of luxwidget

* Added Number of Observations to MetaData, Fixed Interestingness issue with SQL Executor

Some interestingness functions required the number of observations in the data and visualization, so I added these values to the metadata to make the scoring work when using the SQL executor

Added tests for SQL executor

* Re-added Licensing Headers

* Adding Recent frame.py changes

* Adjusted SQL Executor Tests

Removed lines that changed Year column type to datetime

* Update Frame with new Action Registering

* Resolving Conflicts in frame.py

* Commenting out local SQL Executor tests

SQL Executor tests interfering with travis build, commenting out for now

* Update correlation.py

* Update frame.py

* Fixing Code Format

* Cleaning up Pandas Executor imports

* Fix Validation Bug

Issue where validator was relying on metadata which was not yet generated, moved metadata calculation before validation step in frame.py

* Changed metadata variable name

Renamed num_obs to length, removed ordinal variable from Executor mapping function

* Added script to generate Postgresql database

Updated travis.yml file to create postgresql database in test instance.

Added script to populate test database with data.

* Update upload_car_data.py

Updated database credentials

* Updated script name in travis.yml

* Removed unnecessary import from travis.yml

* Added psycopg2 to requirements.txt

* Creating Postgres test database in travis

* Fixed directory issue

Co-authored-by: 19thyneb <thyne.boonmark@gmail.com>
Co-authored-by: Doris Lee <dorisjunglinlee@gmail.com>
Added tests for basic SQL Executor functionality.
Added an example notebook to showcase how to use the sql-engine.

Fixed variable reference in interestingness.py that was causing issues.
thyneb19 and others added 20 commits April 10, 2021 17:37
Aiming to simplify the initial Lux installation. Will include a notice in the SQL documentation letting users know that they will have to install the library themselves if the want to use the LuxSQLTable functionality.
Removed psycopg2 from Lux requirements
…Executor"

This reverts commit 68c7747, reversing
changes made to 801f3cd.
Merging in master branch changes
Separated and moved the SQLExecutor tests to the tests_sql folder. Updated the make file to include a command to test both the pandas and SQL functionalities.
Updated the github workflow to also run the tests_sql folder
Separated and moved the SQLExecutor tests to the tests_sql folder. Updated the make file to include a command to test both the pandas and SQL functionalities.
Updated the github workflow to also run the tests_sql folder
Fixing merge conflicts with Master branch
Need to set the executor type to "Pandas" at the start of the PandasExecutor test suite.

Fixed column name references in the SQLExecutor tests
1. Added documentation for SQL Execution Engine.
2. Added SQL Executor gif in images folder.
@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #363 (3564026) into master (eab1982) will increase coverage by 0.07%.
The diff coverage is n/a.

❗ Current head 3564026 differs from pull request most recent head 3b84282. Consider uploading reports for the commit 3b84282 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #363      +/-   ##
==========================================
+ Coverage   84.32%   84.39%   +0.07%     
==========================================
  Files          51       51              
  Lines        3891     3891              
==========================================
+ Hits         3281     3284       +3     
+ Misses        610      607       -3     
Impacted Files Coverage Δ
lux/vislib/matplotlib/ScatterChart.py 76.47% <0.00%> (+1.17%) ⬆️
lux/vislib/matplotlib/Heatmap.py 98.33% <0.00%> (+1.66%) ⬆️
lux/vislib/altair/Heatmap.py 96.55% <0.00%> (+3.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eab1982...3b84282. Read the comment docs.

Lux extends its visualization exploration operations to data within SQL databases. By using the SQL Executor, users can specify a SQL database to connect a LuxSQLTable for generating all the visualizations recommended in Lux.
Lux extends its visualization capabilities to SQL within Postgres databases. By using the SQLExecutor, users can create a :code:`LuxSQLTable` that connects to a Postgres database. When the :code:`LuxSQLTable` object is printed out, Lux displays a subset of the data and recommends a default set of visualizations to display.

.. image:: https://github.com/lux-org/lux/blob/sql-engine/doc/source/img/SQLexecutor.gif?raw=true
Copy link
Member

@dorisjlee dorisjlee Apr 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thyneb19: Can we remove SQLexecutor.gif from this PR and add it into lux-resources and link it here? That prevents us from adding large files into the main repo.

Copy link
Member

@dorisjlee dorisjlee Apr 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NiStannum: Could we do a new recording of the GIF with these changes?

  1. The GIF seems to be based on an old version of the frontend, since the preview caption and buttons are different. Update the frontend to be based on latest version of code
  2. We don't need to show the data upload cell, it would be good to just zoom in to the statement on where the LuxSQLTable is created. Something similar to this, where the import, pycopg2 connection, and LuxSQLTable declaration is separated into three cells:
import lux
import pandas as pd
import psycopg2
connection = psycopg2.connect("host=localhost dbname=testdb user=testuser password=testpass")
lux.config.set_SQL_connection(connection)
tbl = lux.LuxSQLTable("college")
tbl

image
3) The GIF doesn't need to spend a lot of time scrolling through and clicking on the tabs of the widget, simply Toggle to the Lux view and clicking on one tab would be sufficient.

doc/source/advanced/executor.rst Show resolved Hide resolved
doc/source/advanced/executor.rst Show resolved Hide resolved
doc/source/advanced/executor.rst Show resolved Hide resolved
@dorisjlee dorisjlee merged commit 084cf77 into master Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants