Compare commits

..

3 Commits

Author SHA1 Message Date
Maxime Beauchemin
f249d6d0be 0.25.0rc2 2018-04-26 21:21:58 -07:00
Maxime Beauchemin
41e52469a9 Merge branch 'master' into 0.25 2018-04-26 21:21:18 -07:00
Maxime Beauchemin
a21f3330ac 0.25.0rc1 2018-04-19 21:01:56 -07:00
1448 changed files with 41428 additions and 147631 deletions

View File

@@ -1,39 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
**/__pycache__/
**/.mypy_cache
**/.pytest_cache
**/.tox
**/.vscode
**/.idea
**/.coverage
**/.DS_Store
**/.eggs
**/.python-version
**/*.egg-info
**/*.bak
**/*.db
**/*.pyc
**/*.sqllite
**/*.swp
tests/
docs/
install/
superset/assets/node_modules/
superset/assets/cypress/
superset/assets/coverage/

View File

@@ -1,18 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FLASK_APP=superset:app
FLASK_ENV=development

82
.gitignore vendored
View File

@@ -1,78 +1,42 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
*.bak
*.db
*.pyc
*.sqllite
*.swp
.cache-loader
.coverage
yarn-error.log
_modules
superset/assets/coverage/*
changelog.sh
.DS_Store
.eggs
.idea
.python-version
.tox
.vscode
.coverage
_build
_static
_images
_modules
_static
build
app.db
changelog.sh
dist
dump.rdb
env
env_py3
envpy3
local_config.py
superset_config.py
superset.egg-info/
superset/bin/supersetc
env_py3
.eggs
build
*.db
tmp
superset_config.py
local_config.py
env
dist
superset.egg-info/
app.db
*.bak
.idea
*.sqllite
.vscode
.python-version
.tox
dump.rdb
# Node.js, webpack artifacts
*.entry.js
*.js.map
node_modules
npm-debug.log*
superset/assets/coverage/*
superset/assets/cypress/screenshots
superset/assets/cypress/videos
superset/assets/version_info.json
yarn-error.log
# IntelliJ
*.iml
venv
@eaDir/
# Docker
./Dockerfile
./docker-build.sh
./docker-compose.yml
./docker-entrypoint.sh
./docker-init.sh
# Test data
celery_results.sqlite
celerybeat-schedule
celerydb.sqlite
celerybeat.pid
geckodriver.log
ghostdriver.log
testCSV.csv

View File

@@ -1,19 +1,3 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
[MASTER]
# Specify a configuration file.
@@ -39,7 +23,7 @@ persistent=yes
load-plugins=
# Use multiple processes to speed up Pylint.
jobs=2
jobs=1
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
@@ -81,7 +65,7 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=standarderror-builtin,long-builtin,dict-view-method,intern-builtin,suppressed-message,no-absolute-import,unpacking-in-except,apply-builtin,delslice-method,indexing-exception,old-raise-syntax,print-statement,cmp-builtin,reduce-builtin,useless-suppression,coerce-method,input-builtin,cmp-method,raw_input-builtin,nonzero-method,backtick,basestring-builtin,setslice-method,reload-builtin,oct-method,map-builtin-not-iterating,execfile-builtin,old-octal-literal,zip-builtin-not-iterating,buffer-builtin,getslice-method,metaclass-assignment,xrange-builtin,long-suffix,round-builtin,range-builtin-not-iterating,next-method-called,dict-iter-method,parameter-unpacking,unicode-builtin,unichr-builtin,import-star-module-level,raising-string,filter-builtin-not-iterating,old-ne-operator,using-cmp-argument,coerce-builtin,file-builtin,old-division,hex-method,invalid-unary-operand-type,missing-docstring,too-many-lines,duplicate-code
disable=standarderror-builtin,long-builtin,dict-view-method,intern-builtin,suppressed-message,no-absolute-import,unpacking-in-except,apply-builtin,delslice-method,indexing-exception,old-raise-syntax,print-statement,cmp-builtin,reduce-builtin,useless-suppression,coerce-method,input-builtin,cmp-method,raw_input-builtin,nonzero-method,backtick,basestring-builtin,setslice-method,reload-builtin,oct-method,map-builtin-not-iterating,execfile-builtin,old-octal-literal,zip-builtin-not-iterating,buffer-builtin,getslice-method,metaclass-assignment,xrange-builtin,long-suffix,round-builtin,range-builtin-not-iterating,next-method-called,dict-iter-method,parameter-unpacking,unicode-builtin,unichr-builtin,import-star-module-level,raising-string,filter-builtin-not-iterating,old-ne-operator,using-cmp-argument,coerce-builtin,file-builtin,old-division,hex-method,invalid-unary-operand-type
[REPORTS]
@@ -115,7 +99,7 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme
[BASIC]
# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,ex,Run,_,d,e,v,o,l,x,ts,f
good-names=i,j,k,ex,Run,_,d,e,v,o,l,x,ts
# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata,d,fd
@@ -248,7 +232,7 @@ logging-modules=logging
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX
notes=FIXME,XXX,TODO
[SIMILARITIES]
@@ -293,12 +277,12 @@ ignore-mixin-members=yes
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=numpy,pandas,alembic.op,sqlalchemy,alembic.context,flask_appbuilder.security.sqla.PermissionView.role,flask_appbuilder.Model.metadata,flask_appbuilder.Base.metadata,distutils
ignored-modules=numpy,pandas,alembic.op,sqlalchemy,alembic.context,flask_appbuilder.security.sqla.PermissionView.role,flask_appbuilder.Model.metadata,flask_appbuilder.Base.metadata
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=contextlib.closing,optparse.Values,thread._local,_thread._local,sqlalchemy.orm.scoping.scoped_session
ignored-classes=optparse.Values,thread._local,_thread._local,sqlalchemy.orm.scoping.scoped_session
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
@@ -308,7 +292,7 @@ generated-members=
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager,contextlib2.contextmanager
contextmanager-decorators=contextlib.contextmanager
[VARIABLES]

View File

@@ -1,39 +0,0 @@
.gitignore
.gitattributes
.coverage
.coveragerc
.codecov.yml
.eslintrc
.eslintignore
.flake8
.prettierrc
.rat-excludes
.*log
.*pyc
.*lock
.*geojson
licenses/*
node_modules/*
rat-results.txt
babel-node
dist
build
superset.egg-info
apache_superset.egg-info
.idea
.*sql
.*zip
.*lock
# json and csv in general cannot have comments
.*json
.*csv
# Generated doc files
docs/_build/*
_build/*
_static/*
.buildinfo
searchindex.js
# auto generated
requirements.txt
# vendorized
vendor/*

View File

@@ -1,87 +1,42 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
language: python
python:
- 2.7
- 3.6
services:
- mysql
- postgres
- redis-server
cache:
pip: true
jobs:
- pip
matrix:
include:
- language: python
python: 3.6
env: TOXENV=cypress-dashboard
services:
- redis-server
before_install:
- nvm install 10.14.2
- language: python
python: 3.6
env: TOXENV=cypress-explore
services:
- redis-server
before_install:
- nvm install 10.14.2
- language: python
python: 3.6
env: TOXENV=cypress-sqllab
services:
- redis-server
before_install:
- nvm install 10.14.2
- language: python
python: 3.6
env: TOXENV=py36-mysql
services:
- mysql
- redis-server
before_script:
- mysql -u root -e "DROP DATABASE IF EXISTS superset; CREATE DATABASE superset DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci"
- mysql -u root -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED BY 'mysqluserpassword';"
- mysql -u root -e "GRANT ALL ON superset.* TO 'mysqluser'@'localhost';"
- language: python
env: TOXENV=javascript
before_install:
- nvm install 10.14.2
- language: python
python: 3.6
- python: 2.7
env: TOXENV=flake8
- language: python
python: 3.6
env: TOXENV=py36-sqlite
services:
- redis-server
- language: python
python: 3.6
env: TOXENV=py36-postgres
services:
- postgres
- redis-server
before_script:
- psql -U postgres -c "CREATE DATABASE superset;"
- psql -U postgres -c "CREATE USER postgresuser WITH PASSWORD 'pguserpassword';"
- language: python
python: 3.6
- python: 2.7
env: TOXENV=py27-mysql
- python: 2.7
env: TOXENV=py27-sqlite
- python: 2.7
env: TOXENV=pylint
- language: python
env:
- TOXENV=license-check
- TRAVIS_CACHE=$HOME/.travis_cache/
jdk:
- oraclejdk8
before_install:
- jdk_switcher use oraclejdk8
- python: 3.6
env: TOXENV=flake8
- python: 3.6
env: TOXENV=javascript
- python: 3.6
env: TOXENV=py36-postgres
- python: 3.6
env: TOXENV=py36-sqlite
- python: 3.6
env: TOXENV=pylint
exclude:
- python: 2.7
- python: 3.6
before_script:
- mysql -u root -e "DROP DATABASE IF EXISTS superset; CREATE DATABASE superset DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci"
- mysql -u root -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED BY 'mysqluserpassword';"
- mysql -u root -e "GRANT ALL ON superset.* TO 'mysqluser'@'localhost';"
- psql -U postgres -c "CREATE DATABASE superset;"
- psql -U postgres -c "CREATE USER postgresuser WITH PASSWORD 'pguserpassword';"
install:
- pip install --upgrade pip
- pip install codecov tox
@@ -89,9 +44,3 @@ script:
- tox
after_success:
- codecov
cache:
pip: true
directories:
- ~/.npm
- ~/.cache
- ~/.travis_cache/

View File

@@ -1,725 +1,5 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## Change Log
### 0.28.1 (2018/10/18 17:48 +00:00)
- Bump FAB to 1.18.1
### 0.28.0 (2018/10/17 ??:?? +00:00)
- [#5896](https://github.com/apache/incubator-superset/pull/5896) [SIP-4] replace SQL Lab ajax calls with `SupersetClient` (#5896) (@williaster)
- [#6104](https://github.com/apache/incubator-superset/pull/6104) Use @vx/responsive to provide Chart width on Explore page (#6104) (@kristw)
- [#6095](https://github.com/apache/incubator-superset/pull/6095) [utils.py] gathering/refactoring into a "utils/" folder (#6095) (@mistercrunch)
- [#5869](https://github.com/apache/incubator-superset/pull/5869) [SIP-4] replace explorer ajax calls with `SupersetClient` (#5869) (@williaster)
- [#6058](https://github.com/apache/incubator-superset/pull/6058) [SIP-5&6] Refactor line_multi (#6058) (@kristw)
- [#5854](https://github.com/apache/incubator-superset/pull/5854) [SIP-4] replace dashboard ajax calls with `SupersetClient` (#5854) (@williaster)
- [#6078](https://github.com/apache/incubator-superset/pull/6078) allow cache and force refresh on table list (#6078) (@youngyjd)
- [#6121](https://github.com/apache/incubator-superset/pull/6121) This control test is flaky and affecting travis runs, turning it off for now (#6121) (@michellethomas)
- [#6038](https://github.com/apache/incubator-superset/pull/6038) Fixes to the CategoricalDeckGLContainer and filter box (#6038) (@betodealmeida)
- [#6113](https://github.com/apache/incubator-superset/pull/6113) send username in sync request (#6113) (@youngyjd)
- [#5875](https://github.com/apache/incubator-superset/pull/5875) [SIP-4] replace chart ajax calls with `SupersetClient` (#5875) (@williaster)
- [#6079](https://github.com/apache/incubator-superset/pull/6079) [refactor] Migrate from Mocha+Chai to Jest (#6079) (@xtinec)
- [#6096](https://github.com/apache/incubator-superset/pull/6096) remove utf8 declaration (#6096) (@timifasubaa)
- [#6102](https://github.com/apache/incubator-superset/pull/6102) fix dependency issue #6086 (#6102) (@aflyhorse)
- [#6103](https://github.com/apache/incubator-superset/pull/6103) Rename onTooltip to setTooltip (#6103) (@kristw)
- [#6105](https://github.com/apache/incubator-superset/pull/6105) make BigNumber PureComponent (#6105) (@kristw)
- [#6097](https://github.com/apache/incubator-superset/pull/6097) Fix link formating in README.md (#6097) (@ad-m)
- [#6088](https://github.com/apache/incubator-superset/pull/6088) move countries directory under CountryMap (#6088) (@kristw)
- [#6065](https://github.com/apache/incubator-superset/pull/6065) remove future (#6065) (@timifasubaa)
- [#6091](https://github.com/apache/incubator-superset/pull/6091) remove six dependency (#6091) (@timifasubaa)
- [#6090](https://github.com/apache/incubator-superset/pull/6090) Add ChartPlugin and metadata for deck.gl vis (#6090) (@kristw)
- [#6085](https://github.com/apache/incubator-superset/pull/6085) Add ChartPlugin and metadata for nvd3 and BigNumber vis (#6085) (@kristw)
- [#6089](https://github.com/apache/incubator-superset/pull/6089) [cypress][sqllab] increase timeout for sqllab results (#6089) (@williaster)
- [#6039](https://github.com/apache/incubator-superset/pull/6039) [SIP-5] Remove references to slice from all deck.gl components. (#6039) (@kristw)
- [#6072](https://github.com/apache/incubator-superset/pull/6072) Create chart plugins and metadata (#6072) (@kristw)
- [#6063](https://github.com/apache/incubator-superset/pull/6063) remove future imports from db migrations (#6063) (@timifasubaa)
- [#6069](https://github.com/apache/incubator-superset/pull/6069) Cypress tests for controls and explore links (#6069) (@michellethomas)
- [#6074](https://github.com/apache/incubator-superset/pull/6074) Rename color constants and move util function into separate file (#6074) (@kristw)
- [#5998](https://github.com/apache/incubator-superset/pull/5998) Fix the horizon title only show the first key (#5998) (@Narcissus7)
- [#6050](https://github.com/apache/incubator-superset/pull/6050) remove future imports (#6050) (@timifasubaa)
- [#6073](https://github.com/apache/incubator-superset/pull/6073) Fix top groups with user defined metrics (#6073) (@betodealmeida)
- [#5974](https://github.com/apache/incubator-superset/pull/5974) [cypress] add SQL lab tests (#5974) (@williaster)
- [#6061](https://github.com/apache/incubator-superset/pull/6061) feat: import/export dashboards via cli (#6061) (@arpit-agarwal)
- [#6054](https://github.com/apache/incubator-superset/pull/6054) [setup] Using pip-tools to create requirements.txt (#6054) (@john-bodley)
- [#6062](https://github.com/apache/incubator-superset/pull/6062) Add increment back arrow to time player (#6062) (@betodealmeida)
- [#6028](https://github.com/apache/incubator-superset/pull/6028) Add data structures for chart plugin system (#6028) (@kristw)
- [#6002](https://github.com/apache/incubator-superset/pull/6002) [cypress] add integration tests for dashboard (#6002) (@graceguo-supercat)
- [#6037](https://github.com/apache/incubator-superset/pull/6037) [Dashboard] Fix margin issue in dashboard modal (#6037) (@graceguo-supercat)
- [#6004](https://github.com/apache/incubator-superset/pull/6004) check db extra and metadata params preemptively (#6004) (@youngyjd)
- [#5933](https://github.com/apache/incubator-superset/pull/5933) Allow user to force refresh metadata (#5933) (@youngyjd)
- [#6051](https://github.com/apache/incubator-superset/pull/6051) [select-star] Adding optional schema to view (#6051) (@john-bodley)
- [#6030](https://github.com/apache/incubator-superset/pull/6030) Upgrade flask-appbuilder to latest. (#6030) (@jmcarp)
- [#6056](https://github.com/apache/incubator-superset/pull/6056) Revert old precision formatters (#6056) (@theikkila)
- [#6043](https://github.com/apache/incubator-superset/pull/6043) Search queries when enter is pressed (#6043) (@betodealmeida)
- [#6047](https://github.com/apache/incubator-superset/pull/6047) fix for annotation layer bug (#6047) (@yuguang)
- [#6049](https://github.com/apache/incubator-superset/pull/6049) remove redundant mysql (#6049) (@timifasubaa)
- [#6023](https://github.com/apache/incubator-superset/pull/6023) [tablemodelview] Fixing JSON api/read serializable issue (#6023) (@john-bodley)
- [#5985](https://github.com/apache/incubator-superset/pull/5985) Deprecate support for Python 3_6 (#5985) (@mistercrunch)
- [#6031](https://github.com/apache/incubator-superset/pull/6031) refer to default color scheme in colorpickercontrol instead of pointing to specific scheme (#6031) (@kristw)
- [#6027](https://github.com/apache/incubator-superset/pull/6027) Sorting tables by "modified" is broken (#6027) (@betodealmeida)
- [#6016](https://github.com/apache/incubator-superset/pull/6016) [ci] Update ci config to reduce javascript test time and some of cypress. (#6016) (@kristw)
- [#6029](https://github.com/apache/incubator-superset/pull/6029) use world map only bundle (#6029) (@kristw)
- [#5997](https://github.com/apache/incubator-superset/pull/5997) [SIP-6] Migrate visualizations to new directory structure (part 2) (#5997) (@kristw)
- [#6035](https://github.com/apache/incubator-superset/pull/6035) Revert #5991 (#6035) (@graceguo-supercat)
- [#6033](https://github.com/apache/incubator-superset/pull/6033) log query fetch time (#6033) (@timifasubaa)
- [#5566](https://github.com/apache/incubator-superset/pull/5566) [bugfix] Fix Tableviz metrics column disorder (#5566) (@yamyamyuo)
- [#5924](https://github.com/apache/incubator-superset/pull/5924) [cypress] Add integration test for area, pie, pivot_table, world_map, dual_line, sunburst, sankey, big_number, bubble, box_plot, treemap (#5924) (@kristw)
- [#6006](https://github.com/apache/incubator-superset/pull/6006) [SIP-6] Migrate visualizations to new directory structure (part 3 - nvd3) (#6006) (@kristw)
- [#6019](https://github.com/apache/incubator-superset/pull/6019) [cypress] Combine multiple tests under visualizations into single test to save running time (#6019) (@kristw)
- [#5991](https://github.com/apache/incubator-superset/pull/5991) feat: import/export dashboards via cli (#5991) (@arpit-agarwal)
- [#5960](https://github.com/apache/incubator-superset/pull/5960) [feat] Feature flag system via config (#5960) (@xtinec)
- [#6005](https://github.com/apache/incubator-superset/pull/6005) Removing the key from cypress build and removing parallel flag (#6005) (@michellethomas)
- [#6008](https://github.com/apache/incubator-superset/pull/6008) disable dashboard test (#6008) (@kristw)
- [#5995](https://github.com/apache/incubator-superset/pull/5995) wait and verify one-by-one (#5995) (@kristw)
- [#5949](https://github.com/apache/incubator-superset/pull/5949) [SIP-6] Migrate visualizations to new directory structure. (#5949) (@kristw)
- [#5983](https://github.com/apache/incubator-superset/pull/5983) Update webpack bundle configuration (#5983) (@kristw)
- [#5957](https://github.com/apache/incubator-superset/pull/5957) [cypress] Update dashboard test to remove 10s timeout (#5957) (@kristw)
- [#5959](https://github.com/apache/incubator-superset/pull/5959) Explicit set markdown version to >= 3.0 (#5959) (@manhtai)
- [#5946](https://github.com/apache/incubator-superset/pull/5946) Remove lodash.throttle and replace underscore calls with lodash (#5946) (@kristw)
- [#5975](https://github.com/apache/incubator-superset/pull/5975) Pinning a version of click to fix travis (#5975) (@michellethomas)
- [#5970](https://github.com/apache/incubator-superset/pull/5970) Add fordeal to superset user list (#5970) (@Renkai)
- [#5967](https://github.com/apache/incubator-superset/pull/5967) Constrain the max version of markdown (#5967) (@victornoel)
- [#5937](https://github.com/apache/incubator-superset/pull/5937) Deprecate getColorFromSchem (#5937) (@kristw)
- [#5906](https://github.com/apache/incubator-superset/pull/5906) fix sqllab querysearch typeahead permission error (#5906) (@youngyjd)
- [#5934](https://github.com/apache/incubator-superset/pull/5934) ensure npm run build is in production mode (#5934) (@kristw)
- [#5952](https://github.com/apache/incubator-superset/pull/5952) [deck_polyline] show metric in geohash (#5952) (@mistercrunch)
- [#5948](https://github.com/apache/incubator-superset/pull/5948) [deck_polygon] implement null locations flag (#5948) (@mistercrunch)
- [#5931](https://github.com/apache/incubator-superset/pull/5931) [bugfix] metrics issue in 'Periodicity Pivot' (#5931) (@mistercrunch)
- [#5770](https://github.com/apache/incubator-superset/pull/5770) [explore] add "View samples" modal to action buttons (#5770) (@mistercrunch)
- [#5923](https://github.com/apache/incubator-superset/pull/5923) [docs] iterating to get to ASF compliance on project site (#5923) (@mistercrunch)
- [#5945](https://github.com/apache/incubator-superset/pull/5945) [eslint] add no-only-tests (#5945) (@williaster)
- [#5926](https://github.com/apache/incubator-superset/pull/5926) Adding configuration to cypress to enable dashboard (#5926) (@michellethomas)
- [#5787](https://github.com/apache/incubator-superset/pull/5787) Add schema level access control on csv upload (#5787) (@youngyjd)
- [#5848](https://github.com/apache/incubator-superset/pull/5848) fix sqlab progress bar and status inconsistency (#5848) (@youngyjd)
- [#5943](https://github.com/apache/incubator-superset/pull/5943) remove .only (#5943) (@kristw)
- [#5940](https://github.com/apache/incubator-superset/pull/5940) fix csv upload bugs (#5940) (@timifasubaa)
- [#5938](https://github.com/apache/incubator-superset/pull/5938) use es6 import (#5938) (@kristw)
- [#5790](https://github.com/apache/incubator-superset/pull/5790) Some linting (#5790) (@mistercrunch)
- [#5932](https://github.com/apache/incubator-superset/pull/5932) Allow removing legend (#5932) (@betodealmeida)
- [#5866](https://github.com/apache/incubator-superset/pull/5866) Fix regression around low row limit for CSV exports (#5866) (@mistercrunch)
- [#5911](https://github.com/apache/incubator-superset/pull/5911) Clean up CONTRIBUTING.md: (#5911) (@alekstorm)
- [#5893](https://github.com/apache/incubator-superset/pull/5893) [SIP-6] Add reactify function and convert world map to new directory structure. (#5893) (@kristw)
- [#5778](https://github.com/apache/incubator-superset/pull/5778) [explore flow] handling duplicated column aliases (#5778) (@mistercrunch)
- [#5905](https://github.com/apache/incubator-superset/pull/5905) [bugfix] ignore history.pushState errors (#5905) (@mistercrunch)
- [#5890](https://github.com/apache/incubator-superset/pull/5890) [bugfix] De-dup script tags. #5883 (#5890) (@kristw)
- [#5901](https://github.com/apache/incubator-superset/pull/5901) Table and dist bar tests (#5901) (@michellethomas)
- [#5921](https://github.com/apache/incubator-superset/pull/5921) [contributing.md] swap cypress command order (#5921) (@williaster)
- [#5902](https://github.com/apache/incubator-superset/pull/5902) [refactor] Remove dependency on personal fork of supercluster from mapbox visualizations (#5902) (@xtinec)
- [#5917](https://github.com/apache/incubator-superset/pull/5917) [bugfix] Fix percent metric display and check for string columns in table (#5917) (@kristw)
- [#5868](https://github.com/apache/incubator-superset/pull/5868) Remove unused functions and jquery dependency (#5868) (@kristw)
- [#5891](https://github.com/apache/incubator-superset/pull/5891) [bugfix] Fix color scheme picker (#5891) (@kristw)
- [#5918](https://github.com/apache/incubator-superset/pull/5918) Fixing linting error in macro_tests (#5918) (@xtinec)
- [#5907](https://github.com/apache/incubator-superset/pull/5907) Remove jquery usage to highlight sql lab menu (#5907) (@kristw)
- [#5547](https://github.com/apache/incubator-superset/pull/5547) Adds a new macro to allow getting filter values easily (#5547) (@mjsilva)
- [#5838](https://github.com/apache/incubator-superset/pull/5838) [SIP-5] Refactor nvd3 (#5838) (@kristw)
- [#5903](https://github.com/apache/incubator-superset/pull/5903) [react16] fix React type checking (#5903) (@mistercrunch)
- [#5900](https://github.com/apache/incubator-superset/pull/5900) Add cypress artifacts directory (videos/screenshots) to gitignore and sort items in gitignore (#5900) (@kristw)
- [#5811](https://github.com/apache/incubator-superset/pull/5811) [treemap] add row_limit control (#5811) (@mistercrunch)
- [#5851](https://github.com/apache/incubator-superset/pull/5851) remove duplicated utils (#5851) (@youngyjd)
- [#5879](https://github.com/apache/incubator-superset/pull/5879) [lint] turn no-undef back on, set browser, cypress, and mocha env's (#5879) (@williaster)
- [#5775](https://github.com/apache/incubator-superset/pull/5775) [SIP-5] Refactor Time Series Table (#5775) (@kristw)
- [#5885](https://github.com/apache/incubator-superset/pull/5885) Addded documentation for Teradata DB (#5885) (@livinm)
- [#5870](https://github.com/apache/incubator-superset/pull/5870) Enable Teradata (#5870) (@livinm)
- [#5877](https://github.com/apache/incubator-superset/pull/5877) [bug fix] Fixed adhoc metric is not working for WordCloud (#5877) (@conglei)
- [#5865](https://github.com/apache/incubator-superset/pull/5865) fixed modal close issue (#5865) (@conglei)
- [#5861](https://github.com/apache/incubator-superset/pull/5861) [SIP-6] removed get_data for BigNumber (#5861) (@conglei)
### 0.28.0rc6 (2018/09/13 00:37 +00:00)
- [#5880](https://github.com/apache/incubator-superset/pull/5880) Fix CSS theme flickering on FAB pages (#5880) (@mistercrunch)
- [#5878](https://github.com/apache/incubator-superset/pull/5878) remove getColorFromScheme in favor of CategoricalColorNamespace.getScale() for histogram (#5878) (@kristw)
- [#5709](https://github.com/apache/incubator-superset/pull/5709) fix: Pivot table not sorting formatted numeric column properly (#5709) (@arpit-agarwal)
- [#5815](https://github.com/apache/incubator-superset/pull/5815) Improve categorical color management (#5815) (@kristw)
- [#5874](https://github.com/apache/incubator-superset/pull/5874) [tests] fix sqllab/TableElement_spec (#5874) (@williaster)
- [#5863](https://github.com/apache/incubator-superset/pull/5863) [time table] fix sorting on missing values (#5863) (@mistercrunch)
- [#5748](https://github.com/apache/incubator-superset/pull/5748) [Docs] Running DB migration (#5748) (@hughhhh)
- [#5867](https://github.com/apache/incubator-superset/pull/5867) correctly compute slice width in dashboard (#5867) (@kristw)
- [#5864](https://github.com/apache/incubator-superset/pull/5864) Moving get_main_db out of tests and into superset utils (#5864) (@michellethomas)
- [#5862](https://github.com/apache/incubator-superset/pull/5862) fix sqllab logging (#5862) (@timifasubaa)
- [#5860](https://github.com/apache/incubator-superset/pull/5860) fix Object.assign try to write to read-only option.style (#5860) (@kristw)
- [#5859](https://github.com/apache/incubator-superset/pull/5859) make access request open new tab (#5859) (@timifasubaa)
- [#5858](https://github.com/apache/incubator-superset/pull/5858) [bugfix] mapbox pan on filter (#5858) (@xtinec)
- [#5846](https://github.com/apache/incubator-superset/pull/5846) Adding line and big number total integration tests (#5846) (@michellethomas)
- [#5855](https://github.com/apache/incubator-superset/pull/5855) [dev] fix redux devtools (#5855) (@williaster)
- [#5850](https://github.com/apache/incubator-superset/pull/5850) update dashboard sidepane title (#5850) (@graceguo-supercat)
- [#5736](https://github.com/apache/incubator-superset/pull/5736) [sqllab]More granular sqllab logging (#5736) (@timifasubaa)
- [#5849](https://github.com/apache/incubator-superset/pull/5849) [bugfix] fix rows not showing on welcome page (retry) (#5849) (@kristw)
- [#5853](https://github.com/apache/incubator-superset/pull/5853) [bugfix] 'No numeric types to aggregate' in NVD3 chart (#5853) (@mistercrunch)
- [#5829](https://github.com/apache/incubator-superset/pull/5829) [sql lab] handle large ints, prevent overflow (#5829) (@mistercrunch)
- [#5359](https://github.com/apache/incubator-superset/pull/5359) Upgrade to React==16.4.1 & Enzyme==3.3.0 (#5359) (@mistercrunch)
- [#5844](https://github.com/apache/incubator-superset/pull/5844) add timing to stats logger (#5844) (@timifasubaa)
- [#5785](https://github.com/apache/incubator-superset/pull/5785) Handle "ambiguous durations" (#5785) (@betodealmeida)
- [#5819](https://github.com/apache/incubator-superset/pull/5819) Update time filter to use `react-datetime` (#5819) (@betodealmeida)
- [#5841](https://github.com/apache/incubator-superset/pull/5841) Enable hot module replacement for React via react-hot-loader (#5841) (@kristw)
- [#5834](https://github.com/apache/incubator-superset/pull/5834) [docs] suggest using python3.6 in installation docs (#5834) (@mistercrunch)
- [#5828](https://github.com/apache/incubator-superset/pull/5828) Fix cache for multiple time comparisons (#5828) (@betodealmeida)
- [#5830](https://github.com/apache/incubator-superset/pull/5830) Get 'Test Connection' button to take 'engine_params' into account (#5830) (@mistercrunch)
- [#5840](https://github.com/apache/incubator-superset/pull/5840) Adding instructions on how to run Cypress in Contributing.md (#5840) (@michellethomas)
- [#5839](https://github.com/apache/incubator-superset/pull/5839) [bugfix] Fix bignumber overflow in dashboard (#5839) (@kristw)
- [#5762](https://github.com/apache/incubator-superset/pull/5762) [SIP-5] Refactor Paired t-test (#5762) (@kristw)
- [#5789](https://github.com/apache/incubator-superset/pull/5789) [SIP-5] Refactor filterbox (#5789) (@kristw)
- [#5693](https://github.com/apache/incubator-superset/pull/5693) Adding simple Cypress tests (#5693) (@michellethomas)
- [#5771](https://github.com/apache/incubator-superset/pull/5771) [dashboard] Add alert on user delete root level tab (#5771) (@graceguo-supercat)
- [#5730](https://github.com/apache/incubator-superset/pull/5730) [sql_json] allow not specifying client_id (#5730) (@mistercrunch)
- [#5818](https://github.com/apache/incubator-superset/pull/5818) Update Readme that support Apache Kylin (#5818) (@zhaoyongjie)
- [#5823](https://github.com/apache/incubator-superset/pull/5823) Adding 'Resources' section to the docs (#5823) (@mistercrunch)
- [#5826](https://github.com/apache/incubator-superset/pull/5826) fix bug with react-syntax-highlighter import (#5826) (@kristw)
- [#5705](https://github.com/apache/incubator-superset/pull/5705) [SIP-5] Refactor pivot table (#5705) (@kristw)
- [#5825](https://github.com/apache/incubator-superset/pull/5825) [SIP-5] Remove unused function #easy-review (#5825) (@kristw)
- [#5761](https://github.com/apache/incubator-superset/pull/5761) [SIP-5] Refactor parallel coordinates (#5761) (@kristw)
- [#5783](https://github.com/apache/incubator-superset/pull/5783) [SIP-5] Refactor MapBox (#5783) (@kristw)
- [#5758](https://github.com/apache/incubator-superset/pull/5758) [SIP-5] Refactor and improve histogram (#5758) (@kristw)
- [#5760](https://github.com/apache/incubator-superset/pull/5760) [SIP-5] Refactor calendar chart (#5760) (@kristw)
- [#5813](https://github.com/apache/incubator-superset/pull/5813) Enable CSS Hot Module Replacement and optimize css output for production (#5813) (@kristw)
- [#5814](https://github.com/apache/incubator-superset/pull/5814) bug: don't show query overlay when panning mapbox maps (#5814) (@xtinec)
- [#5812](https://github.com/apache/incubator-superset/pull/5812) [celery] setting default (#5812) (@john-bodley)
- [#5786](https://github.com/apache/incubator-superset/pull/5786) Configure webpack-dev-server (#5786) (@kristw)
- [#5796](https://github.com/apache/incubator-superset/pull/5796) make some text in [druid,CRUD,datasource] localizable (#5796) (@hitdemo)
- [#5686](https://github.com/apache/incubator-superset/pull/5686) Force quoted column aliases for Oracle-like databases (#5686) (@villebro)
- [#5707](https://github.com/apache/incubator-superset/pull/5707) [SIP-5] Refactor table (#5707) (@kristw)
- [#5745](https://github.com/apache/incubator-superset/pull/5745) Update annotation model to have JSON Metadata field (#5745) (@hughhhh)
- [#5782](https://github.com/apache/incubator-superset/pull/5782) update thumbnail (#5782) (@hughhhh)
- [#5721](https://github.com/apache/incubator-superset/pull/5721) [SIP-5] Repair and refactor CountryMap (#5721) (@kristw)
- [#5753](https://github.com/apache/incubator-superset/pull/5753) remove backend logic for wordcloud (#5753) (@conglei)
- [#5777](https://github.com/apache/incubator-superset/pull/5777) Fix redirect to SQL Lab (#5777) (@betodealmeida)
- [#5776](https://github.com/apache/incubator-superset/pull/5776) New branding images (#5776) (@elibrumbaugh)
- [#5767](https://github.com/apache/incubator-superset/pull/5767) Fix multilayer geoviz and color picker error (#5767) (@youngyjd)
- [#5718](https://github.com/apache/incubator-superset/pull/5718) [SIP-5] Refactor and repair partition (#5718) (@kristw)
- [#5763](https://github.com/apache/incubator-superset/pull/5763) [SIP-5] Refactor rose (#5763) (@kristw)
- [#5719](https://github.com/apache/incubator-superset/pull/5719) [SIP-5] Refactor World Map (#5719) (@kristw)
- [#5722](https://github.com/apache/incubator-superset/pull/5722) [dashboard] Update font style for markdown component (#5722) (@graceguo-supercat)
- [#5768](https://github.com/apache/incubator-superset/pull/5768) fix sqlparse bug and refactor (#5768) (@timifasubaa)
### 0.28.0rc5 (2018/08/29 04:05 +00:00)
- [#5765](https://github.com/apache/incubator-superset/pull/5765) [bugfix] 'DruidCluster' object has no attribute 'db_engine_spec' (#5765) (@mistercrunch)
- [#5715](https://github.com/apache/incubator-superset/pull/5715) [Table view] Handle empty arrays in fd.timeseries_limit_metric (#5715) (@betodealmeida)
- [#5759](https://github.com/apache/incubator-superset/pull/5759) Bug: fixing async syntax for python 3.7 (#5759) (@xtinec)
- [#5766](https://github.com/apache/incubator-superset/pull/5766) Disable input when IS (NOT) NULL selected in filters (#5766) (@betodealmeida)
- [#5764](https://github.com/apache/incubator-superset/pull/5764) [bugfix] IS NOT NULL filter triggers KeyError: 'val' (#5764) (@mistercrunch)
- [#5756](https://github.com/apache/incubator-superset/pull/5756) Add Myra Labs to user list in README (#5756) (@viksit)
- [#5712](https://github.com/apache/incubator-superset/pull/5712) [deck polygon] add support for geohash (#5712) (@mistercrunch)
- [#5729](https://github.com/apache/incubator-superset/pull/5729) Silence error on migration 4736ec66ce19 constraint drop (#5729) (@mistercrunch)
- [#5749](https://github.com/apache/incubator-superset/pull/5749) Prevent deleting databases that have attached tables (#5749) (@mistercrunch)
- [#5750](https://github.com/apache/incubator-superset/pull/5750) Merge pull request #5750 from mistercrunch/updating_0_28 (@mistercrunch)
- [#5732](https://github.com/apache/incubator-superset/pull/5732) Merge pull request #5732 from mistercrunch/build_docs (@mistercrunch)
- [#5731](https://github.com/apache/incubator-superset/pull/5731) Merge pull request #5731 from mistercrunch/faq_db_engines (@mistercrunch)
- [#5701](https://github.com/apache/incubator-superset/pull/5701) [SIP-5] Refactor sankey (#5701) (@kristw)
- [#5704](https://github.com/apache/incubator-superset/pull/5704) [SIP-5] Refactor and update heatmap (#5704) (@kristw)
- [13e48e8](https://github.com/apache/incubator-superset/commit/13e48e8c8eff626f0a6543d440bf3399c0938765) typo-delipo (@mistercrunch)
- [#5725](https://github.com/apache/incubator-superset/pull/5725) Merge pull request #5725 from mistercrunch/label_verbose_name (@mistercrunch)
- [ceda309](https://github.com/apache/incubator-superset/commit/ceda3092e3fed092a4ff5f11096a0718b9446145) UPDATING.md entry about dashboard v2 forced migration in 0.28 (@mistercrunch)
- [#5744](https://github.com/apache/incubator-superset/pull/5744) update webpack (#5744) (@hughhhh)
- [#5706](https://github.com/apache/incubator-superset/pull/5706) Merge pull request #5706 from mistercrunch/color_arcs (@mistercrunch)
- [#5724](https://github.com/apache/incubator-superset/pull/5724) Merge pull request #5724 from mistercrunch/css_editable_input (@mistercrunch)
- [#5723](https://github.com/apache/incubator-superset/pull/5723) Merge pull request #5723 from mistercrunch/fix_autocomplete_filters (@mistercrunch)
- [#5746](https://github.com/apache/incubator-superset/pull/5746) [bugfix] BigNumber crash, Horizon indent and Myanmar geojson (#5746) (@kristw)
- [#5699](https://github.com/apache/incubator-superset/pull/5699) [SIP-5] Refactor sunburst (#5699) (@kristw)
- [#5690](https://github.com/apache/incubator-superset/pull/5690) [SIP-5] Repair and refactor Horizon Chart (#5690) (@kristw)
- [#5738](https://github.com/apache/incubator-superset/pull/5738) remove unneeded console.log (#5738) (@hughhhh)
- [#5726](https://github.com/apache/incubator-superset/pull/5726) [celery] Using preferred configuration proceedure (#5726) (@john-bodley)
- [09d46a7](https://github.com/apache/incubator-superset/commit/09d46a7864a67d3e2ef70fb41a5c43b28d6c14c9) Fix tests (@mistercrunch)
- [#5717](https://github.com/apache/incubator-superset/pull/5717) Autofocus aggregation in metric control (#5717) (@betodealmeida)
- [#5735](https://github.com/apache/incubator-superset/pull/5735) make some text localizable, mainly in explore, query (#5735) (@hitdemo)
- [12cc2fb](https://github.com/apache/incubator-superset/commit/12cc2fbe15533c673b12bd3cf6bed2a5c8b8a46e) [docs] note as to how to build and view the docs (@mistercrunch)
- [bddc952](https://github.com/apache/incubator-superset/commit/bddc9522e82f77942e0797694fd619fe1653ff48) [docs] FAQ entry 'Does Superset work with [database engine]?' (@mistercrunch)
- [#5720](https://github.com/apache/incubator-superset/pull/5720) Fix FAQ on filters (#5720) (@betodealmeida)
- [e964d83](https://github.com/apache/incubator-superset/commit/e964d83b45b21b95f21218fa0f25fb44c7f95b18) [table editor] better table header for Metrics tab (@mistercrunch)
- [c447a97](https://github.com/apache/incubator-superset/commit/c447a970de3e6d240a5a9a0d7a1a5b737bd2332c) [css] show border around editable input while editing (@mistercrunch)
- [ba32944](https://github.com/apache/incubator-superset/commit/ba329440bcece3f2e7033b8c02bd27460b7dfb11) [table editor] fix 'Autocomplete filters' checkbox doesn't stick (@mistercrunch)
- [#5670](https://github.com/apache/incubator-superset/pull/5670) [SIP-5] Refactor treemap (#5670) (@kristw)
- [#5714](https://github.com/apache/incubator-superset/pull/5714) [bugfix] add item is missing on table editor metrics tab (#5714) (@mistercrunch)
- [#5716](https://github.com/apache/incubator-superset/pull/5716) Merge pull request #5716 from lyft/DPTOOLS-976 (@lyft)
- [c567a89](https://github.com/apache/incubator-superset/commit/c567a89ee7529e88649d78f415a54988b01e218e) Use 403 (@betodealmeida)
- [9827925](https://github.com/apache/incubator-superset/commit/9827925015a42a47d12db82595fd88de6a259d62) Return 401 on no authorization (@betodealmeida)
- [#5708](https://github.com/apache/incubator-superset/pull/5708) Geojson property names (#5708) (@joshbrooks)
- [#5702](https://github.com/apache/incubator-superset/pull/5702) remove console.log and change wording (#5702) (@kristw)
- [#5672](https://github.com/apache/incubator-superset/pull/5672) Revise markup.js and iframe.js (#5672) (@kristw)
- [#5703](https://github.com/apache/incubator-superset/pull/5703) [sqlparse] fix sqlparse bug (#5703) (@timifasubaa)
- [71866f6](https://github.com/apache/incubator-superset/commit/71866f6a127c616da07f221572ca04a95902e7e0) [deck arcs] add JS hooks for sourceColor & targetColor (@mistercrunch)
- [#5684](https://github.com/apache/incubator-superset/pull/5684) [security] Moving set/merge perm to security manager (#5684) (@john-bodley)
- [#5623](https://github.com/apache/incubator-superset/pull/5623) Merge pull request #5623 from mistercrunch/fix_templates (@mistercrunch)
- [#5694](https://github.com/apache/incubator-superset/pull/5694) Allow users to select color for big number (#5694) (@hughhhh)
- [#5697](https://github.com/apache/incubator-superset/pull/5697) Adds geodata for Myanmar (#5697) (@joshbrooks)
- [#5698](https://github.com/apache/incubator-superset/pull/5698) adds TimorLeste geodata (#5698) (@joshbrooks)
- [#5695](https://github.com/apache/incubator-superset/pull/5695) [bugfix] geohash lat/long is reversed (#5695) (@mistercrunch)
- [#5663](https://github.com/apache/incubator-superset/pull/5663) Make brush send events (#5663) (@betodealmeida)
- [#5634](https://github.com/apache/incubator-superset/pull/5634) [viz flow] detect TIMESTAMP, transition to line chart (#5634) (@mistercrunch)
- [#5638](https://github.com/apache/incubator-superset/pull/5638) Add categories and time slider to arc deck.gl viz (#5638) (@betodealmeida)
- [#5675](https://github.com/apache/incubator-superset/pull/5675) Fixes to the play slider (#5675) (@betodealmeida)
- [#5646](https://github.com/apache/incubator-superset/pull/5646) Increase pylint jobs (#5646) (@betodealmeida)
- [#5669](https://github.com/apache/incubator-superset/pull/5669) Repair and refactor Word Cloud (#5669) (@kristw)
- [#5691](https://github.com/apache/incubator-superset/pull/5691) Refactor force-directed graph (#5691) (@kristw)
- [#5687](https://github.com/apache/incubator-superset/pull/5687) [bugfix] Encode unicode error message response (#5687) (@zhaoyongjie)
- [#5641](https://github.com/apache/incubator-superset/pull/5641) Field names in big query can contain only alphanumeric and underscore (#5641) (@sumedhsakdeo)
### 0.27.0 (2018/08/21 20:16 +00:00)
- [#5682](https://github.com/apache/incubator-superset/pull/5682) [bugfix] making secondary_metric optional (#5682) (@mistercrunch)
- [#5665](https://github.com/apache/incubator-superset/pull/5665) Upgrade mysqlclient to 1.3.13 (#5665) (@emlittleworth)
- [#5640](https://github.com/apache/incubator-superset/pull/5640) Fix CSS (#5640) (@betodealmeida)
- [#5688](https://github.com/apache/incubator-superset/pull/5688) change title from hotkeys to keyboard shortcuts (#5688) (@kristw)
### 0.28.0rc3 (2018/08/21 17:19 +00:00)
- [#5683](https://github.com/apache/incubator-superset/pull/5683) [bug] 'an error has ooccured' when saving datasource (#5683) (@mistercrunch)
- [#5685](https://github.com/apache/incubator-superset/pull/5685) make some text localizable, mainly in dashboard, explore, datasource editor, webpage title (#5685) (@hitdemo)
- [#5655](https://github.com/apache/incubator-superset/pull/5655) Handling bigquery dialect when previewing data (#5655) (@sumedhsakdeo)
- [#5657](https://github.com/apache/incubator-superset/pull/5657) [bugfix] df is None breaks df.empty check (#5657) (@mistercrunch)
- [#5671](https://github.com/apache/incubator-superset/pull/5671) Refactor Chord vis (#5671) (@kristw)
- [#5681](https://github.com/apache/incubator-superset/pull/5681) Fix time filter in cache (#5681) (@betodealmeida)
- [#5662](https://github.com/apache/incubator-superset/pull/5662) Minor improvements to SQL Lab UI (#5662) (@kristw)
- [#5642](https://github.com/apache/incubator-superset/pull/5642) Filter out null locations by default (#5642) (@betodealmeida)
- [#5668](https://github.com/apache/incubator-superset/pull/5668) Update CONTRIBUTING.md (#5668) (@hughhhh)
- [#5652](https://github.com/apache/incubator-superset/pull/5652) [sqllab] call out transient state of tabs to users (#5652) (@williaster)
- [#5661](https://github.com/apache/incubator-superset/pull/5661) [bugfix] TypeError: adhocMetric.comparator.join is not a function (#5661) (@mistercrunch)
- [#5645](https://github.com/apache/incubator-superset/pull/5645) Fix checkbox is fails When disable Druid datasource (#5645) (@zhaoyongjie)
- [#5649](https://github.com/apache/incubator-superset/pull/5649) fix multilayer viz backend error (#5649) (@youngyjd)
- [#5644](https://github.com/apache/incubator-superset/pull/5644) handle exception and set dtype value to JSON, when column type JSON (#5644) (@sumedhsakdeo)
- [#5567](https://github.com/apache/incubator-superset/pull/5567) make filters use security manager (#5567) (@timifasubaa)
- [#5648](https://github.com/apache/incubator-superset/pull/5648) Updating yarn.lock for the vx upgrade (#5648) (@michellethomas)
- [#5647](https://github.com/apache/incubator-superset/pull/5647) Upgrading vx responsive to fix ResizeObserver issue (#5647) (@michellethomas)
- [#5643](https://github.com/apache/incubator-superset/pull/5643) use_slice_data in slice_json calls (#5643) (@michellethomas)
- [#5637](https://github.com/apache/incubator-superset/pull/5637) Explore View Perf Fix (#5637) (@sumedhsakdeo)
- [#5100](https://github.com/apache/incubator-superset/pull/5100) Fix form data issue switching viz types (#5100) (@michellethomas)
- [#5433](https://github.com/apache/incubator-superset/pull/5433) [title] Fix issue with non-string names in series title (#5433) (@john-bodley)
- [#5632](https://github.com/apache/incubator-superset/pull/5632) Fetch a batch of rows from bigquery (#5632) (@sumedhsakdeo)
- [#5630](https://github.com/apache/incubator-superset/pull/5630) [bubble] Fixing ad-hoc metric labels (#5630) (@john-bodley)
- [#5626](https://github.com/apache/incubator-superset/pull/5626) Tackling late-arriving comments from #5186 (#5626) (@mistercrunch)
- [#5612](https://github.com/apache/incubator-superset/pull/5612) [sql lab] always use NullPool (#5612) (@mistercrunch)
- [#5631](https://github.com/apache/incubator-superset/pull/5631) [bug fix] Fixed forced percentage format on tooltips and bubble chart tooltips format. (#5631) (@conglei)
- [#5629](https://github.com/apache/incubator-superset/pull/5629) [bugfix] TIMESTAMP not detected as date (#5629) (@mistercrunch)
- [#5621](https://github.com/apache/incubator-superset/pull/5621) Fix annotation_json endpoint (#5621) (@hughhhh)
- [#5624](https://github.com/apache/incubator-superset/pull/5624) [Dashobard]Fix bad merge (#5624) (@graceguo-supercat)
- [#5568](https://github.com/apache/incubator-superset/pull/5568) [bugfix] line_multi chart crashed on chosen (#5568) (#5572) (@kristw)
- [#5549](https://github.com/apache/incubator-superset/pull/5549) Add additional heatmap schemas (#5549) (@jerowe)
- [#5597](https://github.com/apache/incubator-superset/pull/5597) No exception on no data (#5597) (@betodealmeida)
- [d04d714](https://github.com/apache/incubator-superset/commit/d04d714fe594798f9a27a395cef1b748d7b13f37) Fix menu on 'import dashboards' page (@mistercrunch)
- [#5622](https://github.com/apache/incubator-superset/pull/5622) Add option to run query with ctrl+enter (#5622) (@betodealmeida)
- [#5603](https://github.com/apache/incubator-superset/pull/5603) [feature] Allow min/max value for the sparkline in time series table (#5603) (@kristw)
- [#5618](https://github.com/apache/incubator-superset/pull/5618) [dashboards] Increasing position_json to MEDIUMTEXT for MySQL (#5618) (@john-bodley)
- [#5584](https://github.com/apache/incubator-superset/pull/5584) [fix] Enforcing main dttm column (#5584) (@john-bodley)
- [#5611](https://github.com/apache/incubator-superset/pull/5611) make some text localizable (#5611) (@hitdemo)
- [#5480](https://github.com/apache/incubator-superset/pull/5480) fix cal_heatmap tips location error (#5480) (#5587) (@Narcissus7)
### 0.27.0rc1 (2018/08/12 17:03 +00:00)
- [#5589](https://github.com/apache/incubator-superset/pull/5589) [ad-hoc filters] Fixing legacy conversion (#5589) (@john-bodley)
- [#5596](https://github.com/apache/incubator-superset/pull/5596) [sql lab - explore flow] make sure groupby is empty (#5596) (@mistercrunch)
- [#5592](https://github.com/apache/incubator-superset/pull/5592) [bug]Fix load_examples dashboard version key name (#5592) (@graceguo-supercat)
- [#5579](https://github.com/apache/incubator-superset/pull/5579) [sql lab] visualization flow to detect unaliased columns (#5579) (@mistercrunch)
- [#5580](https://github.com/apache/incubator-superset/pull/5580) [table editor] disable 'Sync table metadata' button for Superset views (#5580) (@mistercrunch)
- [#5550](https://github.com/apache/incubator-superset/pull/5550) Template dashboard (#5550) (@betodealmeida)
- [#5562](https://github.com/apache/incubator-superset/pull/5562) update python3 version for testing to 3.6 (#5562) (@octaviancorlade)
- [#5574](https://github.com/apache/incubator-superset/pull/5574) Fixed the wrong icon for Source -> Table (#5574) (@conglei)
- [#5573](https://github.com/apache/incubator-superset/pull/5573) remove deep-equal and use _.isEqual instead (#5573) (@kristw)
- [#5186](https://github.com/apache/incubator-superset/pull/5186) Implement a React-based table editor (#5186) (@mistercrunch)
- [#5552](https://github.com/apache/incubator-superset/pull/5552) Add option for BigNumber to not start y-axis at 0 (#5552) (@kristw)
- [#5561](https://github.com/apache/incubator-superset/pull/5561) A collection of small bug fixes on master (#5561) (@mistercrunch)
- [#5564](https://github.com/apache/incubator-superset/pull/5564) remove uneccessary comma (#5564) (@hitdemo)
- [#5560](https://github.com/apache/incubator-superset/pull/5560) Remove function since_until_to_time_range (#5560) (@mistercrunch)
- [#5558](https://github.com/apache/incubator-superset/pull/5558) [sql lab] allow EXPlAIN queries (#5558) (@mistercrunch)
- [#5515](https://github.com/apache/incubator-superset/pull/5515) convert position to v2 for Superset load_examples (#5515) (@graceguo-supercat)
- [#5544](https://github.com/apache/incubator-superset/pull/5544) Improve URLs for Chart and Dashboard ModelViews (#5544) (@mistercrunch)
- [#5559](https://github.com/apache/incubator-superset/pull/5559) permissions bug fixes (#5559) (@timifasubaa)
- [#5546](https://github.com/apache/incubator-superset/pull/5546) [bugfix] time filter on dashboard view (#5546) (@mistercrunch)
- [#5543](https://github.com/apache/incubator-superset/pull/5543) Reduce dashboard position_json data size (#5543) (@graceguo-supercat)
- [#5487](https://github.com/apache/incubator-superset/pull/5487) Match viz dataframe column case to form_data fields for Snowflake, Oracle and Redshift (#5487) (@villebro)
- [#5398](https://github.com/apache/incubator-superset/pull/5398) Re-add dashboard short links (#5398) (@jaylindquist)
- [#5554](https://github.com/apache/incubator-superset/pull/5554) Add Thailand country map (#5554) (@ekasitk)
- [#5514](https://github.com/apache/incubator-superset/pull/5514) remove js packages that are not referenced in js code (#5514) (@kristw)
- [#4874](https://github.com/apache/incubator-superset/pull/4874) Portuguese translation (#4874) (@nunohelibeires)
- [#5523](https://github.com/apache/incubator-superset/pull/5523) [sql lab] simplify the visualize flow (#5523) (@mistercrunch)
- [#5469](https://github.com/apache/incubator-superset/pull/5469) Update BigNumber design (#5469) (@kristw)
- [#5536](https://github.com/apache/incubator-superset/pull/5536) Replace metadata refresh stacktrace with danger flash (#5536) (@villebro)
- [#5540](https://github.com/apache/incubator-superset/pull/5540) fix superset error message flow (#5540) (@timifasubaa)
- [#5531](https://github.com/apache/incubator-superset/pull/5531) Include README in MANIFEST (#5531) (@jeffreythewang)
- [#5437](https://github.com/apache/incubator-superset/pull/5437) Annotation Styles for Time Series Annotations (#5437) (@JamshedRahman)
- [#5538](https://github.com/apache/incubator-superset/pull/5538) Stop pretty printing dashboard json (#5538) (@michellethomas)
- [#5533](https://github.com/apache/incubator-superset/pull/5533) [ad-hoc filters] Remove legacy split in /explore (#5533) (@john-bodley)
- [#5517](https://github.com/apache/incubator-superset/pull/5517) [get_df] Updating multi-statement logic (#5517) (@john-bodley)
- [#5521](https://github.com/apache/incubator-superset/pull/5521) Adding 364 days to time compare option (#5521) (@michellethomas)
- [#5525](https://github.com/apache/incubator-superset/pull/5525) [ad-hoc filters] Fixing issue with legacy filters (#5525) (@john-bodley)
- [#5529](https://github.com/apache/incubator-superset/pull/5529) Fix time shift (#5529) (@betodealmeida)
- [#5380](https://github.com/apache/incubator-superset/pull/5380) Add time grain blacklist and addons to config.py (#5380) (@villebro)
- [#5522](https://github.com/apache/incubator-superset/pull/5522) added clickhouse as supported db (#5522) (@The-Alchemist)
- [#5512](https://github.com/apache/incubator-superset/pull/5512) hotfix - pass link not error message (#5512) (@timifasubaa)
- [#5504](https://github.com/apache/incubator-superset/pull/5504) Set max width for tooltips (#5504) (@jeffreythewang)
- [#5516](https://github.com/apache/incubator-superset/pull/5516) Fixed the issue of Zambia country map. (#5516) (@visshaljagtap)
- [#5500](https://github.com/apache/incubator-superset/pull/5500) allow security manager provide error message (#5500) (@timifasubaa)
- [#5425](https://github.com/apache/incubator-superset/pull/5425) set default layout for new added charts (#5425) (@graceguo-supercat)
- [#5459](https://github.com/apache/incubator-superset/pull/5459) Added India in country map visualizaion. (#5459) (@visshaljagtap)
- [#5508](https://github.com/apache/incubator-superset/pull/5508) Fix 5479 - unicode columns issue. (#5508) (@mmuru)
- [#5502](https://github.com/apache/incubator-superset/pull/5502) Improve hive/pyhive error message regex (#5502) (@mistercrunch)
- [#5505](https://github.com/apache/incubator-superset/pull/5505) Remove dashboard transition related config (#5505) (@graceguo-supercat)
- [#5490](https://github.com/apache/incubator-superset/pull/5490) [sqllab] fix unexpected keyword argument 'ignore_nan' (#5490) (@mistercrunch)
- [#5493](https://github.com/apache/incubator-superset/pull/5493) Apply SQL_QUERY_MUTATOR to explore & dashboard (#5493) (@mistercrunch)
- [#5494](https://github.com/apache/incubator-superset/pull/5494) [sql lab] fix Hive 'Transport' not open issue (#5494) (@mistercrunch)
- [#5495](https://github.com/apache/incubator-superset/pull/5495) [sql lab] extract Hive error messages (#5495) (@mistercrunch)
- [#5387](https://github.com/apache/incubator-superset/pull/5387) Visualization Unicode bug fix (#5387) (@JamshedRahman)
- [#5497](https://github.com/apache/incubator-superset/pull/5497) [migration] bug fix in dashboard migration (bebcf3fed1fe_) (#5497) (@graceguo-supercat)
- [#5492](https://github.com/apache/incubator-superset/pull/5492) Modify Athena connection description (#5492) (@yoonian)
- [#5478](https://github.com/apache/incubator-superset/pull/5478) Remove is-react dep (#5478) (@betodealmeida)
- [#5418](https://github.com/apache/incubator-superset/pull/5418) retire dashboard v1 (js and python) (#5418) (@graceguo-supercat)
- [#5463](https://github.com/apache/incubator-superset/pull/5463) Migrate dashboard positions data from v1 to v2 format (#5463) (@graceguo-supercat)
- [#5471](https://github.com/apache/incubator-superset/pull/5471) [migration] Fix migration 3dda56f1c (#5471) (@john-bodley)
- [#5468](https://github.com/apache/incubator-superset/pull/5468) fix migration 3dda56f1c (#5468) (@timifasubaa)
- [#5460](https://github.com/apache/incubator-superset/pull/5460) Move flake8-related packages deps to reqs-dev.txt (#5460) (@mistercrunch)
- [#5426](https://github.com/apache/incubator-superset/pull/5426) Add row_limit control to line chart (#5426) (@mistercrunch)
- [#5467](https://github.com/apache/incubator-superset/pull/5467) Fix broken dedup and remove redundant db_spec logic (#5467) (@villebro)
- [#5464](https://github.com/apache/incubator-superset/pull/5464) Fix the build by merging both db migrations heads (#5464) (@mistercrunch)
- [#5178](https://github.com/apache/incubator-superset/pull/5178) [sql] Correct SQL parameter formatting (#5178) (@john-bodley)
- [#5454](https://github.com/apache/incubator-superset/pull/5454) Clarify title when importing a table (#5454) (@mistercrunch)
- [#5455](https://github.com/apache/incubator-superset/pull/5455) Add week granularity for Clickhouse (#5455) (@qeorqe)
- [#5436](https://github.com/apache/incubator-superset/pull/5436) Added Zambia geojson up to district level. (#5436) (@AndreLesa)
- [#5410](https://github.com/apache/incubator-superset/pull/5410) Migrated to click (#5410) (@gbates101)
- [#5443](https://github.com/apache/incubator-superset/pull/5443) Add Snowflake connection string instructions (#5443) (@villebro)
- [#5448](https://github.com/apache/incubator-superset/pull/5448) Time filter fixes (#5448) (@betodealmeida)
- [#5413](https://github.com/apache/incubator-superset/pull/5413) remove limiting at the display level (#5413) (@timifasubaa)
- [#5432](https://github.com/apache/incubator-superset/pull/5432) Typo fixes in viz.py and CONTRIBUTING.md (#5432) (@visshaljagtap)
- [#5416](https://github.com/apache/incubator-superset/pull/5416) Add pylint back as a tox env (#5416) (@mistercrunch)
- [#5424](https://github.com/apache/incubator-superset/pull/5424) Avoid expensive select_star on dashboard bootstrap data (#5424) (@mistercrunch)
- [#5419](https://github.com/apache/incubator-superset/pull/5419) Fixed typos in currently modified files (#5419) (@visshaljagtap)
- [#5393](https://github.com/apache/incubator-superset/pull/5393) allow selection of dbs where csv can be uploaded to (#5393) (@timifasubaa)
- [#5415](https://github.com/apache/incubator-superset/pull/5415) Fix db migration 3dda56f1c4c6 (#5415) (@mistercrunch)
- [#5370](https://github.com/apache/incubator-superset/pull/5370) [webpack 4] third time's the charm ;) (#5370) (@williaster)
- [#5412](https://github.com/apache/incubator-superset/pull/5412) Fix time filter in dashboard v2 (#5412) (@betodealmeida)
- [#5411](https://github.com/apache/incubator-superset/pull/5411) allow 7 tabs, remove 'slice_' prefix in logs (#5411) (@williaster)
- [#5177](https://github.com/apache/incubator-superset/pull/5177) Time shift difference (#5177) (@betodealmeida)
- [#5295](https://github.com/apache/incubator-superset/pull/5295) [sqllab] Fix sqllab limit regex issue with sqlparse (#5295) (@timifasubaa)
- [#5101](https://github.com/apache/incubator-superset/pull/5101) Explore to SQL Lab (#5101) (@betodealmeida)
- [#5404](https://github.com/apache/incubator-superset/pull/5404) [big_number] tooltip shows in the wrong place (#5404) (@mistercrunch)
- [#4981](https://github.com/apache/incubator-superset/pull/4981) Make time filter more usable (#4981) (@betodealmeida)
- [#5329](https://github.com/apache/incubator-superset/pull/5329) [Table Viz] columns not match with group_by control (#5329) (@graceguo-supercat)
- [#5376](https://github.com/apache/incubator-superset/pull/5376) [bugfix] make MetricsControl work with DECK visualizations (#5376) (@mistercrunch)
- [#5375](https://github.com/apache/incubator-superset/pull/5375) Add `IS NOT NULL` and `IS NULL` as filter options (#5375) (@hughhhh)
- [#5352](https://github.com/apache/incubator-superset/pull/5352) Make Pypi upload support markdown (#5352) (@mistercrunch)
- [#5392](https://github.com/apache/incubator-superset/pull/5392) Fix display limit in sql lab (#5392) (@villebro)
- [#5403](https://github.com/apache/incubator-superset/pull/5403) Fix the build (#5403) (@mistercrunch)
- [#5368](https://github.com/apache/incubator-superset/pull/5368) quote hive column names (#5368) (@timifasubaa)
- [#5355](https://github.com/apache/incubator-superset/pull/5355) get rid of global `notify` (#5355) (@williaster)
- [#5236](https://github.com/apache/incubator-superset/pull/5236) [pie] improvements to pie charts (#5236) (@mistercrunch)
- [#5357](https://github.com/apache/incubator-superset/pull/5357) Set control 'percent_metrics's default to [] (#5357) (@mistercrunch)
- [#5379](https://github.com/apache/incubator-superset/pull/5379) Adding Druid Time Granularities (#5379) (@JamshedRahman)
- [#5371](https://github.com/apache/incubator-superset/pull/5371) Set ignore NaN as true for TableViz (#5371) (@hughhhh)
- [#5362](https://github.com/apache/incubator-superset/pull/5362) [dashboard] should use forceV2Edit property name (#5362) (@graceguo-supercat)
- [#5360](https://github.com/apache/incubator-superset/pull/5360) [dashboard] Fix save issue at Force_V2_Edit mode (#5360) (@graceguo-supercat)
- [#5334](https://github.com/apache/incubator-superset/pull/5334) CHANGELOG entry for 0.25.0 to 0.26.0 (#5334) (@mistercrunch)
- [#5303](https://github.com/apache/incubator-superset/pull/5303) use schema form field in upload csv (#5303) (@timifasubaa)
- [#5354](https://github.com/apache/incubator-superset/pull/5354) [cache] Adding description for a zero cache timeout (#5354) (@john-bodley)
- [#5356](https://github.com/apache/incubator-superset/pull/5356) added a 'no_trend_line' option (#5356) (@xiaoyugit)
### 0.26.2 (2018/07/05 13:37 +00:00)
- [#5349](https://github.com/apache/incubator-superset/pull/5349) impala support for epoch timestamps (#5349) (@aaronbannin)
- [#5211](https://github.com/apache/incubator-superset/pull/5211) [Bug fix] Divide by 1000.000 in epoch_ms_to_dttm() to not lose precision in Presto (#5211) (@EvelynTurner)
- [#5328](https://github.com/apache/incubator-superset/pull/5328) Implement rolling api introduced in pandas 0.18 (#5328) (@villebro)
- [#5337](https://github.com/apache/incubator-superset/pull/5337) normalize column names for Redshift (#5337) (@minh5)
### 0.26.1 (2018/07/04 21:16 +00:00)
- [#5338](https://github.com/apache/incubator-superset/pull/5338) A couple of setup.py fixes (#5338) (@xrmx)
- [#5346](https://github.com/apache/incubator-superset/pull/5346) RST formatting fix for Installation docs (#5346) (@kulte)
- [#5348](https://github.com/apache/incubator-superset/pull/5348) Fix typo in Start with Docker (#5348) (@kulte)
### 0.26.0 (2018/07/03 14:13 +00:00)
- [#5315](https://github.com/apache/incubator-superset/pull/5315) [cache] Allowing zero cache-timeout (#5315) (@john-bodley)
- [#5313](https://github.com/apache/incubator-superset/pull/5313) Fix flaky unit test - remove 'Markup' object in data (#5313) (@mistercrunch)
- [#5309](https://github.com/apache/incubator-superset/pull/5309) [bugfix] README encoding-related UnicodeDecodeError on setup.py (#5309) (@mistercrunch)
- [#5320](https://github.com/apache/incubator-superset/pull/5320) Update core.py (#5320) (@fly-high-bj)
- [#5323](https://github.com/apache/incubator-superset/pull/5323) [dashboard fix]Fix copy_dash unit test (#5323) (@graceguo-supercat)
- [#5302](https://github.com/apache/incubator-superset/pull/5302) [DeckGL] Raise error with null values (#5302) (@hughhhh)
- [#5305](https://github.com/apache/incubator-superset/pull/5305) Adding THE ICONIC to the list (#5305) (@ksaagariconic)
### 0.26.0rc2 (2018/06/28 04:40 +00:00)
- [#4724](https://github.com/apache/incubator-superset/pull/4724) Improve database type inference (#4724) (@mistercrunch)
- [#5296](https://github.com/apache/incubator-superset/pull/5296) [dashboard v2] add MissingChart component in the case that chart component has no slice definition, add tests. (#5296) (@williaster)
- [#5297](https://github.com/apache/incubator-superset/pull/5297) [dashobard fix]: fix validation check for default_filters (#5297) (@graceguo-supercat)
- [#5274](https://github.com/apache/incubator-superset/pull/5274) [get_df] Fix datetime conversion (#5274) (@john-bodley)
- [#5290](https://github.com/apache/incubator-superset/pull/5290) Pin boto3 to 1.4.7 (#5290) (@jeffreythewang)
- [#5291](https://github.com/apache/incubator-superset/pull/5291) [dashboard fix] force refresh charts under tabs (#5291) (@graceguo-supercat)
- [#5293](https://github.com/apache/incubator-superset/pull/5293) fix sqllab <Loading /> css, fix double AddSliceCard margin and drag border (#5293) (@williaster)
- [#5267](https://github.com/apache/incubator-superset/pull/5267) add more precise types to hive table from csv (#5267) (@timifasubaa)
- [#5268](https://github.com/apache/incubator-superset/pull/5268) specify hve namespace for tables (#5268) (@timifasubaa)
- [#4528](https://github.com/apache/incubator-superset/pull/4528) [wip] dashboard builder v2 (#4528) (@williaster)
- [#5271](https://github.com/apache/incubator-superset/pull/5271) [metric] Fixing ad-hoc metric for dual-line chart (#5271) (@john-bodley)
- [#5249](https://github.com/apache/incubator-superset/pull/5249) [druid] Adding verbose_name to editable columns (#5249) (@john-bodley)
- [#5257](https://github.com/apache/incubator-superset/pull/5257) make sure there is a val to be set for existing filters (#5257) (@hughhhh)
- [#4964](https://github.com/apache/incubator-superset/pull/4964) Fix edge case around NaN values (#4964) (@mistercrunch)
- [#5154](https://github.com/apache/incubator-superset/pull/5154) [bugfix] add support for numeric nodes in Sankey (#5154) (@mistercrunch)
- [#5248](https://github.com/apache/incubator-superset/pull/5248) [bugfix] get word_cloud to support complex metrics (#5248) (@mistercrunch)
- [#5266](https://github.com/apache/incubator-superset/pull/5266) fixing regex displaying as undefined in the pill (#5266) (@GabeLoins)
- [#5262](https://github.com/apache/incubator-superset/pull/5262) Bump pydruid to 0.4.4 (#5262) (@mistercrunch)
- [#5264](https://github.com/apache/incubator-superset/pull/5264) Update db_engine_specs.py (#5264) (@timifasubaa)
- [#5263](https://github.com/apache/incubator-superset/pull/5263) [timeseries table] use verbose date in tooltip by default (#5263) (@williaster)
- [#5214](https://github.com/apache/incubator-superset/pull/5214) Moving homogenize_types to after no data exception (#5214) (@michellethomas)
- [#5241](https://github.com/apache/incubator-superset/pull/5241) [Explore] Handle empty metrics control data (#5241) (@graceguo-supercat)
- [#5121](https://github.com/apache/incubator-superset/pull/5121) [sql lab] Fix issue around VARBINARY type in Presto (#5121) (@mistercrunch)
- [#4520](https://github.com/apache/incubator-superset/pull/4520) Allow users to view dashboards they own (#4520) (@jeffreythewang)
- [#5253](https://github.com/apache/incubator-superset/pull/5253) Revert "[perf] add webpack 4 + SplitChunks + lazy load visualizations" (#5253) (@john-bodley)
- [#5216](https://github.com/apache/incubator-superset/pull/5216) [sqllab] Fix sql lab resolution link (#5216) (@timifasubaa)
- [#5184](https://github.com/apache/incubator-superset/pull/5184) Pin botocore version (#5184) (@ledor473)
- [#5220](https://github.com/apache/incubator-superset/pull/5220) Describe the use of custom OAuth2 authorization servers (#5220) (@ricard2k)
- [#5237](https://github.com/apache/incubator-superset/pull/5237) [bubble-chart] Fixing issue w/ metric names (#5237) (@john-bodley)
- [#5206](https://github.com/apache/incubator-superset/pull/5206) [adhoc-filters] Adding adhoc-filters to all viz types (#5206) (@john-bodley)
- [#5240](https://github.com/apache/incubator-superset/pull/5240) [perf] add webpack 4 + SplitChunks + lazy load visualizations (#5240) (@williaster)
- [#5217](https://github.com/apache/incubator-superset/pull/5217) [CRUD] disable user change slices from dashboardmodelview (#5217) (@graceguo-supercat)
- [#5238](https://github.com/apache/incubator-superset/pull/5238) [CRUD] Improving performance by disabling editing Associated Chart] (#5238) (@john-bodley)
- [#5215](https://github.com/apache/incubator-superset/pull/5215) [Explore] Enable Rich tooltip by default (#5215) (@graceguo-supercat)
- [#5226](https://github.com/apache/incubator-superset/pull/5226) setup: improve description (#5226) (@xrmx)
- [#5195](https://github.com/apache/incubator-superset/pull/5195) [sql lab] quote schema and table name (#5195) (@mistercrunch)
- [#5222](https://github.com/apache/incubator-superset/pull/5222) Bump Celery to 4.2.0 (#5222) (@villebro)
- [#5227](https://github.com/apache/incubator-superset/pull/5227) README: update Maieutical Labs url (#5227) (@xrmx)
- [#5219](https://github.com/apache/incubator-superset/pull/5219) Revert "[webpack] setup lazy loading for all visualizations" (#5219) (@williaster)
- [#5204](https://github.com/apache/incubator-superset/pull/5204) [explore] fix autocomplete on verbose names (#5204) (@mistercrunch)
- [#4727](https://github.com/apache/incubator-superset/pull/4727) [webpack] setup lazy loading for all visualizations (#4727) (@williaster)
- [#5203](https://github.com/apache/incubator-superset/pull/5203) [pie-chart] Restricting query to single metric (#5203) (@john-bodley)
- [#5205](https://github.com/apache/incubator-superset/pull/5205) Fixing issue with table viz for table with no metrics (#5205) (@michellethomas)
- [#5194](https://github.com/apache/incubator-superset/pull/5194) Merge pull request #5194 from timifasubaa/pass_error_link_separately (@timifasubaa)
- [7fa5559](https://github.com/apache/incubator-superset/commit/7fa5559a66afd7ef06bf35ad72f284f6f253d2b9) remove resolution link prop (@timifasubaa)
- [#5118](https://github.com/apache/incubator-superset/pull/5118) Merge pull request #5118 from michellethomas/add_metrics_control_sort_by (@michellethomas)
- [#5181](https://github.com/apache/incubator-superset/pull/5181) fix Formula type annotation, it doesn't show up since #4630 (#5181) (@graceguo-supercat)
- [#5176](https://github.com/apache/incubator-superset/pull/5176) Introduce class attr BaseViz.enforce_numerical_metrics (#5176) (@mistercrunch)
- [#5187](https://github.com/apache/incubator-superset/pull/5187) Repoint .istambul.yml to the right location (#5187) (@mistercrunch)
- [7a107fa](https://github.com/apache/incubator-superset/commit/7a107fac6270e6866a00b5c6e2373ea67564d310) pass_error_message_separately (@timifasubaa)
- [#5190](https://github.com/apache/incubator-superset/pull/5190) Merge pull request #5190 from timifasubaa/fix_null_metrics (@timifasubaa)
- [b380a57](https://github.com/apache/incubator-superset/commit/b380a57c91f9918e7dbc8f858df840e3ccb8d24d) Fixing sortby adhoc metrics for table viz (@michellethomas)
- [95bb175](https://github.com/apache/incubator-superset/commit/95bb1753ab3a9fef572b40d7b7762fd7b4982374) fix empty metrics (@timifasubaa)
- [#5179](https://github.com/apache/incubator-superset/pull/5179) Adding column only if it doesn't already exist (#5179) (@michellethomas)
- [#5183](https://github.com/apache/incubator-superset/pull/5183) fetch datasources from broker endpoint when refresh new datasources (#5183) (@liyuance)
- [#5167](https://github.com/apache/incubator-superset/pull/5167) [migrations] Cleaning up migration logic (#5167) (@john-bodley)
- [#5155](https://github.com/apache/incubator-superset/pull/5155) [migrations] Cleanup recent migrations (#5155) (@john-bodley)
- [#5055](https://github.com/apache/incubator-superset/pull/5055) Fixing tooltip displaying metrics in heatmap (#5055) (@michellethomas)
- [#5108](https://github.com/apache/incubator-superset/pull/5108) Fix bullet chart rendering (#5108) (@Tresdon)
- [#5122](https://github.com/apache/incubator-superset/pull/5122) Pin FAB and bump a bunch of JS libs (#5122) (@mistercrunch)
- [#4193](https://github.com/apache/incubator-superset/pull/4193) Init docker for local development environment. (#4193) (@xiaohanyu)
- [#5028](https://github.com/apache/incubator-superset/pull/5028) [druid] Fixing Druid version check (#5028) (@john-bodley)
- [#5156](https://github.com/apache/incubator-superset/pull/5156) Restore translations as of 459cb701fb2140fcce8b97a1839a9511574375c7 (#5156) (@mistercrunch)
- [#5162](https://github.com/apache/incubator-superset/pull/5162) [Explore][Adhoc Metrics/ Filters] disabled message for custom sql tab in druid (#5162) (@GabeLoins)
- [#5161](https://github.com/apache/incubator-superset/pull/5161) [migration] Adding migration to remove empty in/not-in filters (#5161) (@john-bodley)
- [#5160](https://github.com/apache/incubator-superset/pull/5160) empty lists are invalid comparators (#5160) (@GabeLoins)
- [#5140](https://github.com/apache/incubator-superset/pull/5140) Improve time shift (#5140) (@betodealmeida)
- [#5135](https://github.com/apache/incubator-superset/pull/5135) [migrations] Fix time grain SQLA (#5135) (@john-bodley)
- [#5150](https://github.com/apache/incubator-superset/pull/5150) pin kombu dependency (#5150) (@timifasubaa)
- [#5136](https://github.com/apache/incubator-superset/pull/5136) [crud] Improving performance (#5136) (@john-bodley)
- [#5132](https://github.com/apache/incubator-superset/pull/5132) Optimize presto SQL Lab query performance. (#5132) (@xiaohanyu)
- [#5134](https://github.com/apache/incubator-superset/pull/5134) Bump celery to 4.1.1 (#5134) (@mistercrunch)
- [#5133](https://github.com/apache/incubator-superset/pull/5133) Pin FAB to 1.10.0 (#5133) (@mistercrunch)
### 0.25.6 (2018/06/04 15:56 +00:00)
- [#4760](https://github.com/apache/incubator-superset/pull/4760) URL shortner for dashboards (#4760) (@ttannis)
- [4776828](https://github.com/apache/incubator-superset/commit/47768284d01453968e9b2e5aef8024110b6dc33e) Adding tests for adhoc metric as timeseries_limit_metric (@michellethomas)
- [#5105](https://github.com/apache/incubator-superset/pull/5105) updating adhoc metric filtering (#5105) (@GabeLoins)
- [#5112](https://github.com/apache/incubator-superset/pull/5112) docs: Add new Athena URI scheme awsathena+rest:// (#5112) (@icy)
- [#5067](https://github.com/apache/incubator-superset/pull/5067) Allow multiple time shifts (#5067) (@betodealmeida)
- [#5111](https://github.com/apache/incubator-superset/pull/5111) adding null checks to adhoc filter popover (#5111) (@GabeLoins)
### 0.26.0rc1 (2018/06/01 00:21 +00:00)
- [#5106](https://github.com/apache/incubator-superset/pull/5106) Refactor NULL handling into method, disable for DECK.gl vizes (#5106) (@mistercrunch)
- [#5117](https://github.com/apache/incubator-superset/pull/5117) Fixing time table viz for adhoc metrics (#5117) (@michellethomas)
- [6f05b48](https://github.com/apache/incubator-superset/commit/6f05b48385d80bc6adca3e0aa3b545d34243acfa) Adding the MetricsControl to the timeseries_limit_metric field (@michellethomas)
- [#5107](https://github.com/apache/incubator-superset/pull/5107) [bugfix] deck.gl on druid always shows animation (#5107) (@mistercrunch)
- [#5110](https://github.com/apache/incubator-superset/pull/5110) fixing LIKE constant name (#5110) (@GabeLoins)
- [#5023](https://github.com/apache/incubator-superset/pull/5023) Merge pull request #5023 from timifasubaa/fix_sqllab_commit (@timifasubaa)
- [#5084](https://github.com/apache/incubator-superset/pull/5084) Override time grain in annotations (#5084) (@betodealmeida)
- [#5109](https://github.com/apache/incubator-superset/pull/5109) Merge pull request #5109 from cxmcc/patch-1 (@cxmcc)
- [21967f4](https://github.com/apache/incubator-superset/commit/21967f40e720cfcc7d5cbe33cf5504e90c21b412) Add Lime to Superset user list. (@cxmcc)
- [a9d7faf](https://github.com/apache/incubator-superset/commit/a9d7fafd9f2dca7c569effa477e3ff3240d3032e) add tests (@timifasubaa)
- [#5098](https://github.com/apache/incubator-superset/pull/5098) Bump dep on pydruid to 0.4.3 (#5098) (@mistercrunch)
- [#5086](https://github.com/apache/incubator-superset/pull/5086) [get_df] Adding support for multi-statement SQL (#5086) (@john-bodley)
- [#5094](https://github.com/apache/incubator-superset/pull/5094) add CnOvit to Superset users list (#5094) (@xieshaohu)
- [#5083](https://github.com/apache/incubator-superset/pull/5083) Add more time grains (#5083) (@betodealmeida)
- [#4428](https://github.com/apache/incubator-superset/pull/4428) Proper error handling in Hive Queries (#4428) (@maver1ck)
- [#5093](https://github.com/apache/incubator-superset/pull/5093) Fix python2 str() in visualization (#5093) (@zjj)
- [d38315a](https://github.com/apache/incubator-superset/commit/d38315a307f7b3c2a41c63b7f654fae90183c03e) reuse_regex_logic (@timifasubaa)
- [1aced9b](https://github.com/apache/incubator-superset/commit/1aced9b56207fccc839afb5c32f9ee76aa0a6b47) force limit only when there is no existing limit (@timifasubaa)
- [#5080](https://github.com/apache/incubator-superset/pull/5080) [bugfix] fix visualization with adhocMetric (#5080) (@zhaoyongjie)
- [#5068](https://github.com/apache/incubator-superset/pull/5068) Add 24 hours refresh for dashboard (#5068) (@aok1425)
- [#5000](https://github.com/apache/incubator-superset/pull/5000) Use a dummy version number on master (#5000) (@mistercrunch)
- [#5078](https://github.com/apache/incubator-superset/pull/5078) Revert "[get_df] Adding support for multi-statement SQL" (#5078) (@john-bodley)
- [#5057](https://github.com/apache/incubator-superset/pull/5057) Translate string to array for multi fields in getControlsState (#5057) (@michellethomas)
- [#5065](https://github.com/apache/incubator-superset/pull/5065) Fix time shift color assignements (#5065) (@mistercrunch)
- [#5062](https://github.com/apache/incubator-superset/pull/5062) [markup] Enable allow-forms (#5062) (@john-bodley)
- [#5056](https://github.com/apache/incubator-superset/pull/5056) integrating dashboard filters with adhoc filters (#5056) (@GabeLoins)
- [#5060](https://github.com/apache/incubator-superset/pull/5060) [get_df] Adding support for multi-statement SQL (#5060) (@john-bodley)
- [#5051](https://github.com/apache/incubator-superset/pull/5051) [Dashboard] Allow Superset Alpha, Gamma users to save dashboard as a copy (#5051) (@graceguo-supercat)
- [#5021](https://github.com/apache/incubator-superset/pull/5021) Allow MetricsControl to aggregate on a column with an expression (#5021) (@michellethomas)
- [#5025](https://github.com/apache/incubator-superset/pull/5025) fix metrics type error in pivot table viz (#5025) (@gangh)
- [#5008](https://github.com/apache/incubator-superset/pull/5008) Rename "slice" to "chart" and update translations (#5008) (@betodealmeida)
- [#4819](https://github.com/apache/incubator-superset/pull/4819) Visualization for multiple line charts (#4819) (@betodealmeida)
- [#5032](https://github.com/apache/incubator-superset/pull/5032) expanding simple tab (#5032) (@GabeLoins)
- [#5038](https://github.com/apache/incubator-superset/pull/5038) forcing ace editor to refresh when it is shown (#5038) (@GabeLoins)
- [#5027](https://github.com/apache/incubator-superset/pull/5027) Add missing dep on contextlib2 (#5027) (@mistercrunch)
- [#5030](https://github.com/apache/incubator-superset/pull/5030) treating floats like doubles for druid versions lower than 11.0.0 (#5030) (@GabeLoins)
- [#5026](https://github.com/apache/incubator-superset/pull/5026) [bugfix] Fix ZeroDivisionError and get metrics label with percent metrics (#5026) (@zhaoyongjie)
- [#5019](https://github.com/apache/incubator-superset/pull/5019) Merge pull request #5019 from timifasubaa/fix_error_message_for_missing_datasource (@timifasubaa)
- [63115fb](https://github.com/apache/incubator-superset/commit/63115fbb879a2b67e2a701f376364c52dc49a7c9) nit (@timifasubaa)
- [f52f7aa](https://github.com/apache/incubator-superset/commit/f52f7aa7cfb9898e898ba77a07073c53627fee85) raise exception early (@timifasubaa)
### 0.25.5 (2018/05/17 19:45 +00:00)
- [#5022](https://github.com/apache/incubator-superset/pull/5022) Merge pull request #5022 from mistercrunch/flask_sub_1 (@mistercrunch)
- [2ba929a](https://github.com/apache/incubator-superset/commit/2ba929ac9e1d9e6ce7120e021e3f62ba769f8f6e) Fix flask 1.0.0 (@mistercrunch)
### 0.25.4 (2018/05/16 23:31 +00:00)
- [#5020](https://github.com/apache/incubator-superset/pull/5020) Make port number optional in superset for druid (#5020) (@amalakar)
- [cf374ef](https://github.com/apache/incubator-superset/commit/cf374efb3f8b347e912ef2174492994152fc7ddb) fix missing datasource error message (@timifasubaa)
### 0.25.3 (2018/05/16 18:25 +00:00)
- [#5007](https://github.com/apache/incubator-superset/pull/5007) Fix EncryptedType error (#5007) (@mistercrunch)
- [#5012](https://github.com/apache/incubator-superset/pull/5012) Fix AdhocFilterControl for single metric options (#5012) (@michellethomas)
- [#4914](https://github.com/apache/incubator-superset/pull/4914) Make MetricsControl the standard across visualizations (#4914) (@mistercrunch)
- [#4947](https://github.com/apache/incubator-superset/pull/4947) [sql lab] a better approach at limiting queries (#4947) (@mistercrunch)
- [#4965](https://github.com/apache/incubator-superset/pull/4965) Update Apache Kylin dbengine with supported week/quarter grains (#4965) (@zhaoyongjie)
- [#4992](https://github.com/apache/incubator-superset/pull/4992) cleaning up the table fab view since we hide these autogenerated metrics anyway (#4992) (@GabeLoins)
- [#4994](https://github.com/apache/incubator-superset/pull/4994) Force lowercase column names for Snowflake and Oracle (#4994) (@villebro)
- [#4991](https://github.com/apache/incubator-superset/pull/4991) Merge pull request #4991 from michellethomas/fix_filter_blank_custom_sql (@michellethomas)
### 0.25.1 (2018/05/14 16:07 +00:00)
- [#4959](https://github.com/apache/incubator-superset/pull/4959) [deps] force flask 1.0.0 (#4959) (@mistercrunch)
- [ad4912d](https://github.com/apache/incubator-superset/commit/ad4912d6012849eb900ac74fe05d1d3e368883c9) Allowing sqlExpression to be blank (@michellethomas)
- [#4990](https://github.com/apache/incubator-superset/pull/4990) expanding regex for automated columns (#4990) (@GabeLoins)
- [#4977](https://github.com/apache/incubator-superset/pull/4977) Merge pull request #4977 from timifasubaa/bump_pyhive_version (@timifasubaa)
- [6720255](https://github.com/apache/incubator-superset/commit/67202558681884e7a1a1f1ea2b09c629c347a320) bump pyhive version (@timifasubaa)
- [#4909](https://github.com/apache/incubator-superset/pull/4909) [Explore] Adding Adhoc Filters (#4909) (@GabeLoins)
- [#4927](https://github.com/apache/incubator-superset/pull/4927) [sql lab] Use context manager for sqllab sessions (#4927) (@grafke)
- [#4971](https://github.com/apache/incubator-superset/pull/4971) Fix templating in sqla datasource (#4971) (@villebro)
- [#4972](https://github.com/apache/incubator-superset/pull/4972) superset/import_dashboards.html: Update title, clean up html (#4972) (@sodevious)
- [#4943](https://github.com/apache/incubator-superset/pull/4943) [bugfix] handling UTF8 in Druid dimensions (#4943) (@mistercrunch)
- [#4740](https://github.com/apache/incubator-superset/pull/4740) Add extraction function support for Druid queries (#4740) (@jasnovak)
- [#4948](https://github.com/apache/incubator-superset/pull/4948) CHANGELOG for 0.25.0 (#4948) (@mistercrunch)
- [#4954](https://github.com/apache/incubator-superset/pull/4954) add 30 minutes support under time granularity (#4954) (@liyuance)
- [#4950](https://github.com/apache/incubator-superset/pull/4950) Support hours in relative time range selection (#4950) (@liyuance)
- [#4944](https://github.com/apache/incubator-superset/pull/4944) Move from deprecated flask-cache to flask-caching (#4944) (@mistercrunch)
- [#4946](https://github.com/apache/incubator-superset/pull/4946) Fix naming for geojson (#4946) (@hughhhh)
### 0.25.0 (2018/05/08 05:20 +00:00)
- [#4942](https://github.com/apache/incubator-superset/pull/4942) [docs] add entry for Hive in installation.rst (#4942) (@mistercrunch)
- [#4928](https://github.com/apache/incubator-superset/pull/4928) [sql lab] handle query stop race condition (#4928) (@mistercrunch)
- [#4930](https://github.com/apache/incubator-superset/pull/4930) Update installation.rst (#4930) (@vihar)
- [#4833](https://github.com/apache/incubator-superset/pull/4833) Merge pull request #4833 from timifasubaa/help_sqllab_forget_the_past (@timifasubaa)
- [ab958c6](https://github.com/apache/incubator-superset/commit/ab958c67e6b7fde14e3d79c535045ca87fc5b732) make queries older than 6 hours timeout (@timifasubaa)
- [#4939](https://github.com/apache/incubator-superset/pull/4939) Add Portugal to country_map visualization (#4939) (@joaomg)
- [#4938](https://github.com/apache/incubator-superset/pull/4938) add Airboxlab to Superset users list (#4938) (@antoine-galataud)
- [#4940](https://github.com/apache/incubator-superset/pull/4940) Add Windsor.ai to the list of organizations (#4940) (@octaviancorlade)
- [#4899](https://github.com/apache/incubator-superset/pull/4899) rm-slices (#4899) (@hughhhh)
- [#4887](https://github.com/apache/incubator-superset/pull/4887) [druid] Updating Druid refresh metadata tests (#4887) (@john-bodley)
- [#4900](https://github.com/apache/incubator-superset/pull/4900) Hide restricted ui elements, remove <br> from error message (#4900) (@jasnovak)
- [#4923](https://github.com/apache/incubator-superset/pull/4923) Install superset in Kubernetes with helm chart (#4923) (@cychiang)
- [#4925](https://github.com/apache/incubator-superset/pull/4925) Support Apache Kylin in EngineSpec (#4925) (@zhaoyongjie)
- [#4921](https://github.com/apache/incubator-superset/pull/4921) [bufix] filtered column was removed (#4921) (@mistercrunch)
- [#4917](https://github.com/apache/incubator-superset/pull/4917) Add doc entry for BigQuery support (#4917) (@mistercrunch)
- [#4918](https://github.com/apache/incubator-superset/pull/4918) Fix typos from linting (#4918) (@mistercrunch)
- [#4911](https://github.com/apache/incubator-superset/pull/4911) Fix for week_start_sunday and week_ending_saturday (#4911) (@betodealmeida)
- [#4908](https://github.com/apache/incubator-superset/pull/4908) Replace NaN/Infinity with null (#4908) (@betodealmeida)
- [#4913](https://github.com/apache/incubator-superset/pull/4913) Fix country_map visualization URL (#4913) (@mistercrunch)
- [#4883](https://github.com/apache/incubator-superset/pull/4883) Add note about 0.25.0 upgrade in UPDATING.md (#4883) (@mistercrunch)
- [#4897](https://github.com/apache/incubator-superset/pull/4897) Heatmap improvements (#4897) (@mistercrunch)
- [#4906](https://github.com/apache/incubator-superset/pull/4906) requirements: bump gunicorn to 19.8.0 (#4906) (@xrmx)
- [#4907](https://github.com/apache/incubator-superset/pull/4907) translations: rename pt_BR gettext files (#4907) (@xrmx)
- [#4884](https://github.com/apache/incubator-superset/pull/4884) [pylint] prepping for enabling pylint for non-errors (#4884) (@john-bodley)
- [#4901](https://github.com/apache/incubator-superset/pull/4901) Fix 'Uncaught TypeError: pe.clamp is not a function' (#4901) (@mistercrunch)
- [#4896](https://github.com/apache/incubator-superset/pull/4896) [sql lab] allow stoping 'pending' queries (#4896) (@mistercrunch)
- [#4886](https://github.com/apache/incubator-superset/pull/4886) remove hard code http scheme of short url #4656 (#4886) (@ripoul)
- [#4891](https://github.com/apache/incubator-superset/pull/4891) Allow limiting rows on Pivot Table (#4891) (@mistercrunch)
- [#4890](https://github.com/apache/incubator-superset/pull/4890) [bugfix] temporal columns with expression fail (#4890) (@mistercrunch)
- [#4882](https://github.com/apache/incubator-superset/pull/4882) Implement Snowflake engine with supported time grains (#4882) (@villebro)
- [#4841](https://github.com/apache/incubator-superset/pull/4841) Move a few JS files (#4841) (@mistercrunch)
- [#4872](https://github.com/apache/incubator-superset/pull/4872) Remove spurious "has" from README (#4872) (@davidthewatson)
- [#4869](https://github.com/apache/incubator-superset/pull/4869) remove DISTINCT ON statement (#4869) (@stillmatic)
- [#4866](https://github.com/apache/incubator-superset/pull/4866) [axis formatting] Override the valueformat to be percentage when contribution is selected (#4866) (@conglei)
- [#4836](https://github.com/apache/incubator-superset/pull/4836) Refactoring on exploreReducer.js (#4836) (@hughhhh)
- [#4856](https://github.com/apache/incubator-superset/pull/4856) Fix 'pip install .' (#4856) (@mistercrunch)
- [#4842](https://github.com/apache/incubator-superset/pull/4842) Safely passing data to d3.html (#4842) (@michellethomas)
- [#4867](https://github.com/apache/incubator-superset/pull/4867) Add Astronomer to list of organizations using Apache Superset (#4867) (@ryw)
- [#4843](https://github.com/apache/incubator-superset/pull/4843) [formats] add better defaults for time + number formatting (#4843) (@williaster)
- [#4853](https://github.com/apache/incubator-superset/pull/4853) [sql] Using read_sql_query instead of read_sql (#4853) (@john-bodley)
- [#4854](https://github.com/apache/incubator-superset/pull/4854) correct config language key to pt_BR (#4854) (@pld)
- [#4850](https://github.com/apache/incubator-superset/pull/4850) Remove obsolete TODO.md (#4850) (@mistercrunch)
- [#4844](https://github.com/apache/incubator-superset/pull/4844) [docs] minor file name and format fix for the setup document (#4844) (@sekikn)
- [#4821](https://github.com/apache/incubator-superset/pull/4821) Fix time granularity-related issues (#4821) (@mistercrunch)
- [#4829](https://github.com/apache/incubator-superset/pull/4829) ensure directory exists before saving csv file (#4829) (@timifasubaa)
- [e47d8a5](https://github.com/apache/incubator-superset/commit/e47d8a59a4773f29e62d9b33d7ad6ad2b343abdd) help sqllab forget the past (@timifasubaa)
- [#4651](https://github.com/apache/incubator-superset/pull/4651) [explore] proper filtering of NULLs and '' (#4651) (@mistercrunch)
- [#4835](https://github.com/apache/incubator-superset/pull/4835) [setup] Dropping 3.4 and adding 3.6 (#4835) (@john-bodley)
- [#4820](https://github.com/apache/incubator-superset/pull/4820) Moving some JS folders (#4820) (@mistercrunch)
- [#4828](https://github.com/apache/incubator-superset/pull/4828) [travis] Fixing environments (#4828) (@john-bodley)
- [#4831](https://github.com/apache/incubator-superset/pull/4831) db_engine_specs: use correct sqlite week time grain (#4831) (@xrmx)
- [#4825](https://github.com/apache/incubator-superset/pull/4825) Update README with fresher screenshots (#4825) (@mistercrunch)
- [#4736](https://github.com/apache/incubator-superset/pull/4736) [Explore] Adding custom expressions to adhoc metrics (#4736) (@GabeLoins)
- [#4817](https://github.com/apache/incubator-superset/pull/4817) [docs] many improvements to the documentation / cleanup (#4817) (@mistercrunch)
- [#4823](https://github.com/apache/incubator-superset/pull/4823) docs: use proper dialect for redshift (#4823) (@xrmx)
- [#4702](https://github.com/apache/incubator-superset/pull/4702) RFC: add logger that logs into browser console (#4702) (@betodealmeida)
- [#4798](https://github.com/apache/incubator-superset/pull/4798) [DeckGL] Added fixtures and Deck test (#4798) (@hughhhh)
- [#4800](https://github.com/apache/incubator-superset/pull/4800) Improve the calendar heatmap (#4800) (@mistercrunch)
- [#4746](https://github.com/apache/incubator-superset/pull/4746) Filtering out SQLLab views out of table list view by default (#4746) (@mistercrunch)
- [#4815](https://github.com/apache/incubator-superset/pull/4815) [migrations] Fixing issue #4810 (#4815) (@john-bodley)
- [#4807](https://github.com/apache/incubator-superset/pull/4807) Make the bottom margin a bit taller (#4807) (@mistercrunch)
- [#4801](https://github.com/apache/incubator-superset/pull/4801) [bugfix] dedup groupby columns in Deck visualizations (#4801) (@mistercrunch)
- [#4803](https://github.com/apache/incubator-superset/pull/4803) [explore] set working default for MetricsControl (#4803) (@mistercrunch)
- [#4806](https://github.com/apache/incubator-superset/pull/4806) [tests] cleaning up test configuration (#4806) (@john-bodley)
- [#4659](https://github.com/apache/incubator-superset/pull/4659) Adding tests for the time table viz (#4659) (@michellethomas)
- [#3658](https://github.com/apache/incubator-superset/pull/3658) BugFix(#3658) (#4133) (@hidetoshiito)
- [#4804](https://github.com/apache/incubator-superset/pull/4804) call next() the right way (#4804) (@timifasubaa)
- [#4808](https://github.com/apache/incubator-superset/pull/4808) filter recently viewed to just have explore and dashboard types (#4808) (@hughhhh)
- [#4525](https://github.com/apache/incubator-superset/pull/4525) adding option for multiple metrics, group by, opacity, legends (#4525) (@ArielStv)
- [#4587](https://github.com/apache/incubator-superset/pull/4587) [logs] Dropping dt column (#4587) (@john-bodley)
- [#4802](https://github.com/apache/incubator-superset/pull/4802) [homepage] Fix Favorites chart list (#4802) (@graceguo-supercat)
- [#4552](https://github.com/apache/incubator-superset/pull/4552) [travis/tox] Restructuring configuration (#4552) (@john-bodley)
- [#4799](https://github.com/apache/incubator-superset/pull/4799) [bugfix] when num_period_compare is not set (#4799) (@mistercrunch)
- [#4756](https://github.com/apache/incubator-superset/pull/4756) Improve xAxis ticks, thinner bottom margin (#4756) (@mistercrunch)
- [#4792](https://github.com/apache/incubator-superset/pull/4792) Add Ascendica Development in organizations list who use Superset (#4792) (@davidhassan)
- [#4774](https://github.com/apache/incubator-superset/pull/4774) [explore] forcing .1% number format when using 'Period Ratio' (#4774) (@mistercrunch)
- [#4647](https://github.com/apache/incubator-superset/pull/4647) Add play slider to screengrid (#4647) (@betodealmeida)
- [#4781](https://github.com/apache/incubator-superset/pull/4781) Rename UPDATING.MD to UPDATING.md (#4781) (@john-bodley)
- [#4765](https://github.com/apache/incubator-superset/pull/4765) [line] fix verbose names in time shift (#4765) (@mistercrunch)
- [#4777](https://github.com/apache/incubator-superset/pull/4777) [doc] module header for controls.jsx and visTypes.jsx (#4777) (@mistercrunch)
- [#4772](https://github.com/apache/incubator-superset/pull/4772) [dashboard] open in edit mode when adding a chart (#4772) (@mistercrunch)
- [#4768](https://github.com/apache/incubator-superset/pull/4768) [Bug fix] Resolving key conflicts in Timeseries Annotation Layer when key is a string (#4768) (@EvelynTurner)
- [#4767](https://github.com/apache/incubator-superset/pull/4767) Improve controls layout for Table visualization (#4767) (@mistercrunch)
- [#4755](https://github.com/apache/incubator-superset/pull/4755) Pass granularity from backend to frontend as ISO duration (#4755) (@betodealmeida)
- [#4773](https://github.com/apache/incubator-superset/pull/4773) Fix brush with annotations (#4773) (@betodealmeida)
- [#4778](https://github.com/apache/incubator-superset/pull/4778) Add notes to contrib file about testing and code coverage (#4778) (@ttannis)
- [#4766](https://github.com/apache/incubator-superset/pull/4766) [explore] set control default for *showminmax = false (#4766) (@mistercrunch)
- [#4673](https://github.com/apache/incubator-superset/pull/4673) Add context to templates / respect slice timeout (#4673) (@daoready)
- [#4761](https://github.com/apache/incubator-superset/pull/4761) [druid] Excluding refreshing verbose name (#4761) (@john-bodley)
- [#4754](https://github.com/apache/incubator-superset/pull/4754) [deck_multi] fixing issues with deck_multi (#4754) (@mistercrunch)
- [#4741](https://github.com/apache/incubator-superset/pull/4741) Set longer CSRF token duration (one week) (#4741) (@mistercrunch)
- [#4742](https://github.com/apache/incubator-superset/pull/4742) [sql lab] preserve schema through visualize flow (#4742) (@mistercrunch)
- [#4005](https://github.com/apache/incubator-superset/pull/4005) [BUGFIX]: JavaScripts max int is 2^53 - 1, longs are bigger (#4005) (@fabianmenges)
- [#4728](https://github.com/apache/incubator-superset/pull/4728) [sql_lab]Disabled run query button if sql query editor is empty (#4728) (@lprashant-94)
- [#4726](https://github.com/apache/incubator-superset/pull/4726) [bugfix] convert metrics to numeric in dataframe (#4726) (@mistercrunch)
- [#4648](https://github.com/apache/incubator-superset/pull/4648) Pass timezone to Druid Query granularity (#4648) (@ktong)
- [#4646](https://github.com/apache/incubator-superset/pull/4646) [BugFix] Allowing limit ordering by post-aggregation metrics (#4646) (@jeffreythewang)
- [#4603](https://github.com/apache/incubator-superset/pull/4603) [flask-appbuilder] Bumping version to 1.10.0 (#4603) (@john-bodley)
- [#4730](https://github.com/apache/incubator-superset/pull/4730) Fix deep equality logic (#4730) (@mistercrunch)
- [#4654](https://github.com/apache/incubator-superset/pull/4654) Expose metrics to JS (#4654) (@betodealmeida)
- [#4718](https://github.com/apache/incubator-superset/pull/4718) including auto generated avg metrics in druid (#4718) (@GabeLoins)
- [#4738](https://github.com/apache/incubator-superset/pull/4738) easier tab closing in sqllab (#4738) (@GabeLoins)
- [#4729](https://github.com/apache/incubator-superset/pull/4729) [explore] don't prompt to 'Run Query' on viewport change (#4729) (@mistercrunch)
- [#4720](https://github.com/apache/incubator-superset/pull/4720) Add '.1%' to number format options (#4720) (@mistercrunch)
- [#4717](https://github.com/apache/incubator-superset/pull/4717) [sqllab] fix data grid's instant search function (#4717) (@mistercrunch)
- [#4451](https://github.com/apache/incubator-superset/pull/4451) [cli] Deprecating gunicorn/flower dependencies (#4451) (@john-bodley)
- [#4689](https://github.com/apache/incubator-superset/pull/4689) Remove redundant has_access definition in superset (#4689) (@timifasubaa)
- [#4669](https://github.com/apache/incubator-superset/pull/4669) [sqllab] Using app context for Celery task (#4669) (@john-bodley)
- [#4693](https://github.com/apache/incubator-superset/pull/4693) Use 3 letters month prefix in default date format (#4693) (@mistercrunch)
- [#4719](https://github.com/apache/incubator-superset/pull/4719) [sql lab] ctrl-r hotkey should run latest SQL (#4719) (@mistercrunch)
- [#4714](https://github.com/apache/incubator-superset/pull/4714) Add missing perms to sql_lab role (#4714) (@mistercrunch)
- [#4709](https://github.com/apache/incubator-superset/pull/4709) Remove trailing '/' from Mailing list link in README file (#4709) (@Alagappan)
- [#4663](https://github.com/apache/incubator-superset/pull/4663) [Explore] Streamlined metric definitions for SQLA and Druid (#4663) (@GabeLoins)
- [#4703](https://github.com/apache/incubator-superset/pull/4703) Rename no_reload (#4703) (@betodealmeida)
- [#4700](https://github.com/apache/incubator-superset/pull/4700) Fixing label issue when columnType is null (#4700) (@michellethomas)
- [#4687](https://github.com/apache/incubator-superset/pull/4687) i18n(es_es) (#4687) (@joebordes)
- [#4565](https://github.com/apache/incubator-superset/pull/4565) [security] Refactor security code into SupersetSecurityManager (#4565) (@timifasubaa)
- [#4680](https://github.com/apache/incubator-superset/pull/4680) Hotkeys in SQL Lab (#4680) (@mistercrunch)
- [#4697](https://github.com/apache/incubator-superset/pull/4697) Docs on how to package a release + CHANGELOG for 0.24.0 (#4697) (@mistercrunch)
### 0.24.0 (2018/03/27 06:50 +00:00)
- [#4655](https://github.com/apache/incubator-superset/pull/4655) [druid] Updating refresh logic (#4655) (@john-bodley)
- [#4683](https://github.com/apache/incubator-superset/pull/4683) Fix bug with sorting columns in group by using time shift (#4683) (@michellethomas)

View File

@@ -1,22 +1,84 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Code of Conduct
We follow the
[Apache Software Foundation's Code of Conduct](https://www.apache.org/foundation/policies/conduct.html)
## 1. Purpose
A primary goal of Apache Superset is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.
We invite all those who participate in Apache Superset to help us create safe and positive experiences for everyone.
## 2. Open Source Citizenship
A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.
Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.
## 3. Expected Behavior
The following behaviors are expected and requested of all community members:
* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
* Exercise consideration and respect in your speech and actions.
* Attempt collaboration before conflict.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
## 4. Unacceptable Behavior
The following behaviors are considered harassment and are unacceptable within our community:
* Violence, threats of violence or violent language directed against another person.
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
* Posting or displaying sexually explicit or violent material.
* Posting or threatening to post other peoples personally identifying information ("doxing").
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
* Inappropriate photography or recording.
* Inappropriate physical contact. You should have someones consent before touching them.
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
* Deliberate intimidation, stalking or following (online or in person).
* Advocating for, or encouraging, any of the above behavior.
* Sustained disruption of community events, including talks and presentations.
## 5. Consequences of Unacceptable Behavior
Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.
Anyone asked to stop unacceptable behavior is expected to comply immediately.
If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
## 6. Reporting Guidelines
If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. dev@superset.incubator.apache.org .
Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
## 7. Addressing Grievances
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Apache with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
## 8. Scope
We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venuesonline and in-personas well as in all one-on-one communications pertaining to community business.
This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.
## 9. Contact info
dev@superset.incubator.apache.org
## 10. License and attribution
This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)

View File

@@ -1,210 +1,84 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Contributing
Contributions are welcome and are greatly appreciated! Every
little bit helps, and credit will always be given.
## Table of Contents
- [Types of Contributions](#types-of-contributions)
- [Report Bugs](#report-bugs)
- [Submit Ideas or Feature Requests](#submit-ideas-or-feature-requests)
- [Ask Questions](#ask-questions)
- [Fix Bugs](#fix-bugs)
- [Implement Features](#implement-features)
- [Improve Documentation](#improve-documentation)
- [Add Translations](#add-translations)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Protocol](#protocol)
- [Managing Issues and PRs](#managing-issues-and-prs)
- [Local development](#local-development)
- [Documentation](#documentation)
- [Flask server](#flask-server)
- [Frontend assets](#frontend-assets)
- [Testing](#testing)
- [JavaScript testing](#javascript-testing)
- [Integration testing](#integration-testing)
- [Linting](#linting)
- [Translating](#translating)
- [Enabling language selection](#enabling-language-selection)
- [Extracting new strings for translation](#extracting-new-strings-for-translation)
- [Creating a new language dictionary](#creating-a-new-language-dictionary)
- [Tips](#tips)
- [Adding a new datasource](#adding-a-new-datasource)
- [Creating a new visualization type](#creating-a-new-visualization-type)
- [Adding a DB migration](#adding-a-db-migration)
- [Merging DB migrations](#merging-db-migrations)
You can contribute in many ways:
## Types of Contributions
### Report Bug
### Report Bugs
The best way to report a bug is to file an issue on GitHub. Please include:
Report bugs through GitHub
- Your operating system name and version.
- Superset version.
- Detailed steps to reproduce the bug.
- Any details about your local setup that might be helpful in troubleshooting.
If you are reporting a bug, please include:
When posting Python stack traces, please quote them using
[Markdown blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/).
- Your operating system name and version.
- Any details about your local setup that might be helpful in
troubleshooting.
- Detailed steps to reproduce the bug.
### Submit Ideas or Feature Requests
The best way is to file an issue on GitHub:
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that this is a volunteer-driven project, and that contributions are welcome :)
For large features or major changes to codebase, please create **Superset Improvement Proposal (SIP)**. See template from [SIP-0](https://github.com/apache/incubator-superset/issues/5602)
When you post python stack traces please quote them using
[markdown blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/).
### Fix Bugs
Look through the GitHub issues. Issues tagged with `#bug` is
Look through the GitHub issues for bugs. Anything tagged with "bug" is
open to whoever wants to implement it.
### Implement Features
Look through the GitHub issues. Issues tagged with
`#feature` is open to whoever wants to implement it.
Look through the GitHub issues for features. Anything tagged with
"feature" or "starter_task" is open to whoever wants to implement it.
### Improve Documentation
### Documentation
Superset could always use better documentation,
whether as part of the official Superset docs,
in docstrings, `docs/*.rst` or even on the web as blog posts or
articles. See [Documentation](#documentation) for more details.
articles.
### Add Translations
### Submit Feedback
If you are proficient in a non-English language, you can help translate text strings from Superset's UI. You can jump in to the existing language dictionaries at `superset/translations/<language_code>/LC_MESSAGES/messages.po`, or even create a dictionary for a new language altogether. See [Translating](#translating) for more details.
The best way to send feedback is to file an issue on GitHub.
### Ask Questions
If you are proposing a feature:
There is a dedicated [`apache-superset` tag](https://stackoverflow.com/questions/tagged/apache-superset) on [StackOverflow](https://stackoverflow.com/). Please use it when asking questions.
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to
implement.
- Remember that this is a volunteer-driven project, and that
contributions are welcome :)
### Questions
There is a dedicated [tag](https://stackoverflow.com/questions/tagged/apache-superset) on [stackoverflow](https://stackoverflow.com/). Please use it when asking questions.
## Pull Request Guidelines
A philosophy we would like to strongly encourage is
Before you submit a pull request from your forked repo, check that it
meets these guidelines:
> Before creating a PR, create an issue.
1. The pull request should include tests, either as doctests,
unit tests, or both.
2. Run `tox` and resolve all errors and test failures.
3. If the pull request adds functionality, the docs should be updated
as part of the same PR. Doc string are often sufficient, make
sure to follow the sphinx compatible standards.
4. The pull request should work for Python 2.7, and ideally Python 3.4+.
``from __future__ import`` will be required in every `.py` file soon.
5. If the pull request adds a Python dependency include it in `setup.py`
denoting any specific restrictions and in `requirements.txt` pinned to a
specific version which ensures that the application build is deterministic.
6. Please rebase and resolve all conflicts before submitting.
7. Please ensure the necessary checks pass and that code coverage does not
decrease.
8. If you are asked to update your pull request with some changes there's
no need to create a new one. Push your changes to the same branch.
The purpose is to separate problem from possible solutions.
## Documentation
**Bug fixes:** If youre only fixing a small bug, its fine to submit a pull request right away but we highly recommend to file an issue detailing what youre fixing. This is helpful in case we dont accept that specific fix but want to keep track of the issue. Please keep in mind that the project maintainers reserve the rights to accept or reject incoming PRs, so it is better to separate the issue and the code to fix it from each other. In some cases, project maintainers may request you to create a separate issue from PR before proceeding.
**Refactor:** For small refactors, it can be a standalone PR itself detailing what you are refactoring and why. If there are concerns, project maintainers may request you to create a `#SIP` for the PR before proceeding.
**Feature/Large changes:** If you intend to change the public API, or make any non-trivial changes to the implementation, we requires you to file a new issue as `#SIP` (Superset Improvement Proposal). This lets us reach an agreement on your proposal before you put significant effort into it. You are welcome to submit a PR along with the SIP (sometimes necessary for demonstration), but we will not review/merge the code until the SIP is approved.
In general, small PRs are always easier to review than large PRs. The best practice is to break your work into smaller independent PRs and refer to the same issue. This will greatly reduce turnaround time.
Finally, never submit a PR that will put master branch in broken state. If the PR is part of multiple PRs to complete a large feature and cannot work on its own, you can create a feature branch and merge all related PRs into the feature branch before creating a PR from feature branch to master.
### Protocol
#### Authoring
- Fill in all sections of the PR template.
- Add prefix `[WIP]` to title if not ready for review (WIP = work-in-progress). We recommend creating a PR with `[WIP]` first and remove it once you have passed CI test and read through your code changes at least once.
- **Screenshots/GIFs:** Changes to user interface require before/after screenshots, or GIF for interactions
- Recommended capture tools ([Kap](https://getkap.co/), [LICEcap](https://www.cockos.com/licecap/), [Skitch](https://download.cnet.com/Skitch/3000-13455_4-189876.html))
- If no screenshot is provided, the committers will mark the PR with `need:screenshot` label and will not review until screenshot is provided.
- **Dependencies:** Be careful about adding new dependency and avoid unnecessary dependencies.
- For Python, include it in `setup.py` denoting any specific restrictions and in `requirements.txt` pinned to a specific version which ensures that the application build is deterministic.
- For Javascript, include new libraries in `package.json`
- **Tests:** The pull request should include tests, either as doctests, unit tests, or both. Make sure to resolve all errors and test failures. See [Testing](#testing) for how to run tests.
- **Documentation:** If the pull request adds functionality, the docs should be updated as part of the same PR. Doc string are often sufficient, make sure to follow the sphinx compatible standards.
- **CI:** Reviewers will not review the code until all CI tests are passed. Sometimes there can be flaky tests. You can close and open PR to re-run CI test. Please report if the issue persists. After the CI fix has been deployed to `master`, please rebase your PR.
- **Code coverage:** Please ensure that code coverage does not decrease.
- Remove `[WIP]` when ready for review. Please note that it may be merged soon after approved so please make sure the PR is ready to merge and do not expect more time for post-approval edits.
- If the PR was not ready for review and inactive for > 30 days, we will close it due to inactivity. The author is welcome to re-open and update.
#### Reviewing
- Use constructive tone when writing reviews.
- If there are changes required, state clearly what needs to be done before the PR can be approved.
- If you are asked to update your pull request with some changes there's no need to create a new one. Push your changes to the same branch.
- The committers reserve the right to reject any PR and in some cases may request the author to file an issue.
#### Merging
- At least one approval is required for merging a PR.
- PR is usually left open for at least 24 hours before merging.
- After the PR is merged, [close the corresponding issue(s)](https://help.github.com/articles/closing-issues-using-keywords/).
#### Post-merge Responsibility
- Project maintainers may contact the PR author if new issues are introduced by the PR.
- Project maintainers may revert your changes if a critical issue is found, such as breaking master branch CI.
## Managing Issues and PRs
To handle issues and PRs that are coming in, committers read issues/PRs and flag them with labels to categorize and help contributors spot where to take actions, as contributors usually have different expertises.
Triaging goals
- **For issues:** Categorize, screen issues, flag required actions from authors.
- **For PRs:** Categorize, flag required actions from authors. If PR is ready for review, flag required actions from reviewers.
First, add **Category labels (a.k.a. hash labels)**. Every issue/PR must have one hash label (except spam entry). Labels that begin with `#` defines issue/PR type:
| Label | for Issue | for PR |
|-------------------|-----------|--------|
| `#bug` | Bug report | Bug fix |
| `#code-quality` | Describe problem with code, architecture or productivity | Refactor, tests, tooling |
| `#feature` | New feature request | New feature implementation |
| `#refine` | Propose improvement that does not provide new features and is also not a bug fix nor refactor, such as adjust padding, refine UI style. | Implementation of improvement that does not provide new features and is also not a bug fix nor refactor, such as adjust padding, refine UI style. |
| `#doc` | Documentation | Documentation |
| `#question` | Troubleshooting: Installation, Running locally, Ask how to do something. Can be changed to `#bug` later. | N/A |
| `#SIP` | Superset Improvement Proposal | N/A |
| `#ASF` | Tasks related to Apache Software Foundation policy | Tasks related to Apache Software Foundation policy |
Then add other types of labels as appropriate.
- **Descriptive labels (a.k.a. dot labels):** These labels that begin with `.` describe the details of the issue/PR, such as `.ui`, `.js`, `.install`, `.backend`, etc. Each issue/PR can have zero or more dot labels.
- **Need labels:** These labels have pattern `need:xxx`, which describe the work required to progress, such as `need:rebase`, `need:update`, `need:screenshot`.
- **Risk labels:** These labels have pattern `risk:xxx`, which describe the potential risk on adopting the work, such as `risk:db-migration`. The intention was to better understand the impact and create awareness for PRs that need more rigorous testing.
- **Status labels:** These labels describe the status (`abandoned`, `wontfix`, `cant-reproduce`, etc.) Issue/PRs that are rejected or closed without completion should have one or more status labels.
- **Version labels:** These have the pattern `vx.x` such as `v0.28`. Version labels on issues describe the version the bug was reported on. Version labels on PR describe the first release that will include the PR.
Committers may also update title to reflect the issue/PR content if the author-provided title is not descriptive enough.
If the PR passes CI tests and does not have any `need:` labels, it is ready for review, add label `review` and/or `design-review`.
If an issue/PR has been inactive for >=30 days, it will be closed. If it does not have any status label, add `inactive`.
## Setup Local Environment for Development
First, [fork the repository on GitHub](https://help.github.com/articles/about-forks/), then clone it. You can clone the main repository directly, but you won't be able to send pull requests.
```bash
git clone git@github.com:your-username/incubator-superset.git
cd incubator-superset
```
### Documentation
The latest documentation and tutorial are available at https://superset.incubator.apache.org/.
The latest documentation and tutorial are available [here](https://superset.incubator.apache.org/).
Contributing to the official documentation is relatively easy, once you've setup
your environment and done an edit end-to-end. The docs can be found in the
@@ -215,441 +89,419 @@ If you've written Markdown before, you'll find the reStructuredText format famil
Superset uses [Sphinx](http://www.sphinx-doc.org/en/1.5.1/) to convert the rst files
in `docs/` to the final HTML output users see.
Before you start changing the docs, you'll want to
[fork the Superset project on Github](https://help.github.com/articles/fork-a-repo/).
Once that new repository has been created, clone it on your local machine:
git clone git@github.com:your_username/incubator-superset.git
At this point, you may also want to create a
[Python virtual environment](http://docs.python-guide.org/en/latest/dev/virtualenvs/)
to manage the Python packages you're about to install:
virtualenv superset-dev
source superset-dev/bin/activate
Finally, to make changes to the rst files and build the docs using Sphinx,
you'll need to install a handful of dependencies from the repo you cloned:
```bash
pip install -r docs/requirements.txt
```
cd incubator-superset
pip install -r docs/requirements.txt
To get the feel for how to edit and build the docs, let's edit a file, build
the docs and see our changes in action. First, you'll want to
[create a new branch](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)
to work on your changes:
```bash
git checkout -b changes-to-docs
```
git checkout -b changes-to-docs
Now, go ahead and edit one of the files under `docs/`, say `docs/tutorial.rst` - change
it however you want. Check out the
Now, go ahead and edit one of the files under `docs/`, say `docs/tutorial.rst`
- change it however you want. Check out the
[ReStructuredText Primer](http://docutils.sourceforge.net/docs/user/rst/quickstart.html)
for a reference on the formatting of the rst files.
Once you've made your changes, run this command to convert the docs into HTML:
Once you've made your changes, run this command from the root of the Superset
repo to convert the docs into HTML:
```bash
make html
```
python setup.py build_sphinx
You'll see a lot of output as Sphinx handles the conversion. After it's done, the
HTML Sphinx generated should be in `docs/_build/html`. Navigate there
HTML Sphinx generated should be in `docs/_build/html`. Go ahead and navigate there
and start a simple web server so we can check out the docs in a browser:
```bash
cd docs/_build/html
python -m http.server # Python2 users should use SimpleHTTPServer
```
cd docs/_build/html
python -m SimpleHTTPServer
This will start a small Python web server listening on port 8000. Point your
browser to http://localhost:8000, find the file
browser to [http://localhost:8000/](http://localhost:8000/), find the file
you edited earlier, and check out your changes!
If you've made a change you'd like to contribute to the actual docs, just commit
your code, push your new branch to Github:
```bash
git add docs/tutorial.rst
git commit -m 'Awesome new change to tutorial'
git push origin changes-to-docs
```
git add docs/tutorial.rst
git commit -m 'Awesome new change to tutorial'
git push origin changes-to-docs
Then, [open a pull request](https://help.github.com/articles/about-pull-requests/).
#### Images
If you're adding new images to the documentation, you'll notice that the images
referenced in the rst, e.g.
.. image:: _static/img/tutorial/tutorial_01_sources_database.png
aren't actually stored in that directory. Instead, you should add and commit
images (and any other static assets) to the `superset/assets/images` directory.
When the docs are deployed to https://superset.incubator.apache.org/, images
are copied from there to the `_static/img` directory, just like they're referenced
aren't actually included in that directory. _Instead_, you'll want to add and commit
images (and any other static assets) to the _superset/assets/images_ directory.
When the docs are being pushed to [Apache Superset (incubating)](https://superset.incubator.apache.org/), images
will be moved from there to the _\_static/img_ directory, just like they're referenced
in the docs.
For example, the image referenced above actually lives in `superset/assets/images/tutorial`. Since the image is moved during the documentation build process, the docs reference the image in `_static/img/tutorial` instead.
For example, the image referenced above actually lives in
#### API documentation
superset/assets/images/tutorial
Generate the API documentation with:
Since the image is moved during the documentation build process, the docs reference the
image in
```bash
pip install -r docs/requirements.txt
python setup.py build_sphinx
```
_static/img/tutorial
### Flask server
instead.
Make sure your machine meets the [OS dependencies](https://superset.incubator.apache.org/installation.html#os-dependencies) before following these steps.
## Setting up a Python development environment
```bash
# Create a virtual environemnt and activate it (recommended)
virtualenv -p python3 venv # setup a python3.6 virtualenv
source venv/bin/activate
Check the [OS dependencies](https://superset.incubator.apache.org/installation.html#os-dependencies) before follows these steps.
# Install external dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt
# Install Superset in editable (development) mode
pip install -e .
# fork the repo on GitHub and then clone it
# alternatively you may want to clone the main repo but that won't work
# so well if you are planning on sending PRs
# git clone git@github.com:apache/incubator-superset.git
# Create an admin user
fabmanager create-admin --app superset
# [optional] setup a virtual env and activate it
virtualenv env
source env/bin/activate
# Initialize the database
superset db upgrade
# install for development
pip install -r requirements.txt
pip install -e .
# Create default roles and permissions
superset init
# Create an admin user
fabmanager create-admin --app superset
# Load some data to play with
superset load_examples
# Initialize the database
superset db upgrade
# Start the Flask dev web server from inside the `superset` dir at port 8088
# Note that your page may not have css at this point.
# See instructions below how to build the front-end assets.
cd superset
FLASK_ENV=development flask run -p 8088 --with-threads --reload --debugger
```
# Create default roles and permissions
superset init
#### Logging to the browser console
# Load some data to play with
superset load_examples
This feature is only available on Python 3. When debugging your application, you can have the server logs sent directly to the browser console:
# start a dev web server
superset runserver -d
```bash
FLASK_ENV=development flask run -p 8088 --with-threads --reload --debugger --console-log
```
### Logging to the browser console
When debugging your application, you can have the server logs sent directly to the browser console:
superset runserver -d --console-log
You can log anything to the browser console, including objects:
```python
from superset import app
app.logger.error('An exception occurred!')
app.logger.info(form_data)
from superset import app
app.logger.error('An exception occurred!')
app.logger.info(form_data)
## Setting up the node / npm javascript environment
`superset/assets` contains all npm-managed, front end assets.
Flask-Appbuilder itself comes bundled with jQuery and bootstrap.
While these may be phased out over time, these packages are currently not
managed with npm.
### Node/npm versions
Make sure you are using recent versions of node and npm. No problems have been found with node>=5.10 and 4.0. > npm>=3.9.
### Using npm to generate bundled files
#### npm
First, npm must be available in your environment. If it is not you can run the following commands
(taken from [this source](https://gist.github.com/DanHerbert/9520689))
```
brew install node --without-npm
echo prefix=~/.npm-packages >> ~/.npmrc
curl -L https://www.npmjs.com/install.sh | sh
```
### Frontend Assets
Frontend assets (JavaScript, CSS, and images) must be compiled in order to properly display the web UI. The `superset/assets` directory contains all NPM-managed front end assets. Note that there are additional frontend assets bundled with Flask-Appbuilder (e.g. jQuery and bootstrap); these are not managed by NPM, and may be phased out in the future.
First, be sure you are using recent versions of NodeJS and npm. Using [nvm](https://github.com/creationix/nvm) to manage them is recommended.
#### Prerequisite
#### Installing Dependencies
Install third-party dependencies listed in `package.json`:
```bash
# From the root of the repository
cd superset/assets
# Install dependencies from `package-lock.json`
npm ci
The final step is to add `~/.npm-packages/bin` to your `PATH` so commands you install globally are usable.
Add something like this to your `.bashrc` file, then `source ~/.bashrc` to reflect the change.
```
export PATH="$HOME/.npm-packages/bin:$PATH"
```
#### Building
You can run the Webpack dev server (in a separate terminal from Flask), which runs on port 9000 and proxies non-asset requests to the Flask server on port 8088. After pointing your browser to `http://localhost:9000`, updates to asset sources will be reflected in-browser without a refresh.
#### npm packages
To install third party libraries defined in `package.json`, run the
following within the `superset/assets/` directory which will install them in a
new `node_modules/` folder within `assets/`.
```bash
# Run the dev server
npm run dev-server
# Run the dev server on a non-default port
npm run dev-server -- --port=9001
# Run the dev server proxying to a Flask server on a non-default port
npm run dev-server -- --supersetPort=8081
# from the root of the repository, move to where our JS package.json lives
cd superset/assets/
# install yarn, a replacement for `npm install` that is faster and more deterministic
npm install -g yarn
# run yarn to fetch all the dependencies
yarn
```
Alternatively you can use one of the following commands.
To parse and generate bundled files for superset, run either of the
following commands. The `dev` flag will keep the npm script running and
re-run it upon any changes within the assets directory.
```bash
# Start a watcher that recompiles your assets as you modify them (but have to manually reload your browser to see changes.)
npm run dev
```
# Copies a conf file from the frontend to the backend
npm run sync-backend
# Compile the Javascript and CSS in production/optimized mode for official releases
# Compiles the production / optimized js & css
npm run prod
# Copy a conf file from the frontend to the backend
npm run sync-backend
# Start a web server that manages and updates your assets as you modify them
npm run dev
```
#### Updating NPM packages
For every development session you will have to start a flask dev server
as well as an npm watcher
Use npm in the prescribed way, making sure that
`superset/assets/package-lock.json` is updated according to `npm`-prescribed
best practices.
#### Feature flags
Superset supports a server-wide feature flag system, which eases the incremental development of features. To add a new feature flag, simply modify `superset_config.py` with something like the following:
```
FEATURE_FLAGS = {
'SCOPED_FILTER': True,
}
```
If you want to use the same flag in the client code, also add it to the FeatureFlag TypeScript enum in `superset/assets/src/featureFlags.ts`. For example,
```
export enum FeatureFlag {
SCOPED_FILTER = 'SCOPED_FILTER',
}
superset runserver -d -p 8081
npm run dev
```
## Linting
#### Upgrading npm packages
Lint the project with:
```bash
# for python
tox -e flake8
# for javascript
cd superset/assets
npm ci
npm run lint
```
Should you add or upgrade a npm package, which involves changing `package.json`, you'll need to re-run `yarn install` and push the newly generated `yarn.lock` file so we get the reproducible build. More information at (https://yarnpkg.com/blog/2016/11/24/lockfiles-for-all/)
## Testing
### Python Testing
All python tests are carried out in [tox](http://tox.readthedocs.io/en/latest/index.html)
a standardized testing framework.
All tests are carried out in [tox](http://tox.readthedocs.io/en/latest/index.html)
a standardized testing framework mostly for Python (though we also used it for Javascript).
All python tests can be run with any of the tox [environments](http://tox.readthedocs.io/en/latest/example/basic.html#a-simple-tox-ini-default-environments), via,
```bash
tox -e <environment>
```
tox -e <environment>
For example,
i.e.,
```bash
tox -e py36
```
tox -e py27
tox -e py34
Alternatively, you can run all tests in a single file via,
```bash
tox -e <environment> -- tests/test_file.py
```
tox -e <environment> -- tests/test_file.py
or for a specific test via,
```bash
tox -e <environment> -- tests/test_file.py:TestClassName.test_method_name
```
tox -e <environment> -- tests/test_file.py:TestClassName.test_method_name
Note that the test environment uses a temporary directory for defining the
SQLite databases which will be cleared each time before the group of test
commands are invoked.
### JavaScript Testing
We use [Mocha](https://mochajs.org/), [Chai](http://chaijs.com/) and [Enzyme](http://airbnb.io/enzyme/) to test Javascript. Tests can be run with:
We use [Jest](https://jestjs.io/) and [Enzyme](http://airbnb.io/enzyme/) to test Javascript. Tests can be run with:
cd /superset/superset/assets/javascripts
npm i
npm run test
```bash
cd superset/assets
npm run test
```
## Linting
### Integration Testing
Lint the project with:
We use [Cypress](https://www.cypress.io/) for integration tests. Tests can be run by `tox -e cypress`. To open Cypress and explore tests first setup and run test server:
# for python
tox -e flake8
```bash
export SUPERSET_CONFIG=tests.superset_test_config
superset db upgrade
superset init
superset load_test_users
superset load_examples
superset runserver
```
# for javascript
tox -e eslint
Run Cypress tests:
## API documentation
```bash
cd /superset/superset/assets
npm run build
npm run cypress run
```
Generate the documentation with:
## Translating
pip install -r docs/requirements.txt
python setup.py build_sphinx
We use [Babel](http://babel.pocoo.org/en/latest/) to translate Superset. In Python files, we import the magic `_` function using:
## CSS Themes
As part of the npm build process, CSS for Superset is compiled from `Less`, a dynamic stylesheet language.
```python
from flask_babel import lazy_gettext as _
```
It's possible to customize or add your own theme to Superset, either by overriding CSS rules or preferably
by modifying the Less variables or files in `assets/stylesheets/less/`.
then wrap our translatable strings with it, e.g. `_('Translate me')`. During extraction, string literals passed to `_` will be added to the generated `.po` file for each language for later translation.
At runtime, the `_` function will return the translation of the given string for the current language, or the given string itself if no translation is available.
The `variables.less` and `bootswatch.less` files that ship with Superset are derived from
[Bootswatch](https://bootswatch.com) and thus extend Bootstrap. Modify variables in these files directly, or
swap them out entirely with the equivalent files from other Bootswatch (themes)[https://github.com/thomaspark/bootswatch.git]
In JavaScript, the technique is similar: we import `t` (simple translation), `tn` (translation containing a number).
## Translations
```javascript
import { t, tn } from '@superset-ui/translation';
```
We use [Babel](http://babel.pocoo.org/en/latest/) to translate Superset. The
key is to instrument the strings that need translation using
`from flask_babel import lazy_gettext as _`. Once this is imported in
a module, all you have to do is to `_("Wrap your strings")` using the
underscore `_` "function".
### Enabling language selection
We use `import {t, tn, TCT} from locales;` in js, JSX file, locales is in `./superset/assets/javascripts/` directory.
Add the `LANGUAGES` variable to your `superset_config.py`. Having more than one
option inside will add a language selection dropdown to the UI on the right side
of the navigation bar.
To enable changing language in your environment, you can simply add the
`LANGUAGES` parameter to your `superset_config.py`. Having more than one
options here will add a language selection dropdown on the right side of the
navigation bar.
```python
LANGUAGES = {
'en': {'flag': 'us', 'name': 'English'},
'fr': {'flag': 'fr', 'name': 'French'},
'zh': {'flag': 'cn', 'name': 'Chinese'},
}
```
LANGUAGES = {
'en': {'flag': 'us', 'name': 'English'},
'fr': {'flag': 'fr', 'name': 'French'},
'zh': {'flag': 'cn', 'name': 'Chinese'},
}
### Extracting new strings for translation
As per the [Flask AppBuilder documentation] about translation, to create a
new language dictionary, run the following command (where `es` is replaced with
the language code for your target language):
```bash
fabmanager babel-extract --target superset/translations --output superset/translations/messages.pot --config superset/translations/babel.cfg -k _ -k __ -k t -k tn -k tct
```
pybabel init -i superset/translations/messages.pot -d superset/translations -l es
Then it's a matter of running the statement below to gather all strings that
need translation
fabmanager babel-extract --target superset/translations/ --output superset/translations/messages.pot --config superset/translations/babel.cfg -k _ -k __ -k t -k tn -k tct
You can then translate the strings gathered in files located under
`superset/translation`, where there's one per language. You can use [Poedit](https://poedit.net/features)
to translate the `po` file more conveniently.
There are some [tutorials in the wiki](https://wiki.lxde.org/en/Translate_*.po_files_with_Poedit).
`superset/translation`, where there's one per language. For the translations
to take effect, they need to be compiled using this command:
For the translations to take effect:
fabmanager babel-compile --target superset/translations/
```bash
# In the case of JS translation, we need to convert the PO file into a JSON file, and we need the global download of the npm package po2json.
npm install -g po2json
fabmanager babel-compile --target superset/translations
# Convert the en PO file into a JSON file
po2json -d superset -f jed1.x superset/translations/en/LC_MESSAGES/messages.po superset/translations/en/LC_MESSAGES/messages.json
```
In the case of JS translation, we need to convert the PO file into a JSON file, and we need the global download of the npm package po2json.
We need to be compiled using this command:
If you get errors running `po2json`, you might be running the Ubuntu package with the same
name, rather than the NodeJS package (they have a different format for the arguments). If
there is a conflict, you may need to update your `PATH` environment variable or fully qualify
the executable path (e.g. `/usr/local/bin/po2json` instead of `po2json`).
If you get a lot of `[null,***]` in `messages.json`, just delete all the `null,`.
For example, `"year":["年"]` is correct while `"year":[null,"年"]`is incorrect.
npm install po2json -g
### Creating a new language dictionary
Execute this command to convert the en PO file into a json file:
To create a dictionary for a new language, run the following, where `LANGUAGE_CODE` is replaced with
the language code for your target language, e.g. `es` (see [Flask AppBuilder i18n documentation](https://flask-appbuilder.readthedocs.io/en/latest/i18n.html) for more details):
po2json -d superset -f jed1.x superset/translations/en/LC_MESSAGES/messages.po superset/translations/en/LC_MESSAGES/messages.json
```bash
pip install -r superset/translations/requirements.txt
pybabel init -i superset/translations/messages.pot -d superset/translations -l LANGUAGE_CODE
```
If you get errors running `po2json`, you might be running the ubuntu package with the same
name rather than the nodejs package (they have a different format for the arguments). You
need to be running the nodejs version, and so if there is a conflict you may need to point
directly at `/usr/local/bin/po2json` rather than just `po2json`.
Then, [extract strings for the new language](#extracting-new-strings-for-translation).
## Tips
### Adding a new datasource
## Adding new datasources
1. Create Models and Views for the datasource, add them under superset folder, like a new my_models.py
with models for cluster, datasources, columns and metrics and my_views.py with clustermodelview
and datasourcemodelview.
1. Create DB migration files for the new models
2. Create db migration files for the new models
1. Specify this variable to add the datasource model and from which module it is from in config.py:
3. Specify this variable to add the datasource model and from which module it is from in config.py:
For example:
```python
ADDITIONAL_MODULE_DS_MAP = {'superset.my_models': ['MyDatasource', 'MyOtherDatasource']}
```
`ADDITIONAL_MODULE_DS_MAP = {'superset.my_models': ['MyDatasource', 'MyOtherDatasource']}`
This means it'll register MyDatasource and MyOtherDatasource in superset.my_models module in the source registry.
### Creating a new visualization type
## Creating a new visualization type
Here's an example as a Github PR with comments that describe what the
different sections of the code do:
https://github.com/apache/incubator-superset/pull/3013
### Adding a DB migration
## Refresh documentation website
1. Alter the model you want to change. This example will add a `Column` Annotations model.
[Example commit](https://github.com/apache/incubator-superset/commit/6c25f549384d7c2fc288451222e50493a7b14104)
1. Generate the migration file
```bash
superset db migrate -m 'add_metadata_column_to_annotation_model.py'
```
This will generate a file in `migrations/version/{SHA}_this_will_be_in_the_migration_filename.py`.
[Example commit](https://github.com/apache/incubator-superset/commit/d3e83b0fd572c9d6c1297543d415a332858e262)
1. Upgrade the DB
```bash
superset db upgrade
```
The output should look like this:
```
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 1a1d627ebd8e -> 40a0a483dd12, add_metadata_column_to_annotation_model.py
```
1. Add column to view
Since there is a new column, we need to add it to the AppBuilder Model view.
[Example commit](https://github.com/apache/incubator-superset/pull/5745/commits/6220966e2a0a0cf3e6d87925491f8920fe8a3458)
### Merging DB migrations
When two DB migrations collide, you'll get an error message like this one:
Every once in a while we want to compile the documentation and publish it.
Here's how to do it.
```
alembic.util.exc.CommandError: Multiple head revisions are present for
given argument 'head'; please specify a specific target
revision, '<branchname>@head' to narrow to a specific head,
or 'heads' for all heads`
# install doc dependencies
pip install -r docs/requirements.txt
# build the docs
python setup.py build_sphinx
# copy html files to temp folder
cp -r docs/_build/html/ /tmp/tmp_superset_docs/
# clone the docs repo
cd ~/
git clone https://git-wip-us.apache.org/repos/asf/incubator-superset-site.git
# copy
cp -r /tmp/tmp_superset_docs/ ~/incubator-superset-site.git/
# commit and push to `asf-site` branch
cd ~/incubator-superset-site.git/
git checkout asf-site
git add .
git commit -a -m "New doc version"
git push origin master
```
To fix it:
## Publishing a Pypi release
1. Get the migration heads
We create a branch that goes along each minor release `0.24`
and micro releases get corresponding tags as in `0.24.0`. Git history should
never be altered in release branches.
Bug fixes and security-related patches get cherry-picked
(usually from master) as in `git cherry-pick -x {SHA}`.
```bash
superset db heads
```
Following a set of cherries being picked, a release can be pushed to
Pypi as follows:
This should list two or more migration hashes.
```
# branching off of master
git checkout -b 0.25
1. Create a new merge migration
# cherry-picking a SHA
git cherry-pick -x f9d85bd2e1fd9bc233d19c76bed09467522b968a
# repeat with other SHAs, don't forget the -x
```bash
superset db merge {HASH1} {HASH2}
```
# source of thruth for release numbers live in package.json
vi superset/assets/package.json
# hard code release in file, commit to the release branch
git commit -a -m "0.25.0"
1. Upgrade the DB to the new checkpoint
# create the release tag in the release branch
git tag 0.25.0
git push apache 0.25 --tags
```bash
superset db upgrade
```
# check travis to confirm the build succeeded as
# you shouldn't assume that a clean cherry will be clean
# when landing on a new sundae
# compile the JS, and push to pypi
# to run this part you'll need a pypi account and rights on the
# superset package. Committers that want to ship releases
# should have this access.
# You'll also need a `.pypirc` as specified here:
# http://peterdowns.com/posts/first-time-with-pypi.html
./pypi_push.sh
# publish an update to the CHANGELOG.md for the right version range
# looking the latest CHANGELOG entry for the second argument
./gen_changelog.sh 0.22.1 0.25.0
# this will overwrite the CHANGELOG.md with only the version range
# so you'll want to copy paste that on top of the previous CHANGELOG.md
# open a PR against `master`
```
In the future we'll start publishing release candidates for minor releases
only, but typically not for micro release.
The process will be similar to the process described above, expect the
tags will be formated `0.25.0rc1`, `0.25.0rc2`, ..., until consensus
is reached.
We should also have a Github PR label process to target the proper
release, and tooling helping keeping track of all the cherries and
target versions.
For Apache releases, the process will be a bit heavier and should get
documented here. There will be extra steps for signing the binaries,
with a PGP key and providing MD5, Apache voting, as well as
publishing to Apache's SVN repository. View the ASF docs for more
information.

View File

@@ -1,26 +1,8 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
Make sure these boxes are checked before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version of superset.
- [ ] I have checked the issue tracker for the same issue and I haven't found one similar.
- [ ] I have checked the superset logs for python stacktraces and included it here as text if any
- [ ] I have reproduced the issue with at least the latest released version of superset
- [ ] I have checked the issue tracker for the same issue and I haven't found one similar
### Superset version

View File

@@ -199,37 +199,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
============================================================================
APACHE SUPERSET SUBCOMPONENTS:
The Apache Superset project contains subcomponents with separate copyright
notices and license terms. Your use of the source code for the these
subcomponents is subject to the terms and conditions of the following
licenses.
========================================================================
Third party Apache 2.0 licenses
========================================================================
========================================================================
MIT licenses
========================================================================
(MIT License) cal-heatmap v3.6.2 (https://github.com/wa0x6e/cal-heatmap)
========================================================================
BSD 2-Clause licenses
========================================================================
========================================================================
BSD 3-Clause licenses
========================================================================
(BSD 3 License) parallel-coordinates v0.7.0 (http://syntagmatic.github.com/parallel-coordinates/)
========================================================================
Creative Commons Attribution 4.0
========================================================================
(Creative Commons Attribution 4.0) diva-gis (http://www.diva-gis.org/Data)

View File

@@ -1,23 +1,3 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include NOTICE
include LICENSE.txt
graft licenses/
include README.md
recursive-include superset/data *
recursive-include superset/migrations *
recursive-include superset/static *
@@ -25,8 +5,6 @@ recursive-exclude superset/static/assets/docs *
recursive-exclude superset/static/assets/images/viz_thumbnails_large *
recursive-exclude superset/static/docs *
recursive-exclude superset/static/spec *
recursive-exclude superset/static/assets/src *
recursive-include superset/static/assets/src/visualizations/CountryMap/ *
recursive-exclude superset/static/images/viz_thumbnails_large *
recursive-exclude superset/static/assets/node_modules *
recursive-include superset/templates *

8
NOTICE
View File

@@ -1,8 +0,0 @@
Apache Superset
Copyright 2016-2019 The Apache Software Foundation
This product includes software developed at The Apache Software
Foundation (http://www.apache.org/).
This product includes data licensed under a Creative Commons Attribution 4.0
License (http://www.diva-gis.org/Data).

108
README.md
View File

@@ -1,21 +1,3 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
Superset
=========
@@ -110,13 +92,11 @@ Superset can be used to visualize data out of most databases:
* MonetDB
* Snowflake
* Redshift
* Clickhouse
* Apache Kylin
* **more!** look for the availability of a SQLAlchemy dialect for your database
to find out whether it will work with Superset
Apache Druid (Incubating)!
Druid!
------
On top of having the ability to query your relational databases,
@@ -149,7 +129,6 @@ Resources
* [Docker image](https://hub.docker.com/r/amancevice/superset/) (community contributed)
* [Slides from Strata (March 2016)](https://drive.google.com/open?id=0B5PVE0gzO81oOVJkdF9aNkJMSmM)
* [Stackoverflow tag](https://stackoverflow.com/questions/tagged/apache-superset)
* [Join our Slack](https://join.slack.com/t/apache-superset/shared_invite/enQtNDMxMDY5NjM4MDU0LTc2Y2QwYjE4NGYwNzQyZWUwYTExZTdiZDMzMWQwZjc2YmJmM2QyMDkwMGVjZTA4N2I2MzUxZTk2YmE5MWRhZWE)
* [DEPRECATED Google Group](https://groups.google.com/forum/#!forum/airbnb_superset)
@@ -166,54 +145,37 @@ Who uses Apache Superset (incubating)?
Here's a list of organizations who have taken the time to send a PR to let
the world know they are using Superset. Join our growing community!
1. [AiHello](https://www.aihello.com)
1. [Airbnb](https://github.com/airbnb)
1. [Airboxlab](https://foobot.io)
1. [Aktia Bank plc](https://www.aktia.com)
1. [Amino](https://amino.com)
1. [Apollo GraphQL](https://www.apollographql.com/)
1. [Ascendica Development](http://ascendicadevelopment.com)
1. [Astronomer](https://www.astronomer.io)
1. [Brilliant.org](https://brilliant.org/)
1. [Capital Service S.A.](http://capitalservice.pl)
1. [Clark.de](http://clark.de/)
1. [CnOvit](http://www.cnovit.com/)
1. [Dial Once](https://www.dial-once.com/en/)
1. [Digit Game Studios](https://www.digitgaming.com/)
1. [Douban](https://www.douban.com/)
1. [Endress+Hauser](http://www.endress.com/)
1. [FBK - ICT center](http://ict.fbk.eu)
1. [Faasos](http://faasos.com/)
1. [Fordeal](http://www.fordeal.com)
1. [GfK Data Lab](http://datalab.gfk.com)
1. [Grassroot](https://www.grassrootinstitute.org/)
1. [HuiShouBao](http://www.huishoubao.com/)
1. [jampp](https://jampp.com/)
1. [Konfío](http://konfio.mx)
1. [Kuaishou](https://www.kuaishou.com/)
1. [Lime](https://www.limebike.com/)
1. [Lyft](https://www.lyft.com/)
1. [Maieutical Labs](https://maieuticallabs.it)
1. [Myra Labs](http://www.myralabs.com/)
1. [PeopleDoc](https://www.people-doc.com)
1. [Ona](https://ona.io)
1. [Pronto Tools](http://www.prontotools.io)
1. [QPID Health](http://www.qpidhealth.com/ )
1. [Qunar](https://www.qunar.com/)
1. [ScopeAI](https://www.getscopeai.com)
1. [Shopee](https://shopee.sg)
1. [Shopkick](https://www.shopkick.com)
1. [Steamroot](https://streamroot.io/)
1. [Showmax](https://tech.showmax.com)
1. [Tails.com](https://tails.com)
1. [THEICONIC](http://theiconic.com.au/)
1. [Tobii](http://www.tobii.com/)
1. [Tooploox](https://www.tooploox.com/)
1. [TrustMedis](https://trustmedis.com)
1. [Twitter](https://twitter.com/)
1. [Udemy](https://www.udemy.com/)
1. [VIPKID](https://www.vipkid.com.cn/)
1. [Windsor.ai](https://www.windsor.ai/)
1. [Yahoo!](https://yahoo.com/)
1. [Zaihang](http://www.zaih.com/)
1. [Zalando](https://www.zalando.com)
- [AiHello](https://www.aihello.com)
- [Airbnb](https://github.com/airbnb)
- [Aktia Bank plc](https://www.aktia.com)
- [Amino](https://amino.com)
- [Ascendica Development](http://ascendicadevelopment.com)
- [Astronomer](https://www.astronomer.io)
- [Brilliant.org](https://brilliant.org/)
- [Capital Service S.A.](http://capitalservice.pl)
- [Clark.de](http://clark.de/)
- [Digit Game Studios](https://www.digitgaming.com/)
- [Douban](https://www.douban.com/)
- [Endress+Hauser](http://www.endress.com/)
- [FBK - ICT center](http://ict.fbk.eu)
- [Faasos](http://faasos.com/)
- [GfK Data Lab](http://datalab.gfk.com)
- [Konfío](http://konfio.mx)
- [Lyft](https://www.lyft.com/)
- [Maieutical Labs](https://cloudschooling.it)
- [PeopleDoc](https://www.people-doc.com)
- [Ona](https://ona.io)
- [Pronto Tools](http://www.prontotools.io)
- [Qunar](https://www.qunar.com/)
- [ScopeAI](https://www.getscopeai.com)
- [Shopee](https://shopee.sg)
- [Shopkick](https://www.shopkick.com)
- [Tails.com](https://tails.com)
- [Tobii](http://www.tobii.com/)
- [Tooploox](https://www.tooploox.com/)
- [Twitter](https://twitter.com/)
- [Udemy](https://www.udemy.com/)
- [VIPKID](https://www.vipkid.com.cn/)
- [Yahoo!](https://yahoo.com/)
- [Zaihang](http://www.zaih.com/)
- [Zalando](https://www.zalando.com)

View File

@@ -1,111 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## Refresh documentation website
Every once in a while we want to compile the documentation and publish it.
Here's how to do it.
```bash
# install doc dependencies
pip install -r docs/requirements.txt
# build the docs
python setup.py build_sphinx
# copy html files to temp folder
cp -r docs/_build/html/ /tmp/tmp_superset_docs/
# clone the docs repo
cd ~/
git clone https://git-wip-us.apache.org/repos/asf/incubator-superset-site.git
# copy
cp -r /tmp/tmp_superset_docs/ ~/incubator-superset-site.git/
# commit and push to `asf-site` branch
cd ~/incubator-superset-site.git/
git checkout asf-site
git add .
git commit -a -m "New doc version"
git push origin master
```
## Publishing a PyPI release
We create a branch that goes along each minor release `0.24`
and micro releases get corresponding tags as in `0.24.0`. Git history should
never be altered in release branches.
Bug fixes and security-related patches get cherry-picked
(usually from master) as in `git cherry-pick -x {SHA}`.
Following a set of cherries being picked, a release can be pushed to
PyPI as follows:
```bash
# branching off of master
git checkout -b 0.25
# cherry-picking a SHA
git cherry-pick -x f9d85bd2e1fd9bc233d19c76bed09467522b968a
# repeat with other SHAs, don't forget the -x
# source of thruth for release numbers live in package.json
vi superset/assets/package.json
# hard code release in file, commit to the release branch
git commit -a -m "0.25.0"
# create the release tag in the release branch
git tag 0.25.0
git push apache 0.25 --tags
# check travis to confirm the build succeeded as
# you shouldn't assume that a clean cherry will be clean
# when landing on a new sundae
# compile the JS, and push to pypi
# to run this part you'll need a pypi account and rights on the
# superset package. Committers that want to ship releases
# should have this access.
# You'll also need a `.pypirc` as specified here:
# http://peterdowns.com/posts/first-time-with-pypi.html
./pypi_push.sh
# publish an update to the CHANGELOG.md for the right version range
# looking the latest CHANGELOG entry for the second argument
./gen_changelog.sh 0.22.1 0.25.0
# this will overwrite the CHANGELOG.md with only the version range
# so you'll want to copy paste that on top of the previous CHANGELOG.md
# open a PR against `master`
```
In the future we'll start publishing release candidates for minor releases
only, but typically not for micro release.
The process will be similar to the process described above, expect the
tags will be formatted `0.25.0rc1`, `0.25.0rc2`, ..., until consensus
is reached.
We should also have a Github PR label process to target the proper
release, and tooling helping keeping track of all the cherries and
target versions.
For Apache releases, the process will be a bit heavier and should get
documented here. There will be extra steps for signing the binaries,
with a PGP key and providing MD5, Apache voting, as well as
publishing to Apache's SVN repository. View the ASF docs for more
information.

View File

@@ -1,108 +1,10 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Updating Superset
This file documents any backwards-incompatible changes in Superset and
assists people when migrating to a new version.
## Superset 0.32.0
* If you use `Hive` or `Presto`, we've moved some dependencies that were
in the main package as optional now. To get these packages,
run `pip install superset[presto]` and/or `pip install superset[hive]` as
required.
## Superset 0.23.0
* [5445](https://github.com/apache/incubator-superset/pull/5445) : a change
which prevents encoding of empty string from form data in the datanbase.
This involves a non-schema changing migration which does potentially impact
a large number of records. Scheduled downtime may be advised.
## Superset 0.31.0
* boto3 / botocore was removed from the dependency list. If you use s3
as a place to store your SQL Lab result set or Hive uploads, you may
have to rely on an alternate requirements.txt file to install those
dependencies.
* From 0.31.0 onwards, we recommend not using the npm package `yarn` in
favor of good old `npm install`. While yarn should still work just fine,
you should probably align to guarantee builds similar to the ones we
use in testing and across the community in general.
## Superset 0.29.0
* India was removed from the "Country Map" visualization as the geojson
file included in the package was very large
## Superset 0.28.0
* Support for Python 2 is deprecated, we only support >=3.6 from
`0.28.0` onwards
* Superset 0.28 deprecates the previous dashboard layout. While 0.27
offered a migration workflow to users and allowed them to validate and
publish their migrated dashboards individually, 0.28 forces
the migration of all
dashboards through an automated db migration script. We
do recommend that you take a backup prior to this migration.
* Superset 0.28 deprecates the `median` cluster label aggregator for mapbox visualizations. This particular aggregation is not supported on mapbox visualizations going forward.
* Superset 0.28 upgrades `flask-login` to `>=0.3`, which includes a
backwards-incompatible change: `g.user.is_authenticated`,
`g.user.is_anonymous`, and `g.user.is_active` are now properties
instead of methods.
## Superset 0.27.0
* Superset 0.27 start to use nested layout for dashboard builder, which is not
backward-compatible with earlier dashboard grid data. We provide migration script
to automatically convert dashboard grid to nested layout data. To be safe, please
take a database backup prior to this upgrade. It's the only way people could go
back to a previous state.
## Superset 0.26.0
* Superset 0.26.0 deprecates the `superset worker` CLI, which is a simple
wrapper around the `celery worker` command, forcing you into crafting
your own native `celery worker` command. Your command should look something
like `celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair`
## Superset 0.25.0
Superset 0.25.0 contains a backwards incompatible changes.
If you run a production system you should schedule downtime for this
upgrade.
The PRs bellow have more information around the breaking changes:
* [4587](https://github.com/apache/incubator-superset/pull/4587) : a backward
incompatible database migration that requires downtime. Once the
db migration succeeds, the web server needs to be restarted with the
new version. The previous version will fail
* [4565](https://github.com/apache/incubator-superset/pull/4565) : we've
changed the security model a bit where in the past you would have to
define your authentication scheme by inheriting from Flask
App Builder's
`from flask_appbuilder.security.sqla.manager import SecurityManager`,
you now have to derive Superset's
own derivative `superset.security.SupersetSecurityManager`. This
can provide you with more hooks to define your own logic and/or defer
permissions to another system as needed. For all implementation, you
simply have to import and derive `SupersetSecurityManager` in place
of the `SecurityManager`
* [4835](https://github.com/apache/incubator-superset/pull/4835) :
our `setup.py` now only pins versions where required, giving you
more latitude in using versions of libraries as needed. We do now
provide a `requirements.txt` with pinned versions if you want to run
the suggested versions that `Superset` builds and runs tests against.
Simply `pip install -r requirements.txt` in your build pipeline, likely
prior to `pip install superset==0.25.0`
* [4565](https://github.com/apache/incubator-superset/pull/4565)
* [4587](https://github.com/apache/incubator-superset/pull/4587)
* [4835](https://github.com/apache/incubator-superset/pull/4835)

View File

@@ -1,20 +1,3 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# A generic, single database configuration.
[alembic]

View File

View File

@@ -1,17 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
COMPOSE_PROJECT_NAME=superset

View File

@@ -1,72 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM python:3.6
RUN useradd --user-group --create-home --no-log-init --shell /bin/bash superset
# Configure environment
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
RUN apt-get update -y
# Install dependencies to fix `curl https support error` and `elaying package configuration warning`
RUN apt-get install -y apt-transport-https apt-utils
# Install superset dependencies
# https://superset.incubator.apache.org/installation.html#os-dependencies
RUN apt-get install -y build-essential libssl-dev \
libffi-dev python3-dev libsasl2-dev libldap2-dev libxi-dev
# Install extra useful tool for development
RUN apt-get install -y vim less postgresql-client redis-tools
# Install nodejs for custom build
# https://superset.incubator.apache.org/installation.html#making-your-own-build
# https://nodejs.org/en/download/package-manager/
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get install -y nodejs
WORKDIR /home/superset
COPY requirements.txt .
COPY requirements-dev.txt .
RUN pip install --upgrade setuptools pip \
&& pip install -r requirements.txt -r requirements-dev.txt \
&& rm -rf /root/.cache/pip
COPY --chown=superset:superset superset superset
ENV PATH=/home/superset/superset/bin:$PATH \
PYTHONPATH=/home/superset/superset/:$PYTHONPATH
USER superset
RUN cd superset/assets \
&& npm ci \
&& npm run sync-backend \
&& npm run build \
&& rm -rf node_modules
COPY contrib/docker/docker-init.sh .
COPY contrib/docker/docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
HEALTHCHECK CMD ["curl", "-f", "http://localhost:8088/health"]
EXPOSE 8088

View File

@@ -1,70 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
version: '3'
services:
redis:
image: redis:3.2
restart: unless-stopped
ports:
- 6379:6379
volumes:
- redis:/data
postgres:
image: postgres:10
restart: unless-stopped
environment:
POSTGRES_DB: superset
POSTGRES_PASSWORD: superset
POSTGRES_USER: superset
ports:
- 5432:5432
volumes:
- postgres:/var/lib/postgresql/data
superset:
build:
context: ../../
dockerfile: contrib/docker/Dockerfile
restart: unless-stopped
environment:
POSTGRES_DB: superset
POSTGRES_USER: superset
POSTGRES_PASSWORD: superset
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
REDIS_HOST: redis
REDIS_PORT: 6379
# If using production, comment development volume below
#SUPERSET_ENV: production
SUPERSET_ENV: development
ports:
- 8088:8088
depends_on:
- postgres
- redis
volumes:
# this is needed to communicate with the postgres and redis services
- ./superset_config.py:/home/superset/superset/superset_config.py
# this is needed for development, remove with SUPERSET_ENV=production
- ../../superset:/home/superset/superset
volumes:
postgres:
external: false
redis:
external: false

View File

@@ -1,38 +0,0 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -ex
if [ "$#" -ne 0 ]; then
exec "$@"
elif [ "$SUPERSET_ENV" = "development" ]; then
celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair &
# needed by superset runserver
(cd superset/assets/ && npm ci && npm run sync-backend)
(cd superset/assets/ && npm run dev) &
FLASK_APP=superset:app flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
elif [ "$SUPERSET_ENV" = "production" ]; then
celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair &
gunicorn --bind 0.0.0.0:8088 \
--workers $((2 * $(getconf _NPROCESSORS_ONLN) + 1)) \
--timeout 60 \
--limit-request-line 0 \
--limit-request-field_size 0 \
superset:app
else
superset --help
fi

View File

@@ -1,32 +0,0 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -ex
# Create an admin user (you will be prompted to set username, first and last name before setting a password)
fabmanager create-admin --app superset
# Initialize the database
superset db upgrade
if [ "$SUPERSET_LOAD_EXAMPLES" = "yes" ]; then
# Load some data to play with
superset load_examples
fi
# Create default roles and permissions
superset init

View File

@@ -1,58 +0,0 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import os
def get_env_variable(var_name, default=None):
"""Get the environment variable or raise exception."""
try:
return os.environ[var_name]
except KeyError:
if default is not None:
return default
else:
error_msg = 'The environment variable {} was missing, abort...'\
.format(var_name)
raise EnvironmentError(error_msg)
POSTGRES_USER = get_env_variable('POSTGRES_USER')
POSTGRES_PASSWORD = get_env_variable('POSTGRES_PASSWORD')
POSTGRES_HOST = get_env_variable('POSTGRES_HOST')
POSTGRES_PORT = get_env_variable('POSTGRES_PORT')
POSTGRES_DB = get_env_variable('POSTGRES_DB')
# The SQLAlchemy connection string.
SQLALCHEMY_DATABASE_URI = 'postgresql://%s:%s@%s:%s/%s' % (POSTGRES_USER,
POSTGRES_PASSWORD,
POSTGRES_HOST,
POSTGRES_PORT,
POSTGRES_DB)
REDIS_HOST = get_env_variable('REDIS_HOST')
REDIS_PORT = get_env_variable('REDIS_PORT')
class CeleryConfig(object):
BROKER_URL = 'redis://%s:%s/0' % (REDIS_HOST, REDIS_PORT)
CELERY_IMPORTS = ('superset.sql_lab', )
CELERY_RESULT_BACKEND = 'redis://%s:%s/1' % (REDIS_HOST, REDIS_PORT)
CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
CELERY_TASK_PROTOCOL = 1
CELERY_CONFIG = CeleryConfig

View File

View File

@@ -1,19 +1,3 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Makefile for Sphinx documentation
#

18
docs/_static/docs.css vendored
View File

@@ -1,21 +1,3 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
body {
padding-top: 0px;
}

95
docs/_templates/layout.html vendored Normal file
View File

@@ -0,0 +1,95 @@
{% extends "!layout.html" %}
{% set bootswatch_css_custom = ['_static/docs.css'] %}
{%- block content %}
{{ navBar() }}
{% if pagename == 'index' %}
<div id="carousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel" data-slide-to="0" class="active"></li>
<li data-target="#carousel" data-slide-to="1"></li>
<li data-target="#carousel" data-slide-to="2"></li>
<li data-target="#carousel" data-slide-to="3"></li>
<li data-target="#carousel" data-slide-to="4"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active text-center">
<img src="_static/img/dash.png">
<div class="carousel-caption">
<div>
<h1>Superset</h1>
<p>
an open source data visualization platform
</p>
</div>
</div>
</div>
<div class="item">
<img src="_static/img/bubble.png">
<div class="carousel-caption">
<h2>Explore your data
</h2>
<p>
Intuitively navigate your data while slicing, dicing, and
visualizing through a rich set of widgets
</p>
</div>
</div>
<div class="item">
<img src="_static/img/dash.png">
<div class="carousel-caption">
<h2>Create and share dashboards</h2>
<p>Assemble many data visualization "slices" into a rich collection</p>
</div>
</div>
<div class="item">
<img src="_static/img/cloud.png">
<div class="carousel-caption">
<h2>Extend</h2>
<p>Join the community and take part in extending the widget library</p>
</div>
</div>
<div class="item">
<img src="_static/img/servers.jpg">
<div class="carousel-caption">
<h2>Connect</h2>
<p>
Access data from MySql, Presto.db, Postgres, RedShift, Oracle, MsSql,
SQLite, and more through the SqlAlchemy integration. You can also
query realtime data blazingly fast out of Druid.io
</p>
</div>
</div>
</div>
<!-- Controls -->
<div>
<a class="left carousel-control" href="#carousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<hr/>
<div class="container">
<div class="jumbotron">
<h1>Superset</h1>
<p>
is an open source data visualization platform that provides easy
exploration of your data and allows you to create and share
beautiful charts and dashboards
</p>
</div>
</div>
{% endif %}
<div class="container mainbody">
{% block body %}{% endblock %}
</div>
{%- endblock %}

View File

@@ -1,20 +1,4 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
rm -rf _build
make html
#cp -r ../superset/assets/images/ _build/html/_static/img/

View File

@@ -1,19 +1,5 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
# -*- coding: utf-8 -*-
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# superset documentation build configuration file, created by
# sphinx-quickstart on Thu Dec 17 15:42:06 2015.
#
@@ -47,6 +33,7 @@ import sphinx_rtd_theme
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinxcontrib.youtube',
]
# Add any paths that contain templates here, relative to this directory.
@@ -65,8 +52,8 @@ master_doc = 'index'
# General information about the project.
project = "Apache Superset"
copyright = 'Copyright © 2018 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.'
author = u'Apache Superset Dev'
copyright = 'Apache Software Foundation'
author = u'Maxime Beauchemin'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -146,7 +133,7 @@ html_theme_options = {}
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = "images/s.png"
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@@ -191,10 +178,10 @@ html_static_path = ['_static']
html_show_sourcelink = False
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
html_show_sphinx = False
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
html_show_copyright = True
html_show_copyright = False
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
@@ -242,7 +229,7 @@ latex_elements = {
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'superset.tex', u'Superset Documentation',
u'Apache Superset Dev', 'manual'),
u'Maxime Beauchemin', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of

View File

@@ -1,36 +1,19 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Druid
=====
Superset has a native connector to Druid and a majority of Druid's
Superset has a native connector to Druid, and a majority of Druid's
features are accessible through Superset.
.. note ::
Druid now supports SQL and can be accessed through Superset's
SQLAlchemy connector. The long-term vision is to deprecate
SQLAlchemy connector. The long term vision is to deprecate
the Druid native REST connector and query Druid exclusively through
the SQL interface.
Aggregations
------------
Common aggregations or Druid metrics can be defined and used in Superset.
Common aggregations, or Druid metrics can be defined and used in Superset.
The first and simpler use case is to use the checkbox matrix expose in your
datasource's edit view (``Sources -> Druid Datasources ->
[your datasource] -> Edit -> [tab] List Druid Column``).
@@ -38,8 +21,8 @@ Clicking the ``GroupBy`` and ``Filterable`` checkboxes will make the column
appear in the related dropdowns while in explore view. Checking
``Count Distinct``, ``Min``, ``Max`` or ``Sum`` will result in creating
new metrics that will appear in the ``List Druid Metric`` tab upon saving the
datasource. By editing these metrics, you'll notice that their ``json``
element corresponds to Druid aggregation definition. You can create your own
datasource. By editing these metrics, you'll notice that they their ``json``
element correspond to Druid aggregation definition. You can create your own
aggregations manually from the ``List Druid Metric`` tab following Druid
documentation.
@@ -50,7 +33,7 @@ Post-Aggregations
-----------------
Druid supports post aggregation and this works in Superset. All you have to
do is create a metric, much like you would create an aggregation manually,
do is creating a metric, much like you would create an aggregation manually,
but specify ``postagg`` as a ``Metric Type``. You then have to provide a valid
json post-aggregation definition (as specified in the Druid docs) in the
Json field.

View File

@@ -1,20 +1,3 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
FAQ
===
@@ -105,7 +88,7 @@ It's easy: use the ``Filter Box`` widget, build a slice, and add it to your
dashboard.
The ``Filter Box`` widget allows you to define a query to populate dropdowns
that can be used for filtering. To build the list of distinct values, we
that can be use for filtering. To build the list of distinct values, we
run a query, and sort the result by the metric you provide, sorting
descending.
@@ -131,8 +114,8 @@ never be affected by any dashboard level filtering.
"filter_immune_slices": [324, 65, 92],
"expanded_slices": {},
"filter_immune_slice_fields": {
"177": ["country_name", "__time_range"],
"32": ["__time_range"]
"177": ["country_name", "__from", "__to"],
"32": ["__from", "__to"]
},
"timed_refresh_immune_slices": [324]
}
@@ -144,8 +127,8 @@ Now note the ``filter_immune_slice_fields`` key. This one allows you to
be more specific and define for a specific slice_id, which filter fields
should be disregarded.
Note the use of the ``__time_range`` keyword, which is reserved for dealing
with the time boundary filtering mentioned above.
Note the use of the ``__from`` and ``__to`` keywords, those are reserved
for dealing with the time boundary filtering mentioned above.
But what happens with filtering when dealing with slices coming from
different tables or databases? If the column name is shared, the filter will
@@ -263,55 +246,3 @@ labels to colors in the ``JSON Metadata`` attribute using the
"Boys": "#ADD8E6"
}
}
Does Superset work with [insert database engine here]?
------------------------------------------------------
The community over time has curated a list of databases that work well with
Superset in the :ref:`ref_database_deps` section of the docs. Database
engines not listed in this page may work too. We rely on the
community to contribute to this knowledge base.
.. _SQLAlchemy dialect: http://docs.sqlalchemy.org/en/latest/dialects/
.. _DBAPI driver: https://www.python.org/dev/peps/pep-0249/
For a database engine to be supported in Superset through the
SQLAlchemy connector, it requires having a Python compliant
`SQLAlchemy dialect`_ as well as a
`DBAPI driver`_ defined.
Database that have limited SQL support may
work as well. For instance it's possible to connect
to Druid through the SQLAlchemy connector even though Druid does not support
joins and subqueries. Another key element for a database to be supported is through
the Superset `Database Engine Specification
<https://github.com/apache/incubator-superset/blob/master/superset/db_engine_specs.py>`_
interface. This interface allows for defining database-specific configurations
and logic
that go beyond the SQLAlchemy and DBAPI scope. This includes features like:
* date-related SQL function that allow Superset to fetch different
time granularities when running time-series queries
* whether the engine supports subqueries. If false, Superset may run 2-phase
queries to compensate for the limitation
* methods around processing logs and inferring the percentage of completion
of a query
* technicalities as to how to handle cursors and connections if the driver
is not standard DBAPI
* more, read the code for more details
Beyond the SQLAlchemy connector, it's also possible, though much more
involved, to extend Superset and write
your own connector. The only example of this at the moment is the Druid
connector, which is getting superseded by Druid's growing SQL support and
the recent availability of a DBAPI and SQLAlchemy driver. If the database
you are considering integrating has any kind of of SQL support, it's probably
preferable to go the SQLAlchemy route. Note that for a native connector to
be possible the database needs to have support for running OLAP-type queries
and should be able to things that are typical in basic SQL:
- aggregate data
- apply filters (==, !=, >, <, >=, <=, IN, ...)
- apply HAVING-type filters
- be schema-aware, expose columns and types

View File

@@ -1,20 +1,3 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Visualizations Gallery
======================

View File

@@ -1,20 +1,3 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Importing and Exporting Datasources
===================================
@@ -66,7 +49,7 @@ By default, default (null) values will be omitted. Use the ``-d`` flag to includ
If you want back references to be included (e.g. a column to include the table id
it belongs to) use the ``-b`` flag.
Alternatively, you can export datasources using the UI:
Alternatively you can export datasources using the UI:
1. Open **Sources** -> **Databases** to export all tables associated to a
single or multiple databases. (**Tables** for one or more tables,
@@ -112,7 +95,7 @@ those would be synchronised as well.
If you don't supply the sync flag (``-s``) importing will only add and update (override) fields.
E.g. you can add a ``verbose_name`` to the column ``ds`` in the table ``random_time_series`` from the example datasets
E.g. you can add a ``verbose_name`` to the the column ``ds`` in the table ``random_time_series`` from the example datasets
by saving the following YAML to file and then running the ``import_datasources`` command. ::
databases:

View File

@@ -1,29 +1,4 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
|apache_img| |superset_img|
.. |apache_img| image:: images/apache_feather.png
:width: 7%
:target: http://www.apache.org/
:alt: The Apache Software Foundation
.. |superset_img| image:: images/s.png
:width: 25%
.. image:: images/s.png
Apache Superset (incubating)
''''''''''''''''''''''''''''
@@ -34,6 +9,9 @@ intelligence web application
----------------
.. warning:: This project was originally named Panoramix, was renamed to
Caravel in March 2016, and is currently named Superset as of November 2016
.. important::
**Disclaimer**: Apache Superset is an effort undergoing incubation at The
@@ -46,32 +24,6 @@ intelligence web application
the code, it does indicate that the project has yet to be fully
endorsed by the ASF.
.. note:: Apache Superset, Superset, Apache, the Apache feather logo, and
the Apache Superset project logo are either registered trademarks or
trademarks of The Apache Software Foundation in the United States
and other countries.
Superset Resources
==================
- `Superset's Github <https://github.com/apache/incubator-superset>`_, note
that `we use Github for issue tracking <https://github.com/apache/incubator-superset/issues>`_
- Superset's
`contribution guidelines <https://github.com/apache/incubator-superset/blob/master/CONTRIBUTING.md>`_
and
`code of conduct <https://github.com/apache/incubator-superset/blob/master/CODE_OF_CONDUCT.md>`_
on Github.
- Our `mailing list archives <https://lists.apache.org/list.html?dev@superset.apache.org>`_.
To subscribe, send an email to ``dev-subscribe@superset.apache.org``
- `Join our Slack <https://join.slack.com/t/apache-superset/shared_invite/enQtNDMxMDY5NjM4MDU0LTc2Y2QwYjE4NGYwNzQyZWUwYTExZTdiZDMzMWQwZjc2YmJmM2QyMDkwMGVjZTA4N2I2MzUxZTk2YmE5MWRhZWE>`_
Apache Software Foundation Resources
====================================
- `The Apache Software Foundation Website <http://www.apache.org>`_
- `Current Events <http://www.apache.org/events/current-event>`_
- `License <https://www.apache.org/licenses/>`_
- `Thanks <https://www.apache.org/foundation/thanks.html>`_ to the ASF's sponsors
- `Sponsor Apache! <http://www.apache.org/foundation/sponsorship.html>`_
Overview
========

View File

@@ -1,30 +1,12 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Installation & Configuration
============================
Getting Started
---------------
Superset has deprecated support for Python ``2.*`` and supports
only ``~=3.6`` to take advantage of the newer Python features and reduce
the burden of supporting previous versions. We run our test suite
against ``3.6``, but running on ``3.7`` **should** work as well.
Superset is tested against Python ``2.7`` and Python ``3.4``.
Airbnb currently uses 2.7.* in production. We do not plan on supporting
Python ``2.6``.
Cloud-native!
-------------
@@ -40,7 +22,7 @@ flexible and lets you choose your web server (Gunicorn, Nginx, Apache),
your metadata database engine (MySQL, Postgres, MariaDB, ...),
your message queue (Redis, RabbitMQ, SQS, ...),
your results backend (S3, Redis, Memcached, ...), your caching layer
(Memcached, Redis, ...), works well with services like NewRelic, StatsD and
(memcached, Redis, ...), works well with services like NewRelic, StatsD and
DataDog, and has the ability to run analytic workloads against
most popular database technologies.
@@ -53,43 +35,12 @@ The Superset web server and the Superset Celery workers (optional)
are stateless, so you can scale out by running on as many servers
as needed.
Start with Docker
-----------------
If you know docker, then you're lucky, we have shortcut road for you to
initialize development environment: ::
git clone https://github.com/apache/incubator-superset/
cd incubator-superset/contrib/docker
# prefix with SUPERSET_LOAD_EXAMPLES=yes to load examples:
docker-compose run --rm superset ./docker-init.sh
# you can run this command everytime you need to start superset now:
docker-compose up
After several minutes for superset initialization to finish, you can open
a browser and view `http://localhost:8088` to start your journey.
From there, the container server will reload on modification of the superset python
and javascript source code.
Don't forget to reload the page to take the new frontend into account though.
See also `CONTRIBUTING.md <https://github.com/apache/incubator-superset/blob/master/CONTRIBUTING.md#webpack-dev-server>`_,
for alternative way of serving the frontend.
It is also possible to run Superset in non-development mode: in the `docker-compose.yml` file remove
the volumes needed for development and change the variable `SUPERSET_ENV` to `production`.
If you are attempting to build on a Mac and it exits with 137 you need to increase your docker resources.
OSX instructions: https://docs.docker.com/docker-for-mac/#advanced (Search for memory)
Or if you're curious and want to install superset from bottom up, then go ahead.
OS dependencies
---------------
Superset stores database connection information in its metadata database.
For that purpose, we use the ``cryptography`` Python library to encrypt
connection passwords. Unfortunately, this library has OS level dependencies.
connection passwords. Unfortunately this library has OS level dependencies.
You may want to attempt the next step
("Superset installation and initialization") and come back to this step if
@@ -102,11 +53,11 @@ the required dependencies are installed: ::
sudo apt-get install build-essential libssl-dev libffi-dev python-dev python-pip libsasl2-dev libldap2-dev
**Ubuntu 18.04** If you have python3.6 installed alongside with python2.7, as is default on **Ubuntu 18.04 LTS**, run this command also: ::
**Ubuntu 16.04** If you have python3.5 installed alongside with python2.7, as is default on **Ubuntu 16.04 LTS**, run this command also
sudo apt-get install build-essential libssl-dev libffi-dev python3.6-dev python-pip libsasl2-dev libldap2-dev
sudo apt-get install build-essential libssl-dev libffi-dev python3.5-dev python-pip libsasl2-dev libldap2-dev
otherwise build for ``cryptography`` fails.
otherwhise build for ``cryptography`` fails.
For **Fedora** and **RHEL-derivatives**, the following command will ensure
that the required dependencies are installed: ::
@@ -129,18 +80,17 @@ attempt it, download `get-pip.py <https://bootstrap.pypa.io/get-pip.py>`_, and r
Python virtualenv
-----------------
It is recommended to install Superset inside a virtualenv. Python 3 already ships virtualenv.
But if it's not installed in your environment for some reason, you can install it
via the package for your operating systems, otherwise you can install from pip: ::
It is recommended to install Superset inside a virtualenv. Python 3 already ships virtualenv, for
Python 2 you need to install it. If it's packaged for your operating systems install it from there
otherwise you can install from pip: ::
pip install virtualenv
You can create and activate a virtualenv by: ::
# virtualenv is shipped in Python 3.6+ as venv instead of pyvenv.
# See https://docs.python.org/3.6/library/venv.html
python3 -m venv venv
. venv/bin/activate
# virtualenv is shipped in Python 3 as pyvenv
virtualenv venv
. ./venv/bin/activate
On windows the syntax for activating it is a bit different: ::
@@ -163,7 +113,7 @@ Follow these few simple steps to install Superset.::
# Install superset
pip install superset
# Create an admin user (you will be prompted to set a username, first and last name before setting a password)
# Create an admin user (you will be prompted to set username, first and last name before setting a password)
fabmanager create-admin --app superset
# Initialize the database
@@ -176,7 +126,7 @@ Follow these few simple steps to install Superset.::
superset init
# To start a development web server on port 8088, use -p to bind to another port
superset runserver -d
# superset runserver -d
After installation, you should be able to point your browser to the right
@@ -198,14 +148,14 @@ application in a way that works well in your environment. Here's an **async**
setup known to work well in production: ::
 gunicorn \
-w 10 \
-k gevent \
--timeout 120 \
-b 0.0.0.0:6666 \
--limit-request-line 0 \
--limit-request-field_size 0 \
--statsd-host localhost:8125 \
superset:app
-w 10 \
-k gevent \
--timeout 120 \
-b 0.0.0.0:6666 \
--limit-request-line 0 \
--limit-request-field_size 0 \
--statsd-host localhost:8125 \
superset:app
Refer to the
`Gunicorn documentation <http://docs.gunicorn.org/en/stable/design.html>`_
@@ -213,7 +163,7 @@ for more information.
Note that *gunicorn* does not
work on Windows so the `superset runserver` command is not expected to work
in that context. Also, note that the development web
in that context. Also note that the development web
server (`superset runserver -d`) is not intended for production use.
If not using gunicorn, you may want to disable the use of flask-compress
@@ -222,15 +172,14 @@ by setting `ENABLE_FLASK_COMPRESS = False` in your `superset_config.py`
Flask-AppBuilder Permissions
----------------------------
By default, every time the Flask-AppBuilder (FAB) app is initialized the
By default every time the Flask-AppBuilder (FAB) app is initialized the
permissions and views are added automatically to the backend and associated with
the Admin role. The issue, however, is when you are running multiple concurrent
the Admin role. The issue however is when you are running multiple concurrent
workers this creates a lot of contention and race conditions when defining
permissions and views.
To alleviate this issue, the automatic updating of permissions can be disabled
by setting the environment variable
`SUPERSET_UPDATE_PERMS` environment variable to `0`.
by setting the :envvar:`SUPERSET_UPDATE_PERMS` environment variable to `0`.
The value `1` enables it, `0` disables it. Note if undefined the functionality
is enabled to maintain backwards compatibility.
@@ -249,7 +198,7 @@ If you are running superset behind a load balancer or reverse proxy (e.g. NGINX
or ELB on AWS), you may need to utilise a healthcheck endpoint so that your
load balancer knows if your superset instance is running. This is provided
at ``/health`` which will return a 200 response containing "OK" if the
the webserver is running.
webserver is running.
If the load balancer is inserting X-Forwarded-For/X-Forwarded-Proto headers, you
should set `ENABLE_PROXY_FIX = True` in the superset config file to extract and use
@@ -325,9 +274,6 @@ auth postback endpoint, you can add them to *WTF_CSRF_EXEMPT_LIST*
WTF_CSRF_EXEMPT_LIST = ['']
.. _ref_database_deps:
Database dependencies
---------------------
@@ -348,8 +294,6 @@ Here's a list of some of the recommended packages.
+---------------+-------------------------------------+-------------------------------------------------+
| Presto | ``pip install pyhive`` | ``presto://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| Hive | ``pip install pyhive`` | ``hive://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| Oracle | ``pip install cx_Oracle`` | ``oracle://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| sqlite | | ``sqlite://`` |
@@ -368,8 +312,6 @@ Here's a list of some of the recommended packages.
+---------------+-------------------------------------+-------------------------------------------------+
| Athena | ``pip install "PyAthenaJDBC>1.0.9"``| ``awsathena+jdbc://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| Athena | ``pip install "PyAthena>1.2.0"`` | ``awsathena+rest://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| Vertica | ``pip install | ``vertica+vertica_python://`` |
| | sqlalchemy-vertica-python`` | |
+---------------+-------------------------------------+-------------------------------------------------+
@@ -378,12 +320,8 @@ Here's a list of some of the recommended packages.
+---------------+-------------------------------------+-------------------------------------------------+
| Kylin | ``pip install kylinpy`` | ``kylin://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| BigQuery | ``pip install pybigquery`` | ``bigquery://`` |
+---------------+-------------------------------------+-------------------------------------------------+
| Teradata | ``pip install sqlalchemy-teradata`` | ``teradata://`` |
+---------------+-------------------------------------+-------------------------------------------------+
Note that many other databases are supported, the main criteria being the
Note that many other database are supported, the main criteria being the
existence of a functional SqlAlchemy dialect and Python driver. Googling
the keyword ``sqlalchemy`` in addition of a keyword that describes the
database you want to connect to should get you to the right place.
@@ -399,45 +337,6 @@ Where you need to escape/encode at least the s3_staging_dir, i.e., ::
s3://... -> s3%3A//...
You can also use `PyAthena` library(no java required) like this ::
awsathena+rest://{aws_access_key_id}:{aws_secret_access_key}@athena.{region_name}.amazonaws.com/{schema_name}?s3_staging_dir={s3_staging_dir}&...
See `PyAthena <https://github.com/laughingman7743/PyAthena#sqlalchemy>`_.
Snowflake
---------
The connection string for Snowflake looks like this ::
snowflake://{user}:{password}@{account}.{region}/{database}?role={role}&warehouse={warehouse}
The schema is not necessary in the connection string, as it is defined per table/query.
The role and warehouse can be omitted if defaults are defined for the user, i.e.
snowflake://{user}:{password}@{account}.{region}/{database}
Make sure the user has privileges to access and use all required
databases/schemas/tables/views/warehouses, as the Snowflake SQLAlchemy engine does
not test for user rights during engine creation.
See `Snowflake SQLAlchemy <https://github.com/snowflakedb/snowflake-sqlalchemy>`_.
Teradata
---------
The connection string for Teradata looks like this ::
teradata://{user}:{password}@{host}
*Note*: Its required to have Teradata ODBC drivers installed and environment variables configured for proper work of sqlalchemy dialect. Teradata ODBC Drivers available here: https://downloads.teradata.com/download/connectivity/odbc-driver/linux
Required environment variables: ::
export ODBCINI=/.../teradata/client/ODBC_64/odbc.ini
export ODBCINST=/.../teradata/client/ODBC_64/odbcinst.ini
See `Teradata SQLAlchemy <https://github.com/Teradata/sqlalchemy-teradata>`_.
Caching
-------
@@ -459,15 +358,15 @@ For setting your timeouts, this is done in the Superset metadata and goes
up the "timeout searchpath", from your slice configuration, to your
data source's configuration, to your database's and ultimately falls back
into your global default defined in ``CACHE_CONFIG``.
.. code-block:: python
CACHE_CONFIG = {
'CACHE_TYPE': 'redis',
'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24, # 1 day default (in secs)
'CACHE_KEY_PREFIX': 'superset_results',
'CACHE_REDIS_URL': 'redis://localhost:6379/0',
}
'CACHE_TYPE': 'redis',
'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24, # 1 day default (in secs)
'CACHE_KEY_PREFIX': 'superset_results',
'CACHE_REDIS_URL': 'redis://localhost:6379/0',
}
@@ -491,7 +390,7 @@ while the ``metadata_params`` get unpacked into the
Schemas (Postgres & Redshift)
-----------------------------
Postgres and Redshift, as well as other databases,
Postgres and Redshift, as well as other database,
use the concept of **schema** as a logical entity
on top of the **database**. For Superset to connect to a specific schema,
there's a **schema** parameter you can set in the table form.
@@ -572,18 +471,6 @@ The following keys in `superset_config.py` can be specified to configure CORS:
* ``CORS_OPTIONS``: options passed to Flask-CORS (`documentation <http://flask-cors.corydolphin.com/en/latest/api.html#extension>`)
DOMAIN SHARDING
---------------
Chrome allows up to 6 open connections per domain at a time. When there are more
than 6 slices in dashboard, a lot of time fetch requests are queued up and wait for
next available socket. PR (`#5039 <https://github.com/apache/incubator-superset/pull/5039>`) adds domain sharding to Superset,
and this feature will be enabled by configuration only (by default Superset
doesn't allow cross-domain request).
*``SUPERSET_WEBSERVER_DOMAINS``: list of allowed hostnames for domain sharding feature. default `None`
MIDDLEWARE
----------
@@ -616,20 +503,22 @@ Upgrading should be as straightforward as running::
superset db upgrade
superset init
Celery Tasks
------------
On large analytic databases, it's common to run background jobs, reports
and/or queries that execute for minutes or hours. In certain cases, we need
to support long running tasks that execute beyond the typical web request's
timeout (30-60 seconds).
SQL Lab
-------
SQL Lab is a powerful SQL IDE that works with all SQLAlchemy compatible
databases. By default, queries are executed in the scope of a web
request so they
may eventually timeout as queries exceed the maximum duration of a web
request in your environment, whether it'd be a reverse proxy or the Superset
server itself.
On large analytic databases, it's common to run queries that
execute for minutes or hours.
To enable support for long running queries that
execute beyond the typical web request's timeout (30-60 seconds), it is
necessary to configure an asynchronous backend for Superset which consists of:
necessary to configure an asynchronous backend for Superset which consist of:
* one or many Superset workers (which is implemented as a Celery worker), and
* one or many Superset worker (which is implemented as a Celery worker), and
can be started with the ``celery worker`` command, run
``celery worker --help`` to view the related options.
* a celery broker (message queue) for which we recommend using Redis
@@ -645,41 +534,15 @@ have the same configuration.
class CeleryConfig(object):
BROKER_URL = 'redis://localhost:6379/0'
CELERY_IMPORTS = (
'superset.sql_lab',
'superset.tasks',
)
CELERY_IMPORTS = ('superset.sql_lab', )
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERYD_LOG_LEVEL = 'DEBUG'
CELERYD_PREFETCH_MULTIPLIER = 10
CELERY_ACKS_LATE = True
CELERY_ANNOTATIONS = {
'sql_lab.get_sql_results': {
'rate_limit': '100/s',
},
'email_reports.send': {
'rate_limit': '1/s',
'time_limit': 120,
'soft_time_limit': 150,
'ignore_result': True,
},
}
CELERYBEAT_SCHEDULE = {
'email_reports.schedule_hourly': {
'task': 'email_reports.schedule_hourly',
'schedule': crontab(minute=1, hour='*'),
},
}
CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
CELERY_CONFIG = CeleryConfig
* To start a Celery worker to leverage the configuration run: ::
To start a Celery worker to leverage the configuration run: ::
celery worker --app=superset.tasks.celery_app:app --pool=prefork -Ofair -c 4
* To start a job which schedules periodic background jobs, run ::
celery beat --app=superset.tasks.celery_app:app
celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair
To setup a result backend, you need to pass an instance of a derivative
of ``werkzeug.contrib.cache.BaseCache`` to the ``RESULTS_BACKEND``
@@ -702,67 +565,13 @@ look something like:
RESULTS_BACKEND = RedisCache(
host='localhost', port=6379, key_prefix='superset_results')
**Important notes**
Note that it's important that all the worker nodes and web servers in
the Superset cluster share a common metadata database.
This means that SQLite will not work in this context since it has
limited support for concurrency and
typically lives on the local file system.
* It is important that all the worker nodes and web servers in
the Superset cluster share a common metadata database.
This means that SQLite will not work in this context since it has
limited support for concurrency and
typically lives on the local file system.
* There should only be one instance of ``celery beat`` running in your
entire setup. If not, background jobs can get scheduled multiple times
resulting in weird behaviors like duplicate delivery of reports,
higher than expected load / traffic etc.
Email Reports
-------------
Email reports allow users to schedule email reports for
* slice and dashboard visualization (Attachment or inline)
* slice data (CSV attachment on inline table)
Schedules are defined in crontab format and each schedule
can have a list of recipients (all of them can receive a single mail,
or separate mails). For audit purposes, all outgoing mails can have a
mandatory bcc.
**Requirements**
* A selenium compatible driver & headless browser
* `geckodriver <https://github.com/mozilla/geckodriver>`_ and Firefox is preferred
* `chromedriver <http://chromedriver.chromium.org/>`_ is a good option too
* Run `celery worker` and `celery beat` as follows ::
celery worker --app=superset.tasks.celery_app:app --pool=prefork -Ofair -c 4
celery beat --app=superset.tasks.celery_app:app
**Important notes**
* Be mindful of the concurrency setting for celery (using ``-c 4``).
Selenium/webdriver instances can consume a lot of CPU / memory on your servers.
* In some cases, if you notice a lot of leaked ``geckodriver`` processes, try running
your celery processes with ::
celery worker --pool=prefork --max-tasks-per-child=128 ...
* It is recommended to run separate workers for ``sql_lab`` and
``email_reports`` tasks. Can be done by using ``queue`` field in ``CELERY_ANNOTATIONS``
SQL Lab
-------
SQL Lab is a powerful SQL IDE that works with all SQLAlchemy compatible
databases. By default, queries are executed in the scope of a web
request so they may eventually timeout as queries exceed the maximum duration of a web
request in your environment, whether it'd be a reverse proxy or the Superset
server itself. In such cases, it is preferred to use ``celery`` to run the queries
in the background. Please follow the examples/notes mentioned above to get your
celery setup working.
Also note that SQL Lab supports Jinja templating in queries and that it's
Also note that SQL Lab supports Jinja templating in queries, and that it's
possible to overload
the default Jinja context in your environment by defining the
``JINJA_CONTEXT_ADDONS`` in your superset configuration. Objects referenced
@@ -775,8 +584,6 @@ in this dictionary are made available for users to use in their SQL.
}
Celery Flower
-------------
Flower is a web based tool for monitoring the Celery cluster which you can
install from pip: ::
@@ -784,14 +591,22 @@ install from pip: ::
and run via: ::
celery flower --app=superset.tasks.celery_app:app
celery flower --app=superset.sql_lab:celery_app
Building from source
Making your own build
---------------------
More advanced users may want to build Superset from sources. That
For more advanced users, you may want to build Superset from sources. That
would be the case if you fork the project to add features specific to
your environment. See `CONTRIBUTING.md <https://github.com/apache/incubator-superset/blob/master/CONTRIBUTING.md#local-development>`_.
your environment.::
# assuming $SUPERSET_HOME as the root of the repo
cd $SUPERSET_HOME/superset/assets
yarn
yarn run build
cd $SUPERSET_HOME
python setup.py install
Blueprints
----------
@@ -799,7 +614,7 @@ Blueprints
`Blueprints are Flask's reusable apps <http://flask.pocoo.org/docs/0.12/blueprints/>`_.
Superset allows you to specify an array of Blueprints
in your ``superset_config`` module. Here's
an example of how this can work with a simple Blueprint. By doing
an example on how this can work with a simple Blueprint. By doing
so, you can expect Superset to serve a page that says "OK"
at the ``/simple_page`` url. This can allow you to run other things such
as custom data visualization applications alongside Superset, on the
@@ -833,86 +648,3 @@ To setup StatsD logging, it's a matter of configuring the logger in your
Note that it's also possible to implement you own logger by deriving
``superset.stats_logger.BaseStatsLogger``.
Install Superset with helm in Kubernetes
----------------------------------------
You can install Superset into Kubernetes with Helm <https://helm.sh/>. The chart is
located in ``install/helm``.
To install Superset into your Kubernetes:
.. code-block:: bash
helm upgrade --install superset ./install/helm/superset
Note that the above command will install Superset into ``default`` namespace of your Kubernetes cluster.
Custom OAuth2 configuration
---------------------------
Beyond FAB supported providers (github, twitter, linkedin, google, azure), its easy to connect Superset with other OAuth2 Authorization Server implementations that support "code" authorization.
The first step: Configure authorization in Superset ``superset_config.py``.
.. code-block:: python
AUTH_TYPE = AUTH_OAUTH
OAUTH_PROVIDERS = [
{ 'name':'egaSSO',
'token_key':'access_token', # Name of the token in the response of access_token_url
'icon':'fa-address-card', # Icon for the provider
'remote_app': {
'consumer_key':'myClientId', # Client Id (Identify Superset application)
'consumer_secret':'MySecret', # Secret for this Client Id (Identify Superset application)
'request_token_params':{
'scope': 'read' # Scope for the Authorization
},
'access_token_method':'POST', # HTTP Method to call access_token_url
'access_token_params':{ # Additional parameters for calls to access_token_url
'client_id':'myClientId'
},
'access_token_headers':{ # Additional headers for calls to access_token_url
'Authorization': 'Basic Base64EncodedClientIdAndSecret'
},
'base_url':'https://myAuthorizationServer/oauth2AuthorizationServer/',
'access_token_url':'https://myAuthorizationServer/oauth2AuthorizationServer/token',
'authorize_url':'https://myAuthorizationServer/oauth2AuthorizationServer/authorize'
}
}
]
# Will allow user self registration, allowing to create Flask users from Authorized User
AUTH_USER_REGISTRATION = True
# The default user self registration role
AUTH_USER_REGISTRATION_ROLE = "Public"
Second step: Create a `CustomSsoSecurityManager` that extends `SupersetSecurityManager` and overrides `oauth_user_info`:
.. code-block:: python
from superset.security import SupersetSecurityManager
class CustomSsoSecurityManager(SupersetSecurityManager):
def oauth_user_info(self, provider, response=None):
logging.debug("Oauth2 provider: {0}.".format(provider))
if provider == 'egaSSO':
# As example, this line request a GET to base_url + '/' + userDetails with Bearer Authentication,
# and expects that authorization server checks the token, and response with user details
me = self.appbuilder.sm.oauth_remotes[provider].get('userDetails').data
logging.debug("user_data: {0}".format(me))
return { 'name' : me['name'], 'email' : me['email'], 'id' : me['user_name'], 'username' : me['user_name'], 'first_name':'', 'last_name':''}
...
This file must be located at the same directory than ``superset_config.py`` with the name ``custom_sso_security_manager.py``.
Then we can add this two lines to ``superset_config.py``:
.. code-block:: python
from custom_sso_security_manager import CustomSsoSecurityManager
CUSTOM_SECURITY_MANAGER = CustomSsoSecurityManager

View File

@@ -1,20 +1,3 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Misc
----

View File

@@ -1,18 +1,3 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
sphinx==1.8.1
sphinx-rtd-theme==0.3.1
sphinx==1.7.1
sphinx-rtd-theme==0.2.4
sphinxcontrib.youtube==0.1.2

View File

@@ -1,20 +1,3 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Security
========
Security in Superset is handled by Flask AppBuilder (FAB). FAB is a
@@ -35,7 +18,7 @@ their original values as you run your next ``superset init`` command.
Since it's not recommended to alter the roles described here, it's right
to assume that your security strategy should be to compose user access based
on these base roles and roles that you create. For instance you could
create a role ``Financial Analyst`` that would be made of a set of permissions
create a role ``Financial Analyst`` that would be made of set of permissions
to a set of data sources (tables) and/or databases. Users would then be
granted ``Gamma``, ``Financial Analyst``, and perhaps ``sql_lab``.
@@ -46,13 +29,13 @@ other users and altering other people's slices and dashboards.
Alpha
"""""
Alpha users have access to all data sources, but they cannot grant or revoke access
Alpha have access to all data sources, but they cannot grant or revoke access
from other users. They are also limited to altering the objects that they
own. Alpha users can add and alter data sources.
Gamma
"""""
Gamma users have limited access. They can only consume data coming from data sources
Gamma have limited access. They can only consume data coming from data sources
they have been given access to through another complementary role.
They only have access to view the slices and
dashboards made from data sources that they have access to. Currently Gamma
@@ -92,7 +75,7 @@ click the ``+`` sign.
This new window allows you to give this new role a name, attribute it to users
and select the tables in the ``Permissions`` dropdown. To select the data
sources you want to associate with this role, simply click on the dropdown
sources you want to associate with this role, simply click in the dropdown
and use the typeahead to search for your table names.
You can then confirm with your Gamma users that they see the objects
@@ -104,12 +87,12 @@ Customizing
The permissions exposed by FAB are very granular and allow for a great level
of customization. FAB creates many permissions automagically for each model
that is created (can_add, can_delete, can_show, can_edit, ...) as well as for
that is create (can_add, can_delete, can_show, can_edit, ...) as well as for
each view. On top of that, Superset can expose more granular permissions like
``all_datasource_access``.
We do not recommend altering the 3 base roles as there
are a set of assumptions that Superset is built upon. It is possible though for
are a set of assumptions that Superset build upon. It is possible though for
you to create your own roles, and union them to existing ones.
Permissions
@@ -124,7 +107,8 @@ of permissions. Here are the different categories of permissions:
so on. By adding ``can_delete on Dashboard`` to a role, and granting that
role to a user, this user will be able to delete dashboards.
- **Views**: views are individual web pages, like the ``explore`` view or the
``SQL Lab`` view. When granted to a user, he/she will see that view in its menu items, and be able to load that page.
``SQL Lab`` view. When granted to a user, he/she will see that view in
the its menu items, and be able to load that page.
- **Data source**: For each data source, a permission is created. If the user
does not have the ``all_datasource_access`` permission granted, the user
will only be able to see Slices or explore the data sources that are granted

View File

@@ -1,20 +1,3 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
SQL Lab
=======
@@ -36,7 +19,7 @@ Feature Overview
- Browse database metadata: tables, columns, indexes, partitions
- Support for long-running queries
- uses the `Celery distributed queue <http://www.celeryproject.org/>`_
- uses the `Celery distributed queue <http://www.python.org/>`_
to dispatch query handling to workers
- supports defining a "results backend" to persist query results
@@ -84,8 +67,6 @@ Superset's Jinja context:
.. autofunction:: superset.jinja_context.url_param
.. autofunction:: superset.jinja_context.filter_values
Extending macros
''''''''''''''''

View File

@@ -1,20 +1,3 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Tutorial - Creating your first dashboard
========================================
@@ -248,7 +231,7 @@ You may want to do a couple more things with this measure:
Config > List Sql Metric > Edit Metric > D3Format*)
* Moreover, you may want to see the temperature measurements in plain degrees C,
not tenths of a degree. Or you may want to convert the temperature to degrees
Fahrenheit. You can change the SQL that gets executed against the database, baking
Fahrenheit. You can change the SQL that gets executed agains the database, baking
the logic into the measure itself (*Edit Table Config > List Sql Metric > Edit
Metric > SQL Expression*)

View File

@@ -1,20 +1,3 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Videos
======

View File

@@ -1,20 +1,3 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Visualization Tools
===================
@@ -513,11 +496,11 @@ List of Countries
+------+------------------------------------+
|IT-PE |Pescara |
+------+------------------------------------+
|IT-TE |Teramo |
|IT-TE |Teramo |
+------+------------------------------------+
|IT-BA |Bari |
+------+------------------------------------+
|IT-BT |Barletta-Andria-Trani |
|IT-BT |Barletta-Andria-Trani |
+------+------------------------------------+
|IT-BR |Brindisi |
+------+------------------------------------+
@@ -553,283 +536,181 @@ List of Countries
+------+------------------------------------+
|IT-BO |Bologna |
+------+------------------------------------+
|IT-FE |Ferrara |
|IT-FE |Ferrara |
+------+------------------------------------+
|IT-FC | Forli' - Cesena |
+------+------------------------------------+
|IT-MO |Modena |
|IT-MO |Modena |
+------+------------------------------------+
|IT-PR |Parma |
+------+------------------------------------+
|IT-PC |Piacenza |
|IT-PC |Piacenza |
+------+------------------------------------+
|IT-RA |Ravenna |
|IT-RA |Ravenna |
+------+------------------------------------+
|IT-RE |Reggio Nell'Emilia |
|IT-RE |Reggio Nell'Emilia |
+------+------------------------------------+
|IT-RN |Rimini |
|IT-RN |Rimini |
+------+------------------------------------+
|IT-GO |Gorizia |
|IT-GO |Gorizia |
+------+------------------------------------+
|IT-PN |Pordenone |
|IT-PN |Pordenone |
+------+------------------------------------+
|IT-TS |Trieste |
|IT-TS |Trieste |
+------+------------------------------------+
|IT-UD |Udine |
|IT-UD |Udine |
+------+------------------------------------+
|IT-FR |Frosinone |
|IT-FR |Frosinone |
+------+------------------------------------+
|IT-LT |Latina |
|IT-LT |Latina |
+------+------------------------------------+
|IT-RI |Rieti |
|IT-RI |Rieti |
+------+------------------------------------+
|IT-RM |Roma |
|IT-RM |Roma |
+------+------------------------------------+
|IT-VT |Viterbo |
|IT-VT |Viterbo |
+------+------------------------------------+
|IT-GE |Genova |
|IT-GE |Genova |
+------+------------------------------------+
|IT-IM |Imperia |
|IT-IM |Imperia |
+------+------------------------------------+
|IT-SP |La Spezia |
|IT-SP |La Spezia |
+------+------------------------------------+
|IT-SV |Savona |
|IT-SV |Savona |
+------+------------------------------------+
|IT-BG |Bergamo |
|IT-BG |Bergamo |
+------+------------------------------------+
|IT-BS |Brescia |
|IT-BS |Brescia |
+------+------------------------------------+
|IT-CO |Como |
|IT-CO |Como |
+------+------------------------------------+
|IT-CR |Cremona |
|IT-CR |Cremona |
+------+------------------------------------+
|IT-LC |Lecco |
|IT-LC |Lecco |
+------+------------------------------------+
|IT-LO |Lodi |
|IT-LO |Lodi |
+------+------------------------------------+
|IT-MN |Mantua |
|IT-MN |Mantua |
+------+------------------------------------+
|IT-MI |Milano |
|IT-MI |Milano |
+------+------------------------------------+
|IT-MB |Monza and Brianza |
|IT-MB |Monza and Brianza |
+------+------------------------------------+
|IT-PV |Pavia |
|IT-PV |Pavia |
+------+------------------------------------+
|IT-SO |Sondrio |
|IT-SO |Sondrio |
+------+------------------------------------+
|IT-VA |Varese |
|IT-VA |Varese |
+------+------------------------------------+
|IT-AN |Ancona |
|IT-AN |Ancona |
+------+------------------------------------+
|IT-AP |Ascoli Piceno |
|IT-AP |Ascoli Piceno |
+------+------------------------------------+
|IT-FM |Fermo |
|IT-FM |Fermo |
+------+------------------------------------+
|IT-MC |Macerata |
|IT-MC |Macerata |
+------+------------------------------------+
|IT-PU |Pesaro E Urbino |
|IT-PU |Pesaro E Urbino |
+------+------------------------------------+
|IT-CB |Campobasso |
|IT-CB |Campobasso |
+------+------------------------------------+
|IT-IS |Isernia |
|IT-IS |Isernia |
+------+------------------------------------+
|IT-AL |Alessandria |
|IT-AL |Alessandria |
+------+------------------------------------+
|IT-AT |Asti |
|IT-AT |Asti |
+------+------------------------------------+
|IT-BI |Biella |
|IT-BI |Biella |
+------+------------------------------------+
|IT-CN |Cuneo |
|IT-CN |Cuneo |
+------+------------------------------------+
|IT-NO |Novara |
|IT-NO |Novara |
+------+------------------------------------+
|IT-TO |Torino |
|IT-TO |Torino |
+------+------------------------------------+
|IT-VB |Verbano-Cusio-Ossola |
|IT-VB |Verbano-Cusio-Ossola |
+------+------------------------------------+
|IT-VC |Vercelli |
|IT-VC |Vercelli |
+------+------------------------------------+
|IT-CA |Cagliari |
|IT-CA |Cagliari |
+------+------------------------------------+
|IT-CI |Carbonia-Iglesias |
|IT-CI |Carbonia-Iglesias |
+------+------------------------------------+
|IT-VS |Medio Campidano |
|IT-VS |Medio Campidano |
+------+------------------------------------+
|IT-NU |Nuoro |
|IT-NU |Nuoro |
+------+------------------------------------+
|IT-OG |Ogliastra |
|IT-OG |Ogliastra |
+------+------------------------------------+
|IT-OT |Olbia-Tempio |
|IT-OT |Olbia-Tempio |
+------+------------------------------------+
|IT-OR |Oristano |
|IT-OR |Oristano |
+------+------------------------------------+
|IT-SS |Sassari |
|IT-SS |Sassari |
+------+------------------------------------+
|IT-AG |Agrigento |
|IT-AG |Agrigento |
+------+------------------------------------+
|IT-CL |Caltanissetta |
|IT-CL |Caltanissetta |
+------+------------------------------------+
|IT-CT |Catania |
+------+------------------------------------+
|IT-EN |Enna |
+------+------------------------------------+
|IT-ME |Messina |
|IT-ME |Messina |
+------+------------------------------------+
|IT-PA |Palermo |
+------+------------------------------------+
|IT-RG |Ragusa |
+------+------------------------------------+
|IT-SR |Syracuse |
|IT-SR |Syracuse |
+------+------------------------------------+
|IT-TP |Trapani |
+------+------------------------------------+
|IT-AR |Arezzo |
|IT-AR |Arezzo |
+------+------------------------------------+
|IT-FI |Florence |
|IT-FI |Florence |
+------+------------------------------------+
|IT-GR |Grosseto |
|IT-GR |Grosseto |
+------+------------------------------------+
|IT-LI |Livorno |
|IT-LI |Livorno |
+------+------------------------------------+
|IT-LU |Lucca |
+------+------------------------------------+
|IT-MS |Massa Carrara |
|IT-MS |Massa Carrara |
+------+------------------------------------+
|IT-PI |Pisa |
+------+------------------------------------+
|IT-PT |Pistoia |
|IT-PT |Pistoia |
+------+------------------------------------+
|IT-PO |Prato |
+------+------------------------------------+
|IT-SI |Siena |
+------+------------------------------------+
|IT-BZ |Bolzano |
|IT-BZ |Bolzano |
+------+------------------------------------+
|IT-TN |Trento |
|IT-TN |Trento |
+------+------------------------------------+
|IT-PG |Perugia |
|IT-PG |Perugia |
+------+------------------------------------+
|IT-TR |Terni |
|IT-TR |Terni |
+------+------------------------------------+
|IT-AO |Aosta |
|IT-AO |Aosta |
+------+------------------------------------+
|IT-BL |Belluno |
|IT-BL |Belluno |
+------+------------------------------------+
|IT-PD |Padua |
|IT-PD |Padua |
+------+------------------------------------+
|IT-RO |Rovigo |
|IT-RO |Rovigo |
+------+------------------------------------+
|IT-TV |Treviso |
|IT-TV |Treviso |
+------+------------------------------------+
|IT-VE |Venezia |
|IT-VE |Venezia |
+------+------------------------------------+
|IT-VR |Verona |
|IT-VR |Verona |
+------+------------------------------------+
|IT-VI |Vicenza |
+------+------------------------------------+
* Japan
+-------+----------------+
| ISO | Name of region |
+=======+================+
| JP-01 | Hokkaido |
+-------+----------------+
| JP-02 | Aomori |
+-------+----------------+
| JP-03 | Iwate |
+-------+----------------+
| JP-04 | Miyagi |
+-------+----------------+
| JP-05 | Akita |
+-------+----------------+
| JP-06 | Yamagata |
+-------+----------------+
| JP-07 | Fukushima |
+-------+----------------+
| JP-08 | Ibaraki |
+-------+----------------+
| JP-09 | Tochigi |
+-------+----------------+
| JP-10 | Gunma |
+-------+----------------+
| JP-11 | Saitama |
+-------+----------------+
| JP-12 | Chiba |
+-------+----------------+
| JP-13 | Tokyo |
+-------+----------------+
| JP-14 | Kanagawa |
+-------+----------------+
| JP-15 | Niigata |
+-------+----------------+
| JP-16 | Toyama |
+-------+----------------+
| JP-17 | Ishikawa |
+-------+----------------+
| JP-18 | Fukui |
+-------+----------------+
| JP-19 | Yamanashi |
+-------+----------------+
| JP-20 | Nagano |
+-------+----------------+
| JP-21 | Gifu |
+-------+----------------+
| JP-22 | Shizuoka |
+-------+----------------+
| JP-23 | Aichi |
+-------+----------------+
| JP-24 | Mie |
+-------+----------------+
| JP-25 | Shiga |
+-------+----------------+
| JP-26 | Kyoto |
+-------+----------------+
| JP-27 | Osaka |
+-------+----------------+
| JP-28 | Hyogo |
+-------+----------------+
| JP-29 | Nara |
+-------+----------------+
| JP-30 | Wakayama |
+-------+----------------+
| JP-31 | Tottori |
+-------+----------------+
| JP-32 | Shimane |
+-------+----------------+
| JP-33 | Okayama |
+-------+----------------+
| JP-34 | Hiroshima |
+-------+----------------+
| JP-35 | Yamaguchi |
+-------+----------------+
| JP-36 | Tokushima |
+-------+----------------+
| JP-37 | Kagawa |
+-------+----------------+
| JP-38 | Ehime |
+-------+----------------+
| JP-39 | Kochi |
+-------+----------------+
| JP-40 | Fukuoka |
+-------+----------------+
| JP-41 | Saga |
+-------+----------------+
| JP-42 | Nagasaki |
+-------+----------------+
| JP-43 | Kumamoto |
+-------+----------------+
| JP-44 | Oita |
+-------+----------------+
| JP-45 | Miyazaki |
+-------+----------------+
| JP-46 | Kagoshima |
+-------+----------------+
| JP-47 | Okinawa |
+-------+----------------+
* Morocco
+-------+------------------------------+
@@ -1590,7 +1471,7 @@ List of Countries
+-------+------------------------------+
|GB-MRY | Moray |
+-------+------------------------------+
|GB-NAY | North Ayrshire |
|GB-NAY | North Ayshire |
+-------+------------------------------+
|GB-NLK | North Lanarkshire |
+-------+------------------------------+
@@ -1831,25 +1712,25 @@ List of Countries
+------+------------------------------+
Need to add a new Country?
You need to add a new Country ?
-------------------------------
To add a new country in country map tools, we need to follow the following steps :
To add a new country in country map tools, we need follow next steps :
1. You need shapefiles which contain data of your map.
You can get this file on this site: http://www.diva-gis.org/gdata
1. You need shapfiles why contains data of your map.
You can get this file in this site : http://www.diva-gis.org/gdata
2. You need to add ISO 3166-2 with column name ISO for all record in your file.
It's important because it's a norm for mapping your data with geojson file
It's important because, it's a norm for mapping your data with geojson file
3. You need to convert shapefile to geojson file.
This action can make with ogr2ogr tools: http://www.gdal.org/ogr2ogr.html
3. You need to convert shapfile to geojson file.
This action can make with ogr2ogr tools : http://www.gdal.org/ogr2ogr.html
4. Put your geojson file in next folder : superset/assets/src/visualizations/CountryMap/countries with the next name : nameofyourcountries.geojson
4. Put your geojson file in next folder : superset/assets/visualizations/countries with the next name : nameofyourcountries.geojson
5. You can to reduce size of geojson file on this site: http://mapshaper.org/
5. You can to reduce size of geojson file ont this site : http://mapshaper.org/
6. Go in file superset/assets/src/explore/controls.jsx
6. Go in file superset/assets/javascripts/explorev2/stores/controls.jsx
7. Add your country in component 'select_country'
Example :
@@ -1868,7 +1749,6 @@ To add a new country in country map tools, we need to follow the following steps
'France',
'Germany',
'Italy',
'Japan',
'Morocco',
'Netherlands',
'Russia',

View File

@@ -1,19 +1,3 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# requires github-changes, run
# `npm install -g github-changes`
# requires $GITHUB_TOKEN to be set

View File

@@ -1,37 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@@ -1,25 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: superset
maintainers:
- name: Chuan-Yen Chiang
email: cychiang0823@gmail.com
url: https://github.com/cychiang
version: 0.1.0

View File

@@ -1,37 +0,0 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "superset.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "superset.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "superset.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "superset.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}

View File

@@ -1,50 +0,0 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "superset.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "superset.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "superset.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@@ -1,27 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: v1
kind: ConfigMap
metadata:
name: superset-configmap
labels:
app: {{ template "superset.name" . }}
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{ (.Files.Glob "config/*").AsConfig | indent 2 }}

View File

@@ -1,66 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "superset.fullname" . }}
labels:
app: {{ template "superset.name" . }}
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "superset.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "superset.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: superset-config
mountPath: /etc/superset/
ports:
- name: http
containerPort: 8088
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: "superset-config"
configMap:
name: superset-configmap

View File

@@ -1,54 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "superset.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "superset.name" . }}
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}

View File

@@ -1,35 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: v1
kind: Service
metadata:
name: {{ template "superset.fullname" . }}
labels:
app: {{ template "superset.name" . }}
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "superset.name" . }}
release: {{ .Release.Name }}

View File

@@ -1,62 +0,0 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Default values for superset.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: amancevice/superset
tag: latest
pullPolicy: IfNotPresent
service:
type: NodePort
port: 8088
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- chart-example.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}

View File

@@ -1,22 +0,0 @@
Copyright (c) 2012 Tyler Kellen, contributors
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,395 +0,0 @@
Attribution 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution 4.0 International Public License ("Public License"). To the
extent this Public License may be interpreted as a contract, You are
granted the Licensed Rights in consideration of Your acceptance of
these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the
Licensed Material available under these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
i. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.

View File

@@ -1,26 +0,0 @@
Copyright (c) 2012, Kai Chang
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name Kai Chang may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,24 +1,7 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# first bump up package.json manually, commit and tag
rm superset/assets/dist/*
cd superset/assets/
npm run build
cd ../..
python setup.py sdist
echo "RUN: twine upload dist/superset-{VERSION}.tar.gz"
python setup.py sdist upload

View File

@@ -1,34 +1,8 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
console_log==0.2.10
flake8-commas==2.0.0
flake8-import-order==0.18
flake8-quotes==1.0.0
flake8==3.6.0
flask-cors==3.0.6
flask-cors==3.0.3
ipdb==0.11
mysqlclient==1.3.13
pip-tools==3.1.0
psycopg2-binary==2.7.5
pycodestyle==2.4.0
pyhive==0.6.1
pylint==1.9.2
python-dotenv==0.10.1
mysqlclient==1.3.12
psycopg2==2.7.4
redis==2.10.6
statsd==3.3.0
thrift==0.11.0
tox==3.5.3
statsd==3.2.2
tox==2.9.1
console_log==0.2.10

View File

@@ -1,73 +1,39 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file requirements.txt setup.py
#
alembic==1.0.0 # via flask-migrate
amqp==2.3.2 # via kombu
asn1crypto==0.24.0 # via cryptography
babel==2.6.0 # via flask-babel
billiard==3.5.0.4 # via celery
bleach==3.0.2
celery==4.2.0
certifi==2018.8.24 # via requests
cffi==1.11.5 # via cryptography
chardet==3.0.4 # via requests
click==6.7
bleach==2.1.2
boto3==1.4.7
celery==4.1.0
colorama==0.3.9
contextlib2==0.5.5
croniter==0.3.26
cryptography==2.4.2
decorator==4.3.0 # via retry
defusedxml==0.5.0 # via python3-openid
flask-appbuilder==1.12.1
flask-babel==0.11.1 # via flask-appbuilder
flask-caching==1.4.0
cryptography==1.9
flask==0.12.2
flask-appbuilder==1.10.0
flask-cache==0.13.1
flask-compress==1.4.0
flask-login==0.4.1 # via flask-appbuilder
flask-migrate==2.1.1
flask-openid==1.2.5 # via flask-appbuilder
flask-sqlalchemy==2.3.2 # via flask-appbuilder, flask-migrate
flask-script==2.0.6
flask-testing==0.7.1
flask-wtf==0.14.2
flask==1.0.2
flower==0.9.2
future==0.16.0
geopy==1.11.0
gunicorn==19.8.0
gunicorn==19.7.1
humanize==0.5.1
idna==2.6
isodate==0.6.0
itsdangerous==0.24 # via flask
jinja2==2.10 # via flask, flask-babel
kombu==4.2.1 # via celery
mako==1.0.7 # via alembic
markdown==3.0
markupsafe==1.0 # via jinja2, mako
numpy==1.15.2 # via pandas
pandas==0.23.4
markdown==2.6.11
pandas==0.22.0
parsedatetime==2.0.0
pathlib2==2.3.0
polyline==1.3.2
py==1.7.0 # via retry
pycparser==2.19 # via cffi
pydruid==0.5.0
pydruid==0.4.1
pyhive==0.5.0
python-dateutil==2.6.1
python-editor==1.0.3 # via alembic
python-geohash==0.8.5
python3-openid==3.1.0 # via flask-openid
pytz==2018.5 # via babel, celery, pandas
pyyaml==3.13
requests==2.20.0
retry==0.9.2
selenium==3.141.0
simplejson==3.15.0
six==1.11.0 # via bleach, cryptography, isodate, pathlib2, polyline, pydruid, python-dateutil, sqlalchemy-utils, wtforms-json
sqlalchemy-utils==0.32.21
pyyaml==3.12
requests==2.18.4
simplejson==3.13.2
six==1.11.0
sqlalchemy==1.2.2
sqlalchemy-utils==0.32.21
sqlparse==0.2.4
thrift==0.11.0
thrift-sasl==0.3.0
unicodecsv==0.14.1
urllib3==1.22 # via requests, selenium
vine==1.1.4 # via amqp
webencodings==0.5.1 # via bleach
werkzeug==0.14.1 # via flask
wtforms-json==0.3.3
wtforms==2.2.1 # via flask-wtf, wtforms-json
unidecode==1.0.22

View File

@@ -1,107 +0,0 @@
#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
acquire_rat_jar () {
URL="http://repo1.maven.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar"
JAR="$rat_jar"
# Download rat launch jar if it hasn't been downloaded yet
if [ ! -f "$JAR" ]; then
# Download
printf "Attempting to fetch rat\n"
JAR_DL="${JAR}.part"
if [ $(command -v curl) ]; then
curl -L --silent "${URL}" > "$JAR_DL" && mv "$JAR_DL" "$JAR"
elif [ $(command -v wget) ]; then
wget --quiet ${URL} -O "$JAR_DL" && mv "$JAR_DL" "$JAR"
else
printf "You do not have curl or wget installed, please install rat manually.\n"
exit -1
fi
fi
unzip -tq "$JAR" &> /dev/null
if [ $? -ne 0 ]; then
# We failed to download
rm "$JAR"
printf "Our attempt to download rat locally to ${JAR} failed. Please install rat manually.\n"
exit -1
fi
printf "Done downloading.\n"
}
# Go to the project root directory
FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
cd "$FWDIR"
TMP_DIR=/tmp
if test -x "$JAVA_HOME/bin/java"; then
declare java_cmd="$JAVA_HOME/bin/java"
else
declare java_cmd=java
fi
export RAT_VERSION=0.13
export rat_jar="${TMP_DIR}"/lib/apache-rat-${RAT_VERSION}.jar
mkdir -p ${TMP_DIR}/lib
[[ -f "$rat_jar" ]] || acquire_rat_jar || {
echo "Download failed. Obtain the rat jar manually and place it at $rat_jar"
exit 1
}
# This is the target of a symlink in superset/assets/docs - and rat exclude doesn't cope with the symlink target doesn't exist
mkdir -p docs/_build/html/
echo "Running license checks. This can take a while."
echo "$FWDIR"/.rat-excludes
$java_cmd -jar "$rat_jar" -E "$FWDIR"/.rat-excludes -d "$FWDIR" > rat-results.txt
if [ $? -ne 0 ]; then
echo "RAT exited abnormally"
exit 1
fi
ERRORS="$(cat rat-results.txt | grep -e "??")"
if test ! -z "$ERRORS"; then
echo >&2 "Could not find Apache license headers in the following files:"
echo >&2 "$ERRORS"
COUNT=`echo "${ERRORS}" | wc -l`
if [ ! -f ${TRAVIS_CACHE}/rat-error-count-builds ]; then
[ "${TRAVIS_PULL_REQUEST}" = "false" ] && echo ${COUNT} > ${TRAVIS_CACHE}/rat-error-count-builds
OLD_COUNT=${COUNT}
else
typeset -i OLD_COUNT=$(cat ${TRAVIS_CACHE}/rat-error-count-builds)
fi
if [ ${COUNT} -gt ${OLD_COUNT} ]; then
echo "New missing licenses (${COUNT} vs ${OLD_COUNT}) detected. Please correct them by adding them to to header of your files"
exit 1
else
[ "${TRAVIS_PULL_REQUEST}" = "false" ] && echo ${COUNT} > ${TRAVIS_CACHE}/rat-error-count-builds
fi
exit 0
else
echo -e "RAT checks passed."
fi

View File

@@ -1,19 +1,9 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from collections import defaultdict
from superset import sm

View File

@@ -1,25 +1,9 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
[metadata]
name = Superset
summary = a data exploration platform
description-file = README.md
author = Apache Superset Dev
author-email = dev@superset.incubator.apache.org
author = Maxime Beauchemin
author-email = maximebeauchemin@gmail.com
license = Apache License, Version 2.0
[files]

101
setup.py
View File

@@ -1,44 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import io
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import json
import os
import subprocess
import sys
from setuptools import find_packages, setup
if sys.version_info < (3, 6):
sys.exit('Sorry, Python < 3.6 is not supported')
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
PACKAGE_DIR = os.path.join(BASE_DIR, 'superset', 'static', 'assets')
PACKAGE_FILE = os.path.join(PACKAGE_DIR, 'package.json')
with open(PACKAGE_FILE) as package_file:
version_string = json.load(package_file)['version']
with io.open('README.md', encoding='utf-8') as f:
long_description = f.read()
def get_git_sha():
try:
s = subprocess.check_output(['git', 'rev-parse', 'HEAD'])
return s.decode().strip()
s = str(subprocess.check_output(['git', 'rev-parse', 'HEAD']))
return s.strip()
except Exception:
return ''
@@ -58,73 +40,70 @@ with open(os.path.join(PACKAGE_DIR, 'version_info.json'), 'w') as version_file:
setup(
name='apache-superset',
name='superset',
description=(
'A modern, enterprise-ready business intelligence web application'),
long_description=long_description,
long_description_content_type='text/markdown',
'A interactive data visualization platform build on SqlAlchemy '
'and druid.io'),
version=version_string,
packages=find_packages(),
include_package_data=True,
zip_safe=False,
scripts=['superset/bin/superset'],
install_requires=[
'bleach>=3.0.2, <4.0.0',
'celery>=4.2.0, <5.0.0',
'click>=6.0, <7.0.0', # click >=7 forces "-" instead of "_"
'bleach',
'boto3>=1.4.6',
'celery',
'colorama',
'contextlib2',
'croniter>=0.3.26',
'cryptography>=2.4.2',
'flask>=1.0.0, <2.0.0',
'flask-appbuilder>=1.12.1, <2.0.0',
'flask-caching',
'cryptography',
'flask',
'flask-appbuilder',
'flask-cache',
'flask-compress',
'flask-migrate',
'flask-script',
'flask-testing',
'flask-wtf',
'flower', # deprecated
'future>=0.16.0, <0.17',
'geopy',
'gunicorn', # deprecated
'humanize',
'idna',
'isodate',
'markdown>=3.0',
'pandas>=0.18.0',
'markdown',
'pandas',
'parsedatetime',
'pathlib2',
'polyline',
'pydruid>=0.4.3',
'pydruid',
'pyhive>=0.4.0',
'python-dateutil',
'python-geohash',
'pyyaml>=3.13',
'requests>=2.20.0',
'retry>=0.9.2',
'selenium>=3.141.0',
'simplejson>=3.15.0',
'pyyaml>=3.11',
'requests',
'simplejson',
'six',
'sqlalchemy',
'sqlalchemy-utils',
'sqlparse',
'thrift>=0.9.3',
'thrift-sasl>=0.2.1',
'unicodecsv',
'wtforms-json',
'unidecode>=0.04.21',
],
extras_require={
'cors': ['flask-cors>=2.0.0'],
'console_log': ['console_log==0.2.10'],
'hive': [
'pyhive>=0.4.0',
'tableschema',
'thrift-sasl>=0.2.1',
'thrift>=0.9.3',
],
'presto': ['pyhive>=0.4.0'],
'gsheets': ['gsheetsdb>=0.1.9'],
},
author='Apache Software Foundation',
author_email='dev@superset.incubator.apache.org',
url='http://superset.apache.org/',
author='Maxime Beauchemin',
author_email='maximebeauchemin@gmail.com',
url='https://github.com/apache/incubator-superset',
download_url=(
'https://dist.apache.org/repos/dist/release/superset/' + version_string
'https://github.com'
'/apache/incubator-superset/tarball/' + version_string
),
classifiers=[
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
)

View File

@@ -1,21 +1,10 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# pylint: disable=C,R,W
# -*- coding: utf-8 -*-
"""Package's main module!"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import json
import logging
from logging.handlers import TimedRotatingFileHandler
@@ -28,15 +17,10 @@ from flask_compress import Compress
from flask_migrate import Migrate
from flask_wtf.csrf import CSRFProtect
from werkzeug.contrib.fixers import ProxyFix
import wtforms_json
from superset import config
from superset import config, utils
from superset.connectors.connector_registry import ConnectorRegistry
from superset.security import SupersetSecurityManager
from superset.utils.core import (
get_update_perms_flag, pessimistic_connection_handling, setup_cache)
wtforms_json.init()
APP_DIR = os.path.dirname(__file__)
CONFIG_MODULE = os.environ.get('SUPERSET_CONFIG', 'superset.config')
@@ -62,46 +46,23 @@ def parse_manifest_json():
global manifest
try:
with open(MANIFEST_FILE, 'r') as f:
# the manifest inclues non-entry files
# we only need entries in templates
full_manifest = json.load(f)
manifest = full_manifest.get('entrypoints', {})
manifest = json.load(f)
except Exception:
pass
def get_js_manifest_files(filename):
def get_manifest_file(filename):
if app.debug:
parse_manifest_json()
entry_files = manifest.get(filename, {})
return entry_files.get('js', [])
def get_css_manifest_files(filename):
if app.debug:
parse_manifest_json()
entry_files = manifest.get(filename, {})
return entry_files.get('css', [])
def get_unloaded_chunks(files, loaded_chunks):
filtered_files = [f for f in files if f not in loaded_chunks]
for f in filtered_files:
loaded_chunks.add(f)
return filtered_files
return '/static/assets/dist/' + manifest.get(filename, '')
parse_manifest_json()
@app.context_processor
def get_manifest():
return dict(
loaded_chunks=set(),
get_unloaded_chunks=get_unloaded_chunks,
js_manifest=get_js_manifest_files,
css_manifest=get_css_manifest_files,
)
def get_js_manifest():
return dict(js_manifest=get_manifest_file)
#################################################################
@@ -118,11 +79,11 @@ if conf.get('SILENCE_FAB'):
logging.getLogger('flask_appbuilder').setLevel(logging.ERROR)
if app.debug:
app.logger.setLevel(logging.DEBUG) # pylint: disable=no-member
app.logger.setLevel(logging.DEBUG)
else:
# In production mode, add log handler to sys.stderr.
app.logger.addHandler(logging.StreamHandler()) # pylint: disable=no-member
app.logger.setLevel(logging.INFO) # pylint: disable=no-member
app.logger.addHandler(logging.StreamHandler())
app.logger.setLevel(logging.INFO)
logging.getLogger('pyhive.presto').setLevel(logging.INFO)
db = SQLA(app)
@@ -133,10 +94,10 @@ if conf.get('WTF_CSRF_ENABLED'):
for ex in csrf_exempt_list:
csrf.exempt(ex)
pessimistic_connection_handling(db.engine)
utils.pessimistic_connection_handling(db.engine)
cache = setup_cache(app, conf.get('CACHE_CONFIG'))
tables_cache = setup_cache(app, conf.get('TABLE_NAMES_CACHE_CONFIG'))
cache = utils.setup_cache(app, conf.get('CACHE_CONFIG'))
tables_cache = utils.setup_cache(app, conf.get('TABLE_NAMES_CACHE_CONFIG'))
migrate = Migrate(app, db, directory=APP_DIR + '/migrations')
@@ -204,7 +165,7 @@ appbuilder = AppBuilder(
base_template='superset/base.html',
indexview=MyIndexView,
security_manager_class=custom_sm,
update_perms=get_update_perms_flag(),
update_perms=utils.get_update_perms_flag(),
)
security_manager = appbuilder.sm

View File

@@ -1,29 +1,3 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
{
"presets" : ["airbnb", "@babel/preset-react", "@babel/preset-env"],
"plugins": ["lodash", "syntax-dynamic-import", "react-hot-loader/babel"],
"env": {
"test": {
"plugins": [
"babel-plugin-dynamic-import-node"
]
}
}
"presets" : ["airbnb"],
}

View File

@@ -1,19 +1,3 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
**/*{.,-}min.js
**/*.sh
coverage/**
@@ -24,4 +8,3 @@ node_modules*/*
stylesheets/*
vendor/*
docs/*
src/dashboard/deprecated/*

View File

@@ -1,31 +1,12 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
{
"extends": "airbnb",
"parser": "babel-eslint",
"parserOptions": {
"parserOptions":{
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
},
"env": {
"browser": true
"globals": {
"document": true,
},
"rules": {
"prefer-template": 0,
@@ -36,6 +17,7 @@
"func-names": 0,
"react/jsx-no-bind": 0,
"no-confusing-arrow": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/anchor-has-content": 0,
"react/require-default-props": 0,
@@ -43,6 +25,7 @@
"no-mixed-operators": 0,
"no-continue": 0,
"no-bitwise": 0,
"no-undef": 0,
"no-multi-assign": 0,
"react/no-array-index-key": 0,
"no-restricted-properties": 0,
@@ -58,9 +41,5 @@
"indent": 0,
"no-multi-spaces": 0,
"padded-blocks": 0,
"import/extensions": [".js", ".jsx", ".ts", ".tsx", ".json"]
},
"settings": {
"import/resolver": "webpack"
}
}

View File

@@ -0,0 +1,54 @@
verbose: true
instrumentation:
root: './javascripts'
extensions: ['.js', '.jsx']
excludes: [
'dist/**'
]
embed-source: false
variable: __coverage__
compact: true
preserve-comments: false
complete-copy: false
save-baseline: true
baseline-file: ./coverage/coverage-baseline.json
include-all-sources: true
include-pid: false
es-modules: true
reporting:
print: summary
reports:
- lcov
dir: ./coverage
watermarks:
statements: [50, 80]
lines: [50, 80]
functions: [50, 80]
branches: [50, 80]
report-config:
clover: {file: clover.xml}
cobertura: {file: cobertura-coverage.xml}
json: {file: coverage-final.json}
json-summary: {file: coverage-summary.json}
lcovonly: {file: lcov.info}
teamcity: {file: null, blockName: Code Coverage Summary}
text: {file: null, maxCols: 0}
text-lcov: {file: lcov.info}
text-summary: {file: null}
hooks:
hook-run-in-context: false
post-require-hook: null
handle-sigint: false
check:
global:
statements: 0
lines: 0
branches: 0
functions: 0
excludes: []
each:
statements: 0
lines: 0
branches: 0
functions: 0
excludes: []

File diff suppressed because it is too large Load Diff

View File

@@ -1,22 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<?xml version="1.0" encoding="UTF-8"?>
<svg width="210px" height="202px" viewBox="0 0 210 202" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>Full Lockup With Text</title>

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -1,22 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<?xml version="1.0" encoding="UTF-8"?>
<svg width="210px" height="146px" viewBox="0 0 210 146" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>Full Lockup Without Text@1x</title>

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -1,22 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<?xml version="1.0" encoding="UTF-8"?>
<svg width="350px" height="66px" viewBox="0 0 350 66" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>Horizontal</title>

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -1,22 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<?xml version="1.0" encoding="UTF-8"?>
<svg width="123px" height="66px" viewBox="0 0 123 66" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>Solo Mark@1x</title>

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<rect width="100" height="50" fill="black" fill-opacity="0"/>
<rect width="100" height="50" fill="black" fill-opacity="0"/>
<rect width="100" height="50" fill="black" fill-opacity="0"/>
<rect width="100" height="50" fill="black" fill-opacity="0"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.7993 37.0619C57.4296 45.6872 65.194 50 74.2971 50C89.1563 50 100 39.4878 100 25.0675C100 10.6468 89.1563 0 74.2971 0C65.7296 0 57.8315 4.85181 50.2007 13.3423C42.704 4.71695 34.6718 0 25.7029 0C10.8433 0 0 10.6468 0 25.0675C0 39.4878 10.8433 50 25.7029 50C34.806 50 41.9011 45.6872 49.7993 37.0619ZM25.9704 15.3638C31.3252 15.3638 35.6093 19.6766 40.2944 25.4716C35.8767 30.8625 31.1915 34.9056 25.9704 34.9056C19.6785 34.9056 15.9304 30.7276 15.9304 25.2021C15.9304 19.6766 19.6785 15.3638 25.9704 15.3638ZM59.7055 25.2021C64.3911 30.7276 68.8085 34.9056 74.0296 34.9056C80.3214 34.9056 84.0698 30.7276 84.0698 25.2021C84.0698 19.6766 80.3214 15.3638 74.0296 15.3638C68.6748 15.3638 64.5248 19.4068 59.7055 25.2021Z" fill="url(#paint0_linear)"/>
<defs>
<linearGradient id="paint0_linear" x1="0" y1="50" x2="100" y2="7.45058e-07" gradientUnits="userSpaceOnUse">
<stop stop-color="#872675"/>
<stop offset="0.256722" stop-color="#AF2052"/>
<stop offset="0.515346" stop-color="#CB2137"/>
<stop offset="0.759838" stop-color="#E1612A"/>
<stop offset="1" stop-color="#E97826"/>
</linearGradient>
</defs>
</svg>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1,10 +0,0 @@
{
"baseUrl": "http://localhost:8081",
"videoUploadOnPasses": false,
"video": false,
"ignoreTestFiles": ["**/!(*.test.js)"],
"projectId": "fbf96q",
"defaultCommandTimeout": 10000,
"viewportWidth": 1280,
"viewportHeight": 800
}

