Skip to content

Commit

Permalink
Merge branch 'master' into dynamic-plugin-import
Browse files Browse the repository at this point in the history
* master: (43 commits)
  feat: Getting fancier with Storybook (apache#10647)
  fix: dedup groupby in viz.py while preserving order (apache#10633)
  feat: bump superset-ui for certified tag (apache#10650)
  feat: setup react page with submenu for datasources listview  (apache#10642)
  feat: add certification to metrics (apache#10630)
  feat(viz-plugins): add date formatting to pivot-table (apache#10637)
  fix: controls scroll issue (apache#10644)
  feat: Allow tests files in  /src (plus Label component tests) (apache#10634)
  fix: remove duplicated params and cache_timeout from list_columns; add viz_type to list_columns (apache#10643)
  chore: splitting button stories into separate stories (apache#10631)
  refactor: remove slice level label_colors from dashboard init load (apache#10603)
  feat: card view bulk select (apache#10607)
  style: Label styling/storybook touchups (apache#10627)
  fix: removing unsupported modal sizes (apache#10625)
  feat(datasource): remove deleted columns and update column type on metadata refresh (apache#10619)
  improve documentation for country maps (apache#10621)
  chore: npm audit fix as of 2020-08-15 (apache#10613)
  feat: dataset REST API for distinct values (apache#10595)
  chore: bump react-redux to 5.1.2, whittling console noise (apache#10602)
  fixing console error about bad html attribute (apache#10604)
  ...

# Conflicts:
#	superset-frontend/src/explore/components/ExploreViewContainer.jsx
#	superset-frontend/src/views/App.tsx
#	superset/config.py
  • Loading branch information
amitNielsen committed Aug 21, 2020
2 parents b4ace1e + 878f06d commit cf13c0a
Show file tree
Hide file tree
Showing 154 changed files with 17,179 additions and 3,783 deletions.
2 changes: 1 addition & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ github:
- data-science
- data-engineering
- asf
- BI
- bi
- business-analytics
- data-analytics
- data-analysis
Expand Down
423 changes: 423 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,20 @@ assists people when migrating to a new version.

## Next

* [10590](https://github.com/apache/incubator-superset/pull/10590): Breaking change: this PR will convert iframe chart into dashboard markdown component, and remove all `iframe`, `separator`, and `markup` slices (and support) from Superset. If you have important data in those slices, please backup manually.

* [10562](https://github.com/apache/incubator-superset/pull/10562): EMAIL_REPORTS_WEBDRIVER is deprecated use WEBDRIVER_TYPE instead.

* [10567](https://github.com/apache/incubator-superset/pull/10567): Default WEBDRIVER_OPTION_ARGS are Chrome-specific. If you're using FF, should be `--headless` only

* [10241](https://github.com/apache/incubator-superset/pull/10241): change on Alpha role, users started to have access to "Annotation Layers", "Css Templates" and "Import Dashboards".

* [10324](https://github.com/apache/incubator-superset/pull/10324): Facebook Prophet has been introduced as an optional dependency to add support for timeseries forecasting in the chart data API. To enable this feature, install Superset with the optional dependency `prophet` or directly `pip install fbprophet`.

* [10320](https://github.com/apache/incubator-superset/pull/10320): References to blacklst/whitelist language have been replaced with more appropriate alternatives. All configs refencing containing `WHITE`/`BLACK` have been replaced with `ALLOW`/`DENY`. Affected config variables that need to be updated: `TIME_GRAIN_BLACKLIST`, `VIZ_TYPE_BLACKLIST`, `DRUID_DATA_SOURCE_BLACKLIST`.

## 0.37.0

* [9964](https://github.com/apache/incubator-superset/pull/9964): Breaking change on Flask-AppBuilder 3. If you're using OAuth, find out what needs to be changed [here](https://github.com/dpgaspar/Flask-AppBuilder/blob/master/README.rst#change-log).

* [10233](https://github.com/apache/incubator-superset/pull/10233): a change which deprecates the `ENABLE_FLASK_COMPRESS` config option in favor of the Flask-Compress `COMPRESS_REGISTER` config option which serves the same purpose.
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,6 @@ Here's a list of some of the recommended packages.
+------------------+-------------------------------------------------------------------+-------------------------------------------------+
| Google Sheets | ``"apache-superset[gsheets]"`` | ``gsheets://`` |
+------------------+-------------------------------------------------------------------+-------------------------------------------------+
| Hana | ``"apache-superset[hana]"`` | ``hana://`` |
+------------------+-------------------------------------------------------------------+-------------------------------------------------+
| IBM Db2 | ``"apache-superset[db2]"`` | ``db2+ibm_db://`` |
+------------------+-------------------------------------------------------------------+-------------------------------------------------+
| MySQL | ``"apache-superset[mysql]"`` | ``mysql://`` |
Expand All @@ -534,6 +532,8 @@ Here's a list of some of the recommended packages.
+------------------+-------------------------------------------------------------------+-------------------------------------------------+
| Presto | ``"apache-superset[presto]"`` | ``presto://`` |
+------------------+-------------------------------------------------------------------+-------------------------------------------------+
| SAP HANA | ``"apache-superset[hana]"`` | ``hana://`` |
+------------------+-------------------------------------------------------------------+-------------------------------------------------+
| Snowflake | ``"apache-superset[snowflake]"`` | ``snowflake://`` |
+------------------+-------------------------------------------------------------------+-------------------------------------------------+
| SQLite | | ``sqlite://`` |
Expand Down
19 changes: 14 additions & 5 deletions docs/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,9 @@ List of Countries
Need to add a new Country?
-------------------------------

To add a new country in country map tools, we need to follow the following steps :
Warning: adding a new country is not easy and requires building superset from source!

To add a new country in country map tools, you need to follow the following steps :

1. You need shapefiles which contain data of your map.
You can get this file on this site: https://www.diva-gis.org/gdata
Expand All @@ -1970,13 +1972,17 @@ To add a new country in country map tools, we need to follow the following steps
3. You need to convert shapefile to geojson file.
This action can make with ogr2ogr tools: https://www.gdal.org/ogr2ogr.html

4. Put your geojson file in next folder : superset-frontend/src/visualizations/CountryMap/countries with the next name : nameofyourcountries.geojson
4. You can to reduce size of geojson file on this site: https://mapshaper.org/

5. You will need to put your geojson file in the right place in the @superset-ui npm package. This is the "countries" folder in
./superset-frontend/node_modules/@superset-ui/legacy-plugin-chart-country-map/esm/.
The .geojson files for other countries are already in this folder.

5. You can to reduce size of geojson file on this site: https://mapshaper.org/
6. You will also need to edit the "countries.js" file in the same directory, following the pattern of the other countries.

6. Go in file superset-frontend/src/explore/controls.jsx
7. Then go to the file superset-frontend/src/explore/controls.jsx

7. Add your country in component 'select_country'
8. Add your country in component 'select_country'
Example :

.. code-block:: javascript
Expand Down Expand Up @@ -2005,3 +2011,6 @@ To add a new country in country map tools, we need to follow the following steps
].map(s => [s, s]),
description: 'The name of country that Superset should display',
},
9. Rebuild the front end from source and restart superset.
10 changes: 3 additions & 7 deletions scripts/tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ function reset_db() {
echo --------------------
echo Reseting test DB
echo --------------------
docker-compose stop superset-tests-worker
RESET_DB_CMD="psql \"postgresql://superset:superset@127.0.0.1:5432\" <<-EOF
docker-compose stop superset-tests-worker superset || true
RESET_DB_CMD="psql \"postgresql://${DB_USER}:${DB_PASSWORD}@127.0.0.1:5432\" <<-EOF
DROP DATABASE IF EXISTS ${DB_NAME};
CREATE DATABASE ${DB_NAME};
\\c ${DB_NAME}
Expand All @@ -53,10 +53,6 @@ function test_init() {
echo Superset init
echo --------------------
superset init
echo --------------------
echo Load examples
echo --------------------
pytest -s tests/load_examples_test.py
}

#
Expand Down Expand Up @@ -142,5 +138,5 @@ fi

if [ $RUN_TESTS -eq 1 ]
then
pytest -x -s --ignore=load_examples_test "${TEST_MODULE}"
pytest -x -s "${TEST_MODULE}"
fi
11 changes: 11 additions & 0 deletions superset-frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,17 @@ module.exports = {
},
},
},
{
files: ['*.stories.jsx', '*.stories.tsx'],
rules: {
// this is to keep eslint from complaining about storybook addons,
// since they are included as dev dependencies rather than direct dependencies.
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: true },
],
},
},
],
rules: {
camelcase: [
Expand Down
5 changes: 3 additions & 2 deletions superset-frontend/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ const path = require('path');
const customConfig = require('../webpack.config.js');

module.exports = {
stories: ['../src/components/**/*.stories.jsx'],
stories: ['../src/components/**/*.stories.@(t|j)sx'],
addons: [
'@storybook/addon-actions',
'@storybook/addon-essentials',
'@storybook/addon-links',
'@storybook/preset-typescript',
'storybook-addon-jsx',
'@storybook/addon-knobs/register',
'storybook-addon-paddings',
],
webpackFinal: config => ({
...config,
Expand Down
13 changes: 13 additions & 0 deletions superset-frontend/.storybook/preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,27 @@
import React from 'react';
import { addDecorator } from '@storybook/react';
import { jsxDecorator } from 'storybook-addon-jsx';
import { addParameters } from '@storybook/react';
import { withPaddings } from 'storybook-addon-paddings';

import { supersetTheme, ThemeProvider } from '@superset-ui/style';

import '../src/theme.ts';
import './storybook.css';

const themeDecorator = storyFn => (
<ThemeProvider theme={supersetTheme}>{storyFn()}</ThemeProvider>
);

addDecorator(jsxDecorator);
addDecorator(themeDecorator);
addDecorator(withPaddings);

addParameters({
paddings: [
{ name: 'None', value: '0px' },
{ name: 'Small', value: '16px' },
{ name: 'Medium', value: '32px', default: true },
{ name: 'Large', value: '64px' },
],
});
3 changes: 3 additions & 0 deletions superset-frontend/.storybook/storybook.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body{
background: transparent;
}
Binary file added superset-frontend/images/chart-card-fallback.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions superset-frontend/images/icons/card-view.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions superset-frontend/images/icons/certified.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions superset-frontend/images/icons/list-view.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion superset-frontend/images/icons/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion superset-frontend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
module.exports = {
testRegex: '\\/spec\\/.*(_spec|\\.test)\\.(j|t)sx?$',
testRegex: '(\\/spec|\\/src)\\/.*(_spec|\\.test)\\.(j|t)sx?$',
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/spec/__mocks__/styleMock.js',
'\\.(gif|ttf|eot)$': '<rootDir>/spec/__mocks__/fileMock.js',
Expand Down
Loading

0 comments on commit cf13c0a

Please sign in to comment.