Commit Graph

245 Commits

Author SHA1 Message Date
Hugh A. Miles II 2f5cff7d9f [DeckGL] Added fixtures and Deck test (#4798)
* added fixtures and deck test

* linting

* linting

* add os.path

* remove para

* fix reference
2018-04-12 17:20:39 -07:00
John Bodley dadc0574b8
[tests] cleaning up test configuration (#4806) 2018-04-11 14:09:20 -07:00
michellethomas 725b8f94c9 Adding tests for the time table viz (#4659) 2018-04-11 13:24:51 -07:00
John Bodley 7f1d7543d0
[logs] Dropping dt column (#4587) 2018-04-10 18:34:32 -07:00
John Bodley 1627fd096b
[travis/tox] Restructuring configuration (#4552) 2018-04-10 15:59:44 -07:00
Maxime Beauchemin 627bdb2eb3
[dashboard] open in edit mode when adding a chart (#4772)
* [dashboard] open in edit mode when adding a chart

* Move dashboard unit tests to their own file

* fix tests

* Better URL management
2018-04-07 12:55:05 -07:00
John Bodley df4ff05441
[druid] Excluding refreshing verbose name (#4761) 2018-04-04 17:16:53 -07:00
Maxime Beauchemin 3b7e0a951a
[sql lab] preserve schema through visualize flow (#4742)
* [sql lab] preserve schema through visualize flow

https://github.com/apache/incubator-superset/pull/4696 got tangled
into refactoring views out of views/core.py and onto views/sql_lab.py

This is the same PR without the refactoring.

* Fix lint
2018-04-04 13:38:37 -07:00
Maxime Beauchemin f6fe11f76e
[bugfix] convert metrics to numeric in dataframe (#4726)
* [bugfix] convert metrics to numeric in dataframe

It appears sometimes the dbapi driver and pandas's read_sql fail at
returning the proper numeric types for metrics and they show up as
`object` in the dataframe. This results in "No numeric types to
aggregate" errors when trying to perform aggregations or pivoting in
pandas.

This PR looks for metrics in dataframes that are typed as "object"
and uses pandas' to_numeric to convert.

* Fix tests

* Remove all iteritems
2018-04-02 21:48:14 -07:00
Jeffrey Wang 8be0bde683 [BugFix] Allowing limit ordering by post-aggregation metrics (#4646)
* Allowing limit ordering by post-aggregation metrics

* don't overwrite og dictionaries

* update tests

* python3 compat

* code review comments, add tests, implement it in groupby as well

* python 3 compat for unittest

* more self

* Throw exception when get aggregations is called with postaggs

* Treat adhoc metrics as another aggregation
2018-04-02 21:37:00 -07:00
Gabe Lyons 68dec24542 [Explore] Streamlined metric definitions for SQLA and Druid (#4663)
* adding streamlined metric editing

* addressing lint issues on new metrics control

* enabling druid
2018-03-28 17:41:29 -07:00
timifasubaa 8dd052de4b [security] Refactor security code into SupersetSecurityManager (#4565)
* move access permissions methods to security manager

* consolidate all security methods into SupersetSecurityManager

* update security method calls

* update calls from tests

* move get_or_create_main_db to utils

* raise if supersetsecuritymanager is not extended

* rename sm to security_manager
2018-03-27 16:46:02 -07:00
John Bodley f9d85bd2e1
[druid] Updating refresh logic (#4655) 2018-03-26 18:35:43 -07:00
Riccardo Magliocchetti 76394d3f8f forms: make csv import parse dates accepts a list of columns (#4639)
Instead of a boolean which has way less chances to work. While
at it add a proper label for the "con" field.

Fixes #4637
2018-03-23 14:16:02 -07:00
Jeffrey Wang 33aa976e3d Cache the query string (#4633)
* Cache the query string

* misc linter
2018-03-21 13:13:36 -07:00
michellethomas 5c98f5642b Fix sqllab numpy array (#4629)
* Fixing error with sqllab numpy array

* Adding tests for failing sqllab data type
2018-03-19 11:43:04 -07:00
Maxime Beauchemin 93ec76f757
[sql lab] reduce the number of metadata calls when loading a table (#4593) 2018-03-15 17:53:34 -07:00
Hugh A. Miles II 2bc089ef8d Added new exception class and start of better exception/error handling (#4514)
* rebase and linting

* change back

* wip

* fixed broken test

* fix flake8

* fix test
2018-03-11 22:07:51 -07:00
Grace Guo 9edbd64c5d
[Explore] Save custom url parameters when user save slices (#4578)
* [Explore] Save url parameters when user save slices

* remove print

(cherry picked from commit bd9ecbe)

* add unit test

(cherry picked from commit 0f350ad)

* wrapping all request params into url_params

(cherry picked from commit 17197c1)
2018-03-08 13:19:41 -08:00
John Bodley ef4e5ecedf [bugfix] Fixing regression from #4500 (#4549) 2018-03-06 21:19:13 -08:00
John Bodley 48430a1918
Merge pull request #4500 from john-bodley/john-bodley-fix-pr-4396
[bugfix] Fixing regression introduced in #4396
2018-03-05 16:51:09 -08:00
John Bodley 7440d34936 [payload] Fixing regression introducted in ##4396 2018-02-28 14:23:20 -08:00
Maxime Beauchemin 849a2cecee
Add https support for Druid (#4480)
* Add https support for Druid

* addressing comment
2018-02-28 10:12:17 -08:00
Maxime Beauchemin 83524f97d7 [WiP] Cleanup & fix URL scheme for the explore view (#4490)
* Improve URLs

* Fix js tests
2018-02-27 15:08:06 -08:00
John Bodley d57a37e341 [flake8] Adding flake8-coding (#4477) 2018-02-25 15:06:11 -08:00
John Bodley e112e4417c [flake8] Adding future-import check (#4476) 2018-02-23 16:42:09 -08:00
John Bodley 8aac63e74c [flake8] Fixing additional flake8 issue w/ the presence of ignore (#4474) 2018-02-23 14:46:26 -08:00
Ville Brofeldt d6c197f8ac Remove comments from queries in SQL Lab that break Explore view (#4413)
* Remove comments from queries in SQL Lab that break Explore view

This fixes an issue where comments on the last line of the source query comment out the closing parenthesis of the subquery.

* Add test case for SqlaTable with query with comment

This test ensures that comments in the query are removed when calling SqlaTable.get_from_clause().

* Add missing blank line class definition (PEP8)
2018-02-18 16:30:11 -08:00
timifasubaa fa0aa33767 Disable user access request (#4405)
* add feature flag to config

* wrap check around a feature flag

* add flag to the model view

* remove access request from seurity tests
2018-02-14 14:49:22 -08:00
Grace Guo 342180b263
[Explore view] Use POST method for charting requests (#3993)
* [Explore view] Use POST method for charting requests

* fix per code review comments

* more code review fixes

* code review fix: remove duplicated calls for getting values from request

* [Explore view] Use POST method for charting requests

* fix per code review comments

* more code review fixes

* code review fix: remove duplicated calls for getting values from request
2018-02-13 17:21:15 -08:00
michellethomas 19a0827d1f Adding dashboard add view (#4344)
* Adding DashboardAddView and setting show_columns on SLiceAddView

* Adding tests for sliceaddview read api

* Dedupe show_columns
2018-02-06 12:38:07 -08:00
timifasubaa 6d37d97ba5 Refactor import csv (#4298)
* move helpers to utils

* make form use queryselector

* refactor exception throwing and handling

* update db_connection access point

* nits
2018-02-03 20:22:06 -08:00
Jeff Niu fdd42ef4b6 [New Viz] Nightingale Rose Chart (#3676)
* Nightingale Rose Chart

* Review comments
2018-02-03 20:18:24 -08:00
Maxime Beauchemin e4a95f9428
Use the query_obj as the basis for the cache key (#4260)
* Use the query_obj as the basis for the cache key

When we recently moved from hashing form_data to define the cache_key
towards using the rendered query instead,
it made is such that non deterministic form
control values like relative times specified in "from" and "until" time
bound resulted in making those miss cache 100% of the time.

Here we move away from using the rendered query and using the query_obj
instead.

* Deprecating using form_data in templates
2018-01-28 09:46:13 -08:00
Marcus Levine 4bc5fe5495 [BUGFIX]: Check datatype of results before converting to DataFrame (#4108)
* conditional check on datatype of results before converting to df

fix type checking

fix conditional checks

remove trailing whitespace and fix df_data fallback def

actually remove trailing whitespace

generalized type check to check all columns for dict

refactor dict col check

* move df conversion to helper and add unit test

add missing newlines

another missing newline

fix quotes

more quote fixes
2018-01-23 20:58:06 -08:00
timifasubaa 2c72a7ae4f Use json for imports and exports, not pickle (#4243)
* make superset imports and exports use json, not pickle

* fix tests
2018-01-23 20:55:27 -08:00
John Bodley a7a6678d5c [cache] Using the query as the basis of the cache key (#4016) 2018-01-12 12:05:12 -08:00
fabianmenges 23c98294bd Moving the custom_password_store out of Database class (#4182) 2018-01-09 13:14:20 -08:00
Maxime Beauchemin 37205099db
Fix USA's state geojson for 'Country Map' visualization (#4121)
* Fix USA's state geojson for 'Country Map' visualization

Turns out the ISO codes were missing from the geojson file, this adds it
and uses human-readable indents.

* using proper ISO codes

* Linting

New linting rules started applying, I'm guessing a new version of
pylint?
2018-01-02 20:21:33 -08:00
Nicolas Bonnotte b4909f2d03 [Bugfix] Issues with merge_extra_filters (#4042) (#4091) 2017-12-20 16:22:43 -08:00
Jeff Niu af7cdeba4d [Feature] enhanced memoized on get_sqla_engine and other functions (#3530)
* added watch to memoized

* added unit tests for memoized

* code style changes
2017-12-17 10:35:00 -08:00
fabianmenges 500e6256c0 Full Annotation Framework (#3518)
* Adding full Annotation Framework

* Viz types

* Re organizing native annotations

* liniting

* Bug fix

* Handle no data

* Cleanup

* Refactor slice form_data to data
2017-12-16 16:10:45 -08:00
Maxime Beauchemin ec752b1378
[geo] provide more flexible Spatial controls (#4032)
Before this PR the only way to query lat/long is in the shape of 2
columns that contains lat and long.

Now we're adding 2 more options:
* a single column that has lat and long with a delimiter in between
* support for geohashes - geohashes are cool
2017-12-15 11:47:27 -08:00
Hugh A. Miles II c84211ec44 Change reference for slices to chart (#4049)
* change reference for slices to chart

* change profile page reference

* change reference for Associated Slices

* change back to single quotes

* fix other single quotes

* linting

* last one

* fix test
2017-12-12 18:02:17 -08:00
Jeff Niu 7d374428d3 [Bugfix] _add_filters_from_pre_query doesn't handle dim specs (#3974)
* Fixed _add_filters_from_pre_query for dimension specs

* add_filters_from_pre_query ignores extraction functions
2017-12-11 12:35:25 -08:00
John Bodley 3a2974f589 [API] Deprecate /update_role/ API endpoint (#4041) 2017-12-10 21:14:15 -08:00
Jeff Niu cb7c5aa70c Fixed finding postaggregations (#4017) 2017-12-06 21:55:43 -08:00
fabianmenges 72627b1761 Adding YAML Import-Export for Datasources to CLI (#3978)
* Adding import and export for databases

* Linting
2017-12-05 11:14:52 -08:00
michellethomas 9904593dc3 Improving speed of dashboard import (#3958)
* Improve dashboard import

* Updating tests for Slice.import_obj
2017-11-30 20:47:22 -08:00
Jeff Niu 8f00e9e30b [Bugfix] Druid `run_query` dimensions part 3 + Unit tests (#3949)
* Fixed and added tests for druid run query

* Fixes style and python3
2017-11-30 20:32:53 -08:00