View File

@@ -1,8 +0,0 @@
{
"plugins": [
"cypress"
],
"env": {
"cypress/globals": true
}
}

View File

@@ -1,103 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper';
import readResponseBlob from '../../utils/readResponseBlob';
export default () => describe('top-level controls', () => {
const sliceRequests = [];
const forceRefreshRequests = [];
let mapId;
beforeEach(() => {
cy.server();
cy.login();
cy.visit(WORLD_HEALTH_DASHBOARD);
cy.get('#app').then((data) => {
const bootstrapData = JSON.parse(data[0].dataset.bootstrap);
const dashboard = bootstrapData.dashboard_data;
const sliceIds = dashboard.slices.map(slice => (slice.slice_id));
mapId = dashboard.slices.find(slice => (slice.form_data.viz_type === 'world_map')).slice_id;
sliceIds
.forEach((id) => {
const sliceRequest = `getJson_${id}`;
sliceRequests.push(`@${sliceRequest}`);
cy.route('POST', `/superset/explore_json/?form_data={"slice_id":${id}}`).as(sliceRequest);
const forceRefresh = `getJson_${id}_force`;
forceRefreshRequests.push(`@${forceRefresh}`);
cy.route('POST', `/superset/explore_json/?form_data={"slice_id":${id}}&force=true`).as(forceRefresh);
});
});
});
afterEach(() => {
sliceRequests.length = 0;
forceRefreshRequests.length = 0;
});
it('should allow chart level refresh', () => {
cy.wait(sliceRequests);
cy.get('.grid-container .world_map').should('be.exist');
cy.get(`#slice_${mapId}-controls`).click();
cy.get(`#slice_${mapId}-controls`).next()
.find('.refresh-tooltip').trigger('click', { force: true });
// not allow dashboard level force refresh when any chart is loading
cy.get('#save-dash-split-button').trigger('click', { forece: true });
cy.contains('Force refresh dashboard').parent().should('have.class', 'disabled');
// not allow chart level force refresh when it is loading
cy.get(`#slice_${mapId}-controls`).next()
.find('.refresh-tooltip')
.parent()
.parent()
.should('have.class', 'disabled');
cy.wait(`@getJson_${mapId}_force`);
cy.get('#save-dash-split-button').trigger('click');
cy.contains('Force refresh dashboard').parent().not('have.class', 'disabled');
});
it('should allow dashboard level force refresh', () => {
// when charts are not start loading, for example, under a secondary tab,
// should allow force refresh
cy.get('#save-dash-split-button').trigger('click');
cy.contains('Force refresh dashboard').parent().not('have.class', 'disabled');
// wait the all dash finish loading.
cy.wait(sliceRequests);
cy.get('#save-dash-split-button').trigger('click');
cy.contains('Force refresh dashboard').trigger('click', { force: true });
cy.get('#save-dash-split-button').trigger('click');
cy.contains('Force refresh dashboard').parent().should('have.class', 'disabled');
// wait all charts force refreshed
cy.wait(forceRefreshRequests).then((xhrs) => {
// is_cached in response should be false
xhrs.forEach((xhr) => {
readResponseBlob(xhr.response.body).then((responseBody) => {
expect(responseBody.is_cached).to.equal(false);
});
});
});
cy.get('#save-dash-split-button').trigger('click');
cy.contains('Force refresh dashboard').parent().not('have.class', 'disabled');
});
});

