Skip to content

Commit

Permalink
Merge pull request #56 from lyft/merge_apache_51bd34
Browse files Browse the repository at this point in the history
Merge apache 51bd34
  • Loading branch information
DiggidyDave committed Aug 16, 2019
2 parents 8a5b56f + 81e2528 commit 2a187b8
Show file tree
Hide file tree
Showing 63 changed files with 1,517 additions and 988 deletions.
38 changes: 38 additions & 0 deletions .fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# 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.
#

# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli)
# Visit https://fossa.com to learn more

version: 2
cli:
server: https://app.fossa.com
fetcher: custom
analyze:
modules:
- name: assets
type: npm
target: superset/assets
path: superset/assets
- name: docs
type: pip
target: docs
path: docs
- name: .
type: pip
target: .
path: .
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
#
jobs:
include:
- language: python
python: 3.6
env:
- TOXENV=fossa
install:
- pip install --upgrade pip
- pip install tox
- language: python
python: 3.6
env:
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ the world know they are using Superset. Join our growing community!
1. [FBK - ICT center](http://ict.fbk.eu)
1. [Faasos](http://faasos.com/)
1. [Fordeal](http://www.fordeal.com)
1. [GFG - Global Fashion Group](https://global-fashion-group.com)
1. [GfK Data Lab](http://datalab.gfk.com)
1. [Grassroot](https://www.grassrootinstitute.org/)
1. [Hostnfly](https://www.hostnfly.com/)
Expand Down Expand Up @@ -197,7 +198,7 @@ the world know they are using Superset. Join our growing community!
1. [Showmax](https://tech.showmax.com)
1. [Tails.com](https://tails.com)
1. [Tenable](https://www.tenable.com)
1. [THEICONIC](http://theiconic.com.au/)
1. [THE ICONIC](http://theiconic.com.au/)
1. [Tobii](http://www.tobii.com/)
1. [Tooploox](https://www.tooploox.com/)
1. [TrustMedis](https://trustmedis.com)
Expand All @@ -206,6 +207,8 @@ the world know they are using Superset. Join our growing community!
1. [VIPKID](https://www.vipkid.com.cn/)
1. [WeSure](https://www.wesure.cn/)
1. [Windsor.ai](https://www.windsor.ai/)
1. [WP-Semantix](https://wpsemantix.com/)
1. [Yahoo!](https://yahoo.com/)
1. [Zaihang](http://www.zaih.com/)
1. [Zalando](https://www.zalando.com)
1. [Zalora](https://www.zalora.com)
114 changes: 52 additions & 62 deletions RELEASING/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,57 +16,6 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Apache Releases

To make a fresh tarball of a git reference on apache/incubator-superset
(push your tag first!)

```bash
docker build -t make_tarball -f Dockerfile.make_tarball . --build-arg VERSION=0.33.0rc1
docker run make_tarball -f Dockerfile.make_tarball --env VERSION=0.33.0rc1
```

To make a working build given a tarball
```bash
# Building a docker from a tarball
VERSION=0.33.0rc2 && \
docker build -t apache-superset:$VERSION -f Dockerfile.from_tarball . --build-arg VERSION=$VERSION

# testing the resulting docker
docker run -p 5001:8088 apache-superset:0.33.0rc2
# you should be able to access localhost:5001 on your browser
# login using admin/admin
```

## 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
```

# Apache Releases

Expand All @@ -81,20 +30,20 @@ need to be done at every release.
```bash
# Create PGP Key, and use your @apache.org email address
gpg --gen-key

# Checkout ASF dist repo

svn checkout https://dist.apache.org/repos/dist/dev/incubator/superset/ ~/svn/superset_dev

svn checkout https://dist.apache.org/repos/dist/release/incubator/superset/ ~/svn/superset
cd ~/svn/superset


# Add your GPG pub key to KEYS file. Replace "Maxime Beauchemin" with your name
export FULLNAME="Maxime Beauchemin"
(gpg --list-sigs $FULLNAME && gpg --armor --export $FULLNAME ) >> KEYS


# Commit the changes
svn commit -m "Add PGP keys of new Superset committer"
```
Expand All @@ -107,7 +56,7 @@ Now let's craft a source release
# Setting a VERSION var will be useful
export VERSION=0.31.0rc18
export RELEASE=apache-superset-incubating-${VERSION}
export RELEASE_TARBAL=${RELEASE}-source.tar.gz
export RELEASE_TARBALL=${RELEASE}-source.tar.gz

# Let's create a git tag
git tag -f ${VERSION}
Expand All @@ -122,10 +71,10 @@ Now let's craft a source release
mkdir -p ~/svn/superset_dev/${VERSION}/
git archive \
--format=tar.gz ${VERSION} \
--prefix=${RELEASE}/ \
--prefix="${RELEASE}/" \
-o ~/svn/superset_dev/${VERSION}/${RELEASE_TARBALL}

cd ~/svn/superset_dev/
cd ~/svn/superset_dev/${VERSION}/
scripts/sign.sh ${RELEASE}-source.tar.gz
```

Expand All @@ -134,9 +83,6 @@ Now let's craft a source release
Now let's ship this RC into svn's dev folder

```bash
# cp or mv the files over to the svn repo
mkdir ~/svn/superset_dev/${VERSION}/
cp ${RELEASE_TARBALL} ~/svn/superset_dev/${VERSION}/
cd ~/svn/superset_dev/
svn add ${VERSION}
svn commit
Expand All @@ -161,3 +107,47 @@ folder.

Now you can announce the release on the mailing list, make sure to use the
proper template

## Build from source tarball

To make a working build given a tarball
```bash
# Building a docker from a tarball
VERSION=0.33.0rc2 && \
docker build -t apache-superset:$VERSION -f Dockerfile.from_tarball . --build-arg VERSION=$VERSION

# testing the resulting docker
docker run -p 5001:8088 apache-superset:$VERSION
# you should be able to access localhost:5001 on your browser
# login using admin/admin
```

# 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
```
25 changes: 21 additions & 4 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,18 @@ Note that you can run the ``superset refresh_druid`` command to refresh the
metadata from your Druid cluster(s)


Presto
------

By default Superset assumes the most recent version of Presto is being used when
querying the datasource. If you're using an older version of presto, you can configure
it in the ``extra`` parameter::

{
"version": "0.123"
}


CORS
----

Expand Down Expand Up @@ -726,9 +738,9 @@ Example of a simple JSON to Stdout class::
print(json.dumps(log))


Then on Superset's config reference the class you want to use::
Then on Superset's config pass an instance of the logger type you want to use.

EVENT_LOGGER = JSONStdOutEventLogger
EVENT_LOGGER = JSONStdOutEventLogger()


Upgrading
Expand Down Expand Up @@ -1042,7 +1054,7 @@ your environment. See `CONTRIBUTING.md#setup-local-environment-for-development <
Blueprints
----------

`Blueprints are Flask's reusable apps <http://flask.pocoo.org/docs/0.12/blueprints/>`_.
`Blueprints are Flask's reusable apps <https://flask.palletsprojects.com/en/1.0.x/tutorial/views/>`_.
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
Expand Down Expand Up @@ -1173,7 +1185,8 @@ You can enable or disable features with flag from ``superset_config.py``:
DEFAULT_FEATURE_FLAGS = {
'CLIENT_CACHE': False,
'ENABLE_EXPLORE_JSON_CSRF_PROTECTION': False
'ENABLE_EXPLORE_JSON_CSRF_PROTECTION': False,
'PRESTO_EXPAND_DATA': False,
}
Here is a list of flags and descriptions:
Expand All @@ -1183,3 +1196,7 @@ Here is a list of flags and descriptions:
* For some security concerns, you may need to enforce CSRF protection on all query request to explore_json endpoint. In Superset, we use `flask-csrf <https://sjl.bitbucket.io/flask-csrf/>`_ add csrf protection for all POST requests, but this protection doesn't apply to GET method.

* When ENABLE_EXPLORE_JSON_CSRF_PROTECTION is set to true, your users cannot make GET request to explore_json. The default value for this feature False (current behavior), explore_json accepts both GET and POST request. See `PR 7935 <https://github.com/apache/incubator-superset/pull/7935>`_ for more details.

* PRESTO_EXPAND_DATA

* When this feature is enabled, nested types in Presto will be expanded into extra columns and/or arrays. This is experimental, and doesn't work with all nested types.
2 changes: 1 addition & 1 deletion docs/sqllab.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Templating with Jinja
SELECT *
FROM some_table
WHERE partition_key = '{{ presto.latest_partition('some_table') }}'
WHERE partition_key = '{{ presto.first_latest_partition('some_table') }}'
Templating unleashes the power and capabilities of a
programming language within your SQL code.
Expand Down
13 changes: 4 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ babel==2.7.0 # via flask-babel
billiard==3.6.0.0 # via celery
bleach==3.1.0
celery==4.3.0
certifi==2019.6.16 # via requests
cffi==1.12.3 # via cryptography
chardet==3.0.4 # via requests
click==6.7
colorama==0.4.1
contextlib2==0.5.5
croniter==0.3.30
cryptography==2.7
decorator==4.4.0 # via retry
defusedxml==0.6.0 # via python3-openid
flask-appbuilder==2.1.7
flask-appbuilder==2.1.9
flask-babel==0.12.2 # via flask-appbuilder
flask-caching==1.7.2
flask-compress==1.4.0
Expand Down Expand Up @@ -73,16 +71,13 @@ pyyaml==5.1.2
retry==0.9.2
selenium==3.141.0
simplejson==3.16.0
six==1.12.0 # via bleach, cryptography, flask-jwt-extended, flask-talisman, isodate, jsonschema, pathlib2, polyline, prison, pydruid, pyrsistent, python-dateutil, sqlalchemy-utils, wtforms-json
six==1.12.0 # via bleach, cryptography, flask-jwt-extended, flask-talisman, isodate, jsonschema, pathlib2, polyline, prison, pyrsistent, python-dateutil, sqlalchemy-utils, wtforms-json
sqlalchemy-utils==0.34.1
sqlalchemy==1.3.6
sqlparse==0.2.4
urllib3==1.25.3 # via requests, selenium
sqlparse==0.3.0
urllib3==1.25.3 # via selenium
vine==1.3.0 # via amqp, celery
webencodings==0.5.1 # via bleach
werkzeug==0.15.5 # via flask, flask-jwt-extended
wtforms-json==0.3.3
wtforms==2.2.1 # via flask-wtf, wtforms-json

# The following packages are considered to be unsafe in a requirements file:
# setuptools==41.0.1 # via jsonschema, markdown
26 changes: 26 additions & 0 deletions scripts/fossa.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/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.
#

# This is the recommended way to install FOSSA's cli per the docs:
# https://docs.fossa.com/docs/travisci#section-add-fossa-steps-to-travisyml
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash

# This key is a push-only API key, also recommended for public projects
# https://docs.fossa.com/docs/api-reference#section-push-only-api-token
FOSSA_API_KEY="f72e93645bdfeab94bd227c7bbdda4ef" fossa
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_git_sha():
"croniter>=0.3.28",
"cryptography>=2.4.2",
"flask>=1.0.0, <2.0.0",
"flask-appbuilder>=2.1.6, <2.3.0",
"flask-appbuilder>=2.1.9, <2.3.0",
"flask-caching",
"flask-compress",
"flask-talisman",
Expand All @@ -98,7 +98,7 @@ def get_git_sha():
"simplejson>=3.15.0",
"sqlalchemy>=1.3.5,<2.0",
"sqlalchemy-utils>=0.33.2",
"sqlparse<0.3",
"sqlparse>=0.3.0,<0.4",
"wtforms-json",
],
extras_require={
Expand Down
Loading

0 comments on commit 2a187b8

Please sign in to comment.