Commit Graph

41 Commits

Author SHA1 Message Date
Maxime Beauchemin
d65b039219
Improve examples & related tests (#7773)
* [WiP] improve load_examples

related to #7472, longer term we will generate the examples by exporting
them into tarball as in #7472. In the meantime, we need this subset of
the features:

* allowing specifying an alternate database connection for examples
* allowing a --only-metadata flag to `load_examples` to load only
  dashboard and chart definitions, no actual data is loaded

* Improve logging

* Rename data->examples

* Load only if not exist

* By default do not load, add a force flag

* fix build

* set published to true
2019-07-16 21:36:56 -07:00
John Bodley
6d7701e684
[fix] Updating Pandas resample logic (#7799) 2019-07-02 11:10:50 -07:00
John Bodley
5c58fd1802
[format] Using Black (#7769) 2019-06-25 13:34:48 -07:00
Maxime Beauchemin
fd5befee38
Bump python libs, address insecure releases (#7550)
* Bump python libs, address insecure releases

Using
https://requires.io/github/mistercrunch/superset/requirements/?branch=apache_release_improv
to identify insecure, old releases we're using and bumping.

* redis <3.0

* fix new flakes
2019-05-28 21:03:49 -07:00
Dave Smith
ba19a62412 Injectable statsd client (#7138)
* Add ability to inject statsd client; some py test/reqs updates

- Updated the metrics logger to allow construction with an existing
statsd client, so that it can be configured by external systems or libs.
- added requirements to requirements-dev.txt which are needed to run
  tests-eg coverage, nose
- removed dependency on mock lib, it is in python stdlib now
- updated tox.ini to remove the now-superfluous deps

* add license to test file, and remove blank line at EOF
2019-03-27 14:08:36 -07:00
John Bodley
61add606ca
[missing values] Removing replacing missing values (#4905) 2019-03-20 17:14:15 -07:00
Maxime Beauchemin
1dd4d7a587
Apply ASF licenses throughout the code base (#5800)
* Add license headers

* reabased

* lint

* Removing licenses from vendors folder
2019-01-15 15:53:27 -08:00
Maxime Beauchemin
bbfd69a138 [utils.py] gathering/refactoring into a "utils/" folder (#6095)
* [utils] gathering/refactoring into a "utils/" folder

Moving current utils.py into utils/core.py and moving other *util*
modules under this new "utils/" as well.

Following steps include eroding at "utils/core.py" and breaking it down
into smaller modules.

* Improve tests

* Make loading examples in scope for tests

* Remove test class attrs examples_loaded and requires_examples
2018-10-16 17:59:34 -07:00
timifasubaa
46c86672c8 remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
timifasubaa
5c5be825d9
remove future imports (#6050) 2018-10-11 09:46:25 -07:00
yamyamyuo
ab5c910801 [bugfix] Fix Tableviz metrics column disorder (#5566)
* fix metrics disorder

* add tableviz metric order tests

* lint code

* use OrderedDict to avoid metrics disorder

* fix unit test
2018-10-04 08:53:26 -07:00
Maxime Beauchemin
135539c109
[bugfix] 'DruidCluster' object has no attribute 'db_engine_spec' (#5765)
* [bugfix] 'DruidCluster' object has no attribute 'db_engine_spec'

* Fix tests
2018-08-28 21:04:06 -07:00
Sumedh Sakdeo
80e777823b Field names in big query can contain only alphanumeric and underscore (#5641)
* Field names in big query can contain only alphanumeric and underscore

* bad quote

* better place for mutating labels

* lint

* bug fix thanks to mistercrunch

* lint

* lint again
2018-08-21 13:45:42 -07:00
Beto Dealmeida
4c5142d969 Filter out null locations by default (#5642)
* Filter out null locations by default

* Move exception to better place

* Add unit test

* Return columns in order for test and readibility
2018-08-19 16:04:01 -07:00
John Bodley
47e3c41f5e
[ad-hoc filters] Fixing issue with legacy filters (#5525) 2018-07-31 13:52:20 -07:00
JamshedRahman
54fba0f39c Visualization Unicode bug fix (#5387)
* Visualization Unicode bug fix

* Fix the build (#5403)

The travis build has been failing for 2 reasons recently
* pylint takes > 10 minutes without outputing
* bad merge confict auto resolve in controls.jsx

* Visualization Unicode bug fix
2018-07-26 13:18:35 -07:00
Maxime Beauchemin
709f056445
[bugfix] make MetricsControl work with DECK visualizations (#5376)
* [bugfix] make MetricsControl work with DECK visualizations

* Add unit tests
2018-07-16 13:42:07 -07:00
John Bodley
72d815c0f9
[cache] Allowing zero cache-timeout (#5315) 2018-07-02 15:32:21 -07:00
John Bodley
117507cf31
[get_df] Fix datetime conversion (#5274) 2018-06-27 09:09:42 -07:00
Yongjie Zhao
9f66dae328 [bugfix] Fix ZeroDivisionError and get metrics label with percent metrics (#5026)
* Fix percent_metrics ZeroDivisionError and can not get metrics with label issue

* convert iterator to list

* get percentage metrics with get_metric_label method

* Adding tests case for expression type metrics

* Simplify expression
2018-05-20 11:10:57 -05:00
Gabe Lyons
a8514b267b [Explore] Adding Adhoc Filters (#4909)
* adding custom expressions to adhoc metrics

* adjusted transitions and made the box expandable

* adding adhoc filters

* adjusted based on feedback
2018-05-10 10:41:10 -07:00
John Bodley
2900ca345d
[travis] Fixing environments (#4828) 2018-04-15 16:21:33 -07:00
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
michellethomas
725b8f94c9 Adding tests for the time table viz (#4659) 2018-04-11 13:24:51 -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
John Bodley
7440d34936 [payload] Fixing regression introducted in ##4396 2018-02-28 14:23:20 -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
Jeff Niu
fdd42ef4b6 [New Viz] Nightingale Rose Chart (#3676)
* Nightingale Rose Chart

* Review comments
2018-02-03 20:18:24 -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
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
John Bodley
690de862e8 [flake8] Resolve E1?? errors (#3805) 2017-11-10 12:06:22 -08:00
John Bodley
1ea4521d0c [flake8] Resolving E7?? errors (#3816) 2017-11-09 20:23:59 -08:00
John Bodley
d03b74f754 [flake8] Resolving F4?? errors (#3811) 2017-11-08 20:34:33 -08:00
John Bodley
ec21d5af21 [flake8] Resolving E2?? errors (#3812) 2017-11-08 20:34:23 -08:00
John Bodley
17623f71d4 [flake8] Resolving C??? errors (#3787) 2017-11-07 21:32:45 -08:00
John Bodley
e2bca47421 [flake8] Resolve I??? errors (#3797) 2017-11-07 20:23:40 -08:00
John Bodley
02cbad59de [flake8] Resolving F8?? errors (#3778) 2017-11-06 21:15:36 -08:00
Jeff Niu
e121a8585e [Feature] Percentage columns in Table Viz (#3586)
* Added percent metric options to table viz

* Added unit tests for TableViz

* fixed code for python3

* bump travis
2017-10-16 20:16:20 -07:00
Jeff Niu
bad6938d1a [New Viz] Partition Diagram (#3642)
* Added Partition Visualization

* added unit tests
2017-10-12 21:54:59 -07:00
Jeff Niu
c629282ec4 Feature: Paired t-test table visualization (#3473)
* Feature: paired t-test table viz

* Added unit tests for viz
2017-09-26 15:11:35 -07:00