View File

@@ -1,22 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
export const WORLD_HEALTH_DASHBOARD = '/superset/dashboard/world_health';
export const CHECK_DASHBOARD_FAVORITE_ENDPOINT = '/superset/favstar/Dashboard/*/count';

View File

@@ -1,80 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper';
export default () => describe('edit mode', () => {
beforeEach(() => {
cy.server();
cy.login();
cy.visit(WORLD_HEALTH_DASHBOARD);
cy.get('#app').then((data) => {
const bootstrapData = JSON.parse(data[0].dataset.bootstrap);
const dashboard = bootstrapData.dashboard_data;
const boxplotChartId = dashboard.slices.find(slice => (slice.form_data.viz_type === 'box_plot')).slice_id;
const boxplotRequest = `/superset/explore_json/?form_data={"slice_id":${boxplotChartId}}`;
cy.route('POST', boxplotRequest).as('boxplotRequest');
});
cy.get('.dashboard-header').contains('Edit dashboard').click();
});
it('remove, and add chart flow', () => {
// wait box_plot data and find box plot
cy.wait('@boxplotRequest');
cy.get('.grid-container .box_plot').should('be.exist');
cy.get('.fa.fa-trash').last().then(($el) => {
cy.wrap($el).invoke('show').click();
// box plot should be gone
cy.get('.grid-container .box_plot').should('not.exist');
});
// open charts list
cy.get('.component-layer').contains('Your charts & filters').click();
// find box plot is available from list
cy.get('.slices-layer').find('.chart-card-container').contains('Box plot');
// drag-n-drop
const dataTransfer = { data: {} };
cy.get('.dragdroppable').contains('Box plot')
.trigger('mousedown', { which: 1 })
.trigger('dragstart', { dataTransfer })
.trigger('drag', {});
cy.get('.grid-content .dragdroppable').last()
.trigger('dragover', { dataTransfer })
.trigger('drop', { dataTransfer })
.trigger('dragend', { dataTransfer })
.trigger('mouseup', { which: 1 });
// add back to dashboard
cy.get('.grid-container .box_plot').should('be.exist');
// should show Save changes button
cy.get('.dashboard-header .button-container').contains('Save changes');
// undo 2 steps
cy.get('.dashboard-header .undo-action').click().click();
// no changes, can switch to view mode
cy.get('.dashboard-header .button-container').contains('Switch to view mode').click();
});
});

View File

@@ -1,53 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { WORLD_HEALTH_DASHBOARD, CHECK_DASHBOARD_FAVORITE_ENDPOINT } from './dashboard.helper';
export default () => describe('favorite dashboard', () => {
let isFavoriteDashboard = false;
beforeEach(() => {
cy.server();
cy.login();
cy.route(CHECK_DASHBOARD_FAVORITE_ENDPOINT).as('countFavStar');
cy.visit(WORLD_HEALTH_DASHBOARD);
cy.wait('@countFavStar').then((xhr) => {
isFavoriteDashboard = xhr.response.body.count === 1;
});
});
it('should allow favor/unfavor', () => {
if (!isFavoriteDashboard) {
cy.get('.favstar').find('i').should('have.class', 'fa-star-o');
cy.get('.favstar').trigger('click');
cy.get('.favstar').find('i').should('have.class', 'fa-star')
.and('not.have.class', 'fa-star-o');
} else {
cy.get('.favstar').find('i').should('have.class', 'fa-star')
.and('not.have.class', 'fa-star-o');
cy.get('.favstar').trigger('click');
cy.get('.fave-unfave-icon').find('i').should('have.class', 'fa-star-o')
.and('not.have.class', 'fa-star');
}
// reset to original fav state
cy.get('.favstar').trigger('click');
});
});

View File

@@ -1,69 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper';
export default () => describe('dashboard filter', () => {
let sliceIds = [];
let filterId;
beforeEach(() => {
cy.server();
cy.login();
cy.visit(WORLD_HEALTH_DASHBOARD);
cy.get('#app').then((data) => {
const bootstrapData = JSON.parse(data[0].dataset.bootstrap);
const dashboard = bootstrapData.dashboard_data;
sliceIds = dashboard.slices.map(slice => (slice.slice_id));
filterId = dashboard.slices.find(slice => (slice.form_data.viz_type === 'filter_box')).slice_id;
});
});
it('should apply filter', () => {
const aliases = [];
const filterRoute = `/superset/explore_json/?form_data={"slice_id":${filterId}}`;
cy.route('POST', filterRoute).as('fetchFilter');
cy.wait('@fetchFilter');
sliceIds
.filter(id => (parseInt(id, 10) !== filterId))
.forEach((id) => {
const alias = `getJson_${id}`;
aliases.push(`@${alias}`);
cy.route('POST', `/superset/explore_json/?form_data={"slice_id":${id}}`).as(alias);
});
// select filter_box and apply
cy.get('.Select-control')
.first().find('input')
.first()
.type('South Asia{enter}', { force: true });
cy.wait(aliases).then((requests) => {
requests.forEach((xhr) => {
const requestFormData = xhr.request.body;
const requestParams = JSON.parse(requestFormData.get('form_data'));
expect(requestParams.extra_filters[0])
.deep.eq({ col: 'region', op: 'in', val: ['South Asia'] });
});
});
});
});

View File

@@ -1,33 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import DashboardControlsTest from './controls';
import DashboardEditModeTest from './edit_mode';
import DashboardFavStarTest from './fav_star';
import DashboardFilterTest from './filter';
import DashboardLoadTest from './load';
import DashboardSaveTest from './save';
describe('Dashboard', () => {
DashboardControlsTest();
DashboardEditModeTest();
DashboardFavStarTest();
DashboardFilterTest();
DashboardLoadTest();
DashboardSaveTest();
});

View File

@@ -1,54 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import readResponseBlob from '../../utils/readResponseBlob';
import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper';
export default () => describe('load', () => {
const aliases = [];
beforeEach(() => {
cy.server();
cy.login();
cy.visit(WORLD_HEALTH_DASHBOARD);
cy.get('#app').then((data) => {
const bootstrapData = JSON.parse(data[0].dataset.bootstrap);
const slices = bootstrapData.dashboard_data.slices;
// then define routes and create alias for each requests
slices.forEach((slice) => {
const alias = `getJson_${slice.slice_id}`;
cy.route('POST', `/superset/explore_json/?form_data={"slice_id":${slice.slice_id}}`).as(alias);
aliases.push(`@${alias}`);
});
});
});
it('should load dashboard', () => {
// wait and verify one-by-one
cy.wait(aliases).then((requests) => {
requests.forEach(async (xhr) => {
expect(xhr.status).to.eq(200);
const responseBody = await readResponseBlob(xhr.response.body);
expect(responseBody).to.have.property('error', null);
cy.get(`#slice-container-${xhr.response.body.form_data.slice_id}`);
});
});
});
});

View File

@@ -1,77 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import readResponseBlob from '../../utils/readResponseBlob';
import { WORLD_HEALTH_DASHBOARD } from './dashboard.helper';
export default () => describe('save', () => {
let dashboardId;
let boxplotChartId;
beforeEach(() => {
cy.server();
cy.login();
cy.visit(WORLD_HEALTH_DASHBOARD);
cy.get('#app').then((data) => {
const bootstrapData = JSON.parse(data[0].dataset.bootstrap);
const dashboard = bootstrapData.dashboard_data;
dashboardId = dashboard.id;
boxplotChartId = dashboard.slices.find(slice => (slice.form_data.viz_type === 'box_plot')).slice_id;
cy.route('POST', `/superset/copy_dash/${dashboardId}/`).as('copyRequest');
});
cy.get('#save-dash-split-button').trigger('click', { force: true });
cy.contains('Save as').trigger('click', { force: true });
cy.get('.modal-footer').contains('Save').trigger('click', { force: true });
});
it('should save as new dashboard', () => {
cy.wait('@copyRequest').then((xhr) => {
expect(xhr.status).to.eq(200);
readResponseBlob(xhr.response.body).then((json) => {
expect(json.id).to.be.gt(dashboardId);
});
});
});
it('should save/overwrite dashboard', () => {
cy.wait('@copyRequest');
// should have box_plot chart
const boxplotRequest = `/superset/explore_json/?form_data={"slice_id":${boxplotChartId}}`;
cy.route('POST', boxplotRequest).as('boxplotRequest');
cy.wait('@boxplotRequest');
cy.get('.grid-container .box_plot').should('be.exist');
// remove box_plot chart from dashboard
cy.get('.dashboard-header').contains('Edit dashboard').trigger('click', { force: true });
cy.get('.fa.fa-trash').last().trigger('click', { force: true });
cy.get('.grid-container .box_plot').should('not.exist');
cy.route('POST', '/superset/save_dash/**/').as('saveRequest');
cy.get('.dashboard-header').contains('Save changes').trigger('click', { force: true });
// go back to view mode
cy.wait('@saveRequest');
cy.get('.dashboard-header').contains('Edit dashboard');
cy.get('.grid-container .box_plot').should('not.exist');
});
});

View File

@@ -1,57 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { FORM_DATA_DEFAULTS, NUM_METRIC } from './visualizations/shared.helper';
import readResponseBlob from '../../utils/readResponseBlob';
describe('Error', () => {
beforeEach(() => {
cy.login();
cy.server();
cy.route('POST', '/superset/explore_json/**').as('getJson');
});
it('No data error message shows up', () => {
const formData = {
...FORM_DATA_DEFAULTS,
metrics: [NUM_METRIC],
viz_type: 'line',
adhoc_filters: [{
expressionType: 'SIMPLE',
subject: 'state',
operator: 'in',
comparator: ['Fake State'],
clause: 'WHERE',
sqlExpression: null,
fromFormData: true,
}],
};
cy.visitChartByParams(JSON.stringify(formData));
cy.wait('@getJson').then(async (xhr) => {
expect(xhr.status).to.eq(400);
const responseBody = await readResponseBlob(xhr.response.body);
if (responseBody.error) {
expect(responseBody.error).to.eq('No data');
}
});
cy.get('div.alert').contains('No data');
});
});

View File

@@ -1,322 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// ***********************************************
// Tests for setting controls in the UI
// ***********************************************
import { FORM_DATA_DEFAULTS, NUM_METRIC } from './visualizations/shared.helper';
describe('Groupby', () => {
it('Set groupby', () => {
cy.server();
cy.login();
cy.route('POST', '/superset/explore_json/**').as('getJson');
cy.visitChartByName('Num Births Trend');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=groupby]').within(() => {
cy.get('.Select-control').click();
cy.get('input.select-input').type('state', { force: true });
cy.get('.VirtualizedSelectFocusedOption').click();
});
cy.get('button.query').click();
cy.verifySliceSuccess({ waitAlias: '@getJson', chartSelector: 'svg' });
});
});
describe('AdhocMetrics', () => {
beforeEach(() => {
cy.login();
cy.server();
cy.route('POST', '/superset/explore_json/**').as('getJson');
});
it('Clear metric and set simple adhoc metric', () => {
const metricName = 'Girl Births';
cy.visitChartByName('Num Births Trend');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=metrics]').within(() => {
cy.get('.select-clear').click();
cy.get('.Select-control').click({ force: true });
cy.get('input').type('sum_girls', { force: true });
cy.get('.VirtualizedSelectFocusedOption')
.trigger('mousedown')
.click();
});
cy.get('#metrics-edit-popover').within(() => {
cy.get('.popover-title').within(() => {
cy.get('span').click();
cy.get('input').type(metricName);
});
cy.get('button')
.contains('Save')
.click();
});
cy.get('button.query').click();
cy.verifySliceSuccess({
waitAlias: '@getJson',
querySubstring: metricName,
chartSelector: 'svg',
});
});
it('Clear metric and set custom sql adhoc metric', () => {
const metric = 'SUM(num)/COUNT(DISTINCT name)';
cy.visitChartByName('Num Births Trend');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=metrics]').within(() => {
cy.get('.select-clear').click();
cy.get('.Select-control').click({ force: true });
cy.get('input').type('num{downarrow}', { force: true });
cy.get('.VirtualizedSelectFocusedOption')
.trigger('mousedown')
.click();
});
cy.get('#metrics-edit-popover').within(() => {
cy.get('#adhoc-metric-edit-tabs-tab-SQL').click();
cy.get('.ace_content').click();
cy.get('.ace_text-input')
.type('/COUNT(DISTINCT name)', { force: true });
cy.get('button').contains('Save').click();
});
cy.get('button.query').click();
cy.verifySliceSuccess({
waitAlias: '@getJson',
querySubstring: metric,
chartSelector: 'svg',
});
});
it('Switch between simple and custom sql tabs', () => {
cy.visitChartByName('Num Births Trend');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=metrics]').within(() => {
cy.get('.select-clear').click();
cy.get('.Select-control').click({ force: true });
cy.get('input').type('sum_girls', { force: true });
cy.get('.VirtualizedSelectFocusedOption')
.trigger('mousedown')
.click();
});
cy.get('#metrics-edit-popover').within(() => {
cy.get('#adhoc-metric-edit-tabs-tab-SQL').click();
cy.get('.ace_identifier').contains('sum_girls');
cy.get('.ace_content').click();
cy.get('.ace_text-input')
.type('{selectall}{backspace}SUM(num)', { force: true });
cy.get('#adhoc-metric-edit-tabs-tab-SIMPLE').click();
cy.get('.select-value-label').contains('num');
cy.get('button').contains('Save').click();
});
cy.get('button.query').click();
cy.verifySliceSuccess({
waitAlias: '@getJson',
chartSelector: 'svg',
});
});
});
describe('AdhocFilters', () => {
beforeEach(() => {
cy.login();
cy.server();
cy.route('POST', '/superset/explore_json/**').as('getJson');
});
it('Set simple adhoc filter', () => {
cy.visitChartByName('Num Births Trend');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=adhoc_filters]').within(() => {
cy.get('.Select-control').click({ force: true });
cy.get('input').type('name', { force: true });
cy.get('.VirtualizedSelectFocusedOption')
.trigger('mousedown')
.click();
});
cy.get('#filter-edit-popover').within(() => {
cy.get('[data-test=adhoc-filter-simple-value]').within(() => {
cy.get('div.select-input').click({ force: true });
cy.get('input.select-input').type('Amy', { force: true });
cy.get('.VirtualizedSelectFocusedOption')
.trigger('mousedown')
.click();
});
cy.get('button')
.contains('Save')
.click();
});
cy.get('button.query').click();
cy.verifySliceSuccess({
waitAlias: '@getJson',
chartSelector: 'svg',
});
});
it('Set custom adhoc filter', () => {
cy.visitChartByName('Num Births Trend');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=adhoc_filters]').within(() => {
cy.get('.Select-control').click({ force: true });
cy.get('input').type('name', { force: true });
cy.get('.VirtualizedSelectFocusedOption')
.trigger('mousedown')
.click();
});
cy.get('#filter-edit-popover').within(() => {
cy.get('#adhoc-filter-edit-tabs-tab-SQL').click();
cy.get('.ace_content').click();
cy.get('.ace_text-input')
.type("'Amy' OR name = 'Bob'", { force: true });
cy.get('button')
.contains('Save')
.click();
});
cy.get('button.query').click();
cy.verifySliceSuccess({
waitAlias: '@getJson',
chartSelector: 'svg',
});
});
});
describe('Advanced analytics', () => {
beforeEach(() => {
cy.login();
cy.server();
cy.route('POST', '/superset/explore_json/**').as('getJson');
});
it('Create custom time compare', () => {
cy.visitChartByName('Num Births Trend');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('span')
.contains('Advanced Analytics')
.parent()
.siblings()
.first()
.click();
cy.get('[data-test=time_compare]').within(() => {
cy.get('.Select-control').click({ force: true });
cy.get('input').type('364 days', { force: true });
cy.get('.VirtualizedSelectOption')
.trigger('mousedown')
.click();
});
cy.get('button.query').click();
cy.wait('@getJson');
cy.reload();
cy.verifySliceSuccess({
waitAlias: '@getJson',
chartSelector: 'svg',
});
cy.get('[data-test=time_compare]').within(() => {
cy.get('.select-value-label').contains('364 days');
});
});
});
describe('Annotations', () => {
beforeEach(() => {
cy.login();
cy.server();
cy.route('POST', '/superset/explore_json/**').as('getJson');
});
it('Create formula annotation y-axis goal line', () => {
cy.visitChartByName('Num Births Trend');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=annotation_layers]').within(() => {
cy.get('button').click();
});
cy.get('.popover-content').within(() => {
cy.get('[data-test=annotation-layer-name-header]').siblings().first().within(() => {
cy.get('input').type('Goal line');
});
cy.get('[data-test=annotation-layer-value-header]').siblings().first().within(() => {
cy.get('input').type('y=1400000');
});
cy.get('button').contains('OK').click();
});
cy.get('button.query').click();
cy.verifySliceSuccess({
waitAlias: '@getJson',
chartSelector: 'svg',
});
cy.get('.nv-legend-text').should('have.length', 2);
});
});
describe('Time range filter', () => {
beforeEach(() => {
cy.login();
cy.server();
cy.route('POST', '/superset/explore_json/**').as('getJson');
});
it('Defaults to the correct tab for time_range params', () => {
const formData = {
...FORM_DATA_DEFAULTS,
metrics: [NUM_METRIC],
viz_type: 'line',
time_range: '100 years ago : now',
};
cy.visitChartByParams(JSON.stringify(formData));
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=time_range]').within(() => {
cy.get('span.label').click();
});
cy.get('#filter-popover').within(() => {
cy.get('div.tab-pane.active').within(() => {
cy.get('div.PopoverSection :not(.dimmed)').within(() => {
cy.get('input[value="100 years ago"]');
cy.get('input[value="now"]');
});
});
});
});
});

View File

@@ -1,161 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// ***********************************************
// Tests for links in the explore UI
// ***********************************************
import { HEALTH_POP_FORM_DATA_DEFAULTS } from './visualizations/shared.helper';
describe('Test explore links', () => {
beforeEach(() => {
cy.login();
cy.server();
cy.route('POST', '/superset/explore_json/**').as('getJson');
});
it('Open and close view query modal', () => {
cy.visitChartByName('Growth Rate');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('button#query').click();
cy.get('span').contains('View query').parent().click();
cy.wait('@getJson').then(() => {
cy.get('code');
});
cy.get('.modal-header').within(() => {
cy.get('button.close').first().click({ force: true });
});
});
it('Visit short link', () => {
cy.route('POST', 'r/shortner/').as('getShortUrl');
cy.visitChartByName('Growth Rate');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=short-link-button]').click();
// explicitly wait for the url response
cy.wait('@getShortUrl');
cy.wait(100);
cy.get('#shorturl-popover [data-test="short-url"]').invoke('text')
.then((text) => {
cy.visit(text);
});
cy.verifySliceSuccess({ waitAlias: '@getJson' });
});
it('Test iframe link', () => {
cy.visitChartByName('Growth Rate');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=embed-code-button]').click();
cy.get('#embed-code-popover').within(() => {
cy.get('textarea[name=embedCode]').contains('iframe');
});
});
xit('Test chart save as', () => {
const formData = {
...HEALTH_POP_FORM_DATA_DEFAULTS,
viz_type: 'table',
metrics: ['sum__SP_POP_TOTL'],
groupby: ['country_name'],
};
const newChartName = 'Test chart';
cy.visitChartByParams(JSON.stringify(formData));
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.url().then((url) => {
cy.get('button[data-target="#save_modal"]').click();
cy.get('.modal-content').within(() => {
cy.get('input[name=new_slice_name]').type(newChartName);
cy.get('button#btn_modal_save').click();
});
cy.url().should('eq', url);
cy.visitChartByName(newChartName);
cy.verifySliceSuccess({ waitAlias: '@getJson' });
});
});
xit('Test chart save', () => {
const chartName = 'Test chart';
cy.visitChartByName(chartName);
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.get('[data-test=groupby]').within(() => {
cy.get('span.select-clear-zone').click();
});
cy.get('button[data-target="#save_modal"]').click();
cy.get('.modal-content').within(() => {
cy.get('button#btn_modal_save').click();
});
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.request(`/chart/api/read?_flt_3_slice_name=${chartName}`).then((response) => {
cy.request('DELETE', `/chart/api/delete/${response.body.pks[0]}`);
});
});
it('Test chart save as and add to new dashboard', () => {
cy.visitChartByName('Growth Rate');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
const dashboardTitle = 'Test dashboard';
cy.get('button[data-target="#save_modal"]').click();
cy.get('.modal-content').within(() => {
cy.get('input[name=new_slice_name]').type('New Growth Rate');
cy.get('input[data-test=add-to-new-dashboard]').check();
cy.get('input[placeholder="[dashboard name]"]').type(dashboardTitle);
cy.get('button#btn_modal_save').click();
});
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.request(`/dashboard/api/read?_flt_3_dashboard_title=${dashboardTitle}`).then((response) => {
expect(response.body.pks[0]).not.equals(null);
});
});
it('Test chart save as and add to existing dashboard', () => {
cy.visitChartByName('Most Populated Countries');
cy.verifySliceSuccess({ waitAlias: '@getJson' });
const chartName = 'New Most Populated Countries';
const dashboardTitle = 'Test dashboard';
cy.get('button[data-target="#save_modal"]').click();
cy.get('.modal-content').within(() => {
cy.get('input[name=new_slice_name]').type(chartName);
cy.get('input[data-test=add-to-existing-dashboard]').check();
cy.get('.select.save-modal-selector').click().within(() => {
cy.get('input').type(dashboardTitle, { force: true });
cy.get('.select-option.is-focused')
.trigger('mousedown');
});
cy.get('button#btn_modal_save').click();
});
cy.verifySliceSuccess({ waitAlias: '@getJson' });
cy.request(`/chart/api/read?_flt_3_slice_name=${chartName}`).then((response) => {
cy.request('DELETE', `/chart/api/delete/${response.body.pks[0]}`);
});
cy.request(`/dashboard/api/read?_flt_3_dashboard_title=${dashboardTitle}`).then((response) => {
cy.request('DELETE', `/dashboard/api/delete/${response.body.pks[0]}`);
});
});
});

View File

@@ -1,109 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import readResponseBlob from '../../../utils/readResponseBlob';
export default () => describe('Area', () => {
const AREA_FORM_DATA = {
datasource: '2__table',
viz_type: 'area',
slice_id: 48,
granularity_sqla: 'year',
time_grain_sqla: 'P1D',
time_range: '1960-01-01 : now',
metrics: ['sum__SP_POP_TOTL'],
adhoc_filters: [],
groupby: [],
limit: '25',
order_desc: true,
contribution: false,
row_limit: 50000,
show_brush: 'auto',
show_legend: true,
line_interpolation: 'linear',
stacked_style: 'stack',
color_scheme: 'bnbColors',
rich_tooltip: true,
show_controls: false,
x_axis_label: '',
bottom_margin: 'auto',
x_ticks_layout: 'auto',
x_axis_format: 'smart_date',
x_axis_showminmax: false,
y_axis_format: '.3s',
y_log_scale: false,
rolling_type: 'None',
comparison_type: 'values',
annotation_layers: [],
};
function verify(formData) {
cy.visitChartByParams(JSON.stringify(formData));
cy.verifySliceSuccess({ waitAlias: '@getJson', chartSelector: 'svg' });
}
beforeEach(() => {
cy.server();
cy.login();
cy.route('POST', '/superset/explore_json/**').as('getJson');
});
it('should work without groupby', () => {
verify(AREA_FORM_DATA);
cy.get('.nv-area').should('have.length', 1);
});
it('should work with group by', () => {
verify({
...AREA_FORM_DATA,
groupby: ['region'],
});
cy.get('.nv-area').should('have.length', 7);
});
it('should work with groupby and filter', () => {
cy.visitChartByParams(JSON.stringify({
...AREA_FORM_DATA,
groupby: ['region'],
adhoc_filters: [{
expressionType: 'SIMPLE',
subject: 'region',
operator: 'in',
comparator: ['South Asia', 'North America'],
clause: 'WHERE',
sqlExpression: null,
fromFormData: true,
filterOptionName: 'filter_txje2ikiv6_wxmn0qwd1xo',
}],
}));
cy.wait('@getJson').then(async (xhr) => {
cy.verifyResponseCodes(xhr);
const responseBody = await readResponseBlob(xhr.response.body);
// Make sure data is sorted correctly
const firstRow = responseBody.data[0].values;
const secondRow = responseBody.data[1].values;
expect(firstRow[firstRow.length - 1].y).to.be.greaterThan(secondRow[secondRow.length - 1].y);
cy.verifySliceContainer('svg');
});
cy.get('.nv-area').should('have.length', 2);
});
});

View File

@@ -1,81 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
export default () => describe('Big Number', () => {
const BIG_NUMBER_FORM_DATA = {
datasource: '2__table',
viz_type: 'big_number',
slice_id: 42,
granularity_sqla: 'year',
time_grain_sqla: 'P1D',
time_range: '2000+:+2014-01-02',
metric: 'sum__SP_POP_TOTL',
adhoc_filters: [],
compare_lag: '10',
compare_suffix: 'over+10Y',
y_axis_format: '.3s',
show_trend_line: true,
start_y_axis_at_zero: true,
color_picker: {
r: 0,
g: 122,
b: 135,
a: 1,
},
};
function verify(formData) {
cy.visitChartByParams(JSON.stringify(formData));
cy.verifySliceSuccess({ waitAlias: '@getJson', chartSelector: '.big_number' });
}
beforeEach(() => {
cy.login();
cy.server();
cy.route('POST', '/superset/explore_json/**').as('getJson');
});
it('should work', () => {
verify(BIG_NUMBER_FORM_DATA);
cy.get('.chart-container .header_line');
cy.get('.chart-container .subheader_line');
cy.get('.chart-container svg path.vx-linepath');
});
it('should work without subheader', () => {
verify({
...BIG_NUMBER_FORM_DATA,
compare_lag: null,
});
cy.get('.chart-container .header_line');
cy.get('.chart-container .subheader_line');
cy.get('.chart-container svg path.vx-linepath');
});
it('should not render trendline when hidden', () => {
verify({
...BIG_NUMBER_FORM_DATA,
show_trend_line: false,
});
cy.get('.chart-container .header_line');
cy.get('.chart-container .subheader_line');
cy.get('.chart-container').then((containers) => {
expect(containers[0].querySelector('svg')).to.equal(null);
});
});
});

Some files were not shown because too many files have changed in this diff Show More