Skip to content

Commit

Permalink
Merge pull request #80 from lyft/merge_apache_20191113a
Browse files Browse the repository at this point in the history
Merge apache 20191113a
  • Loading branch information
Beto Dealmeida committed Nov 13, 2019
2 parents 9328a58 + e2c7cb0 commit 3d598ce
Show file tree
Hide file tree
Showing 89 changed files with 2,552 additions and 496 deletions.
136 changes: 136 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

330 changes: 330 additions & 0 deletions CONTRIBUTING.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion README.md
Expand Up @@ -126,7 +126,6 @@ Installation & Configuration
Resources
-------------
* [Mailing list](https://lists.apache.org/list.html?dev@superset.apache.org)
* [Gitter (live chat) Channel](https://gitter.im/airbnb/superset)
* [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)
Expand Down
2 changes: 1 addition & 1 deletion RELEASING/Dockerfile.from_tarball
Expand Up @@ -60,7 +60,7 @@ RUN pip install --upgrade setuptools pip \
&& pip install -e . \
&& rm -rf /root/.cache/pip

RUN fabmanager babel-compile --target superset/translations
RUN flask fab babel-compile --target superset/translations

RUN pip install -e . \
&& rm -rf /root/.cache/pip
Expand Down
20 changes: 10 additions & 10 deletions RELEASING/README.md
Expand Up @@ -66,9 +66,9 @@ Then (if needed) apply all cherries that will make the PATCH

Finally bump the version number on `superset/static/assets/package.json` ::

"version": "0.35.0rc1"
"version": "0.35.0"

Commit the change with the version number, then git tag the version and push
Commit the change with the version number, then git tag the version with the release candidate and push

## Setting up the release environment (do every time)

Expand Down Expand Up @@ -169,14 +169,6 @@ https://lists.apache.org/thread.html/50a6b134d66b86b237d5d7bc89df1b567246d125a71
Following the result thread, yet another [VOTE] thread should be
started at general@incubator.apache.org.

### Publishing a Convenience Release to PyPI
From the root of the repo running ./pypi_push.sh will build the
Javascript bundle and echo the twine command allowing you to publish
to PyPI. You may need to ask a fellow committer to grant
you access to it if you don't have access already. Make sure to create
an account first if you don't have one, and reference your username
while requesting access to push packages.

### Announcing

Once it's all done, an [ANNOUNCE] thread announcing the release to the dev@ mailing list is the final step.
Expand Down Expand Up @@ -211,6 +203,14 @@ Then tag the final release:
Now you can announce the release on the mailing list, make sure to use the
proper template

### Publishing a Convenience Release to PyPI
From the root of the repo running ./pypi_push.sh will build the
Javascript bundle and echo the twine command allowing you to publish
to PyPI. You may need to ask a fellow committer to grant
you access to it if you don't have access already. Make sure to create
an account first if you don't have one, and reference your username
while requesting access to push packages.

## Post release

In `UPDATING.md`, a file that contains a list of notifications around
Expand Down
3 changes: 1 addition & 2 deletions RELEASING/from_tarball_entrypoint.sh
Expand Up @@ -21,8 +21,7 @@ echo "[WARNING] this entrypoint creates an admin/admin user"
echo "[WARNING] it should only be used for lightweight testing/validation"

# Create an admin user (you will be prompted to set username, first and last name before setting a password)
fabmanager create-admin \
--app superset \
flask fab create-admin \
--username admin \
--firstname admin \
--lastname admin \
Expand Down
4 changes: 2 additions & 2 deletions contrib/docker/Dockerfile
Expand Up @@ -47,8 +47,8 @@ COPY requirements.txt .
COPY requirements-dev.txt .
COPY contrib/docker/requirements-extra.txt .

RUN pip install --upgrade setuptools pip \
&& pip install -r requirements.txt -r requirements-dev.txt -r requirements-extra.txt \
RUN pip --default-timeout=120 install --upgrade setuptools pip \
&& pip --default-timeout=120 install -r requirements.txt -r requirements-dev.txt -r requirements-extra.txt \
&& rm -rf /root/.cache/pip

COPY --chown=superset:superset superset superset
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial.rst → docs/admintutorial.rst
Expand Up @@ -15,8 +15,8 @@
specific language governing permissions and limitations
under the License.
Tutorial - Creating your first dashboard
========================================
Creating your first dashboard
=============================

This tutorial targets someone who wants to create charts and dashboards
in Superset. We'll show you how to connect Superset
Expand Down
3 changes: 2 additions & 1 deletion docs/index.rst
Expand Up @@ -123,6 +123,7 @@ The following RDBMS are currently supported:
- `SQL Server <https://www.microsoft.com/en-us/sql-server/>`_
- `Teradata <https://www.teradata.com/>`_
- `Vertica <https://www.vertica.com/>`_
- `Hana <https://www.sap.com/products/hana.html>`_

Other database engines with a proper DB-API driver and SQLAlchemy dialect should
be supported as well.
Expand Down Expand Up @@ -154,7 +155,7 @@ Contents
:maxdepth: 2

installation
tutorial
tutorials
security
sqllab
gallery
Expand Down
12 changes: 12 additions & 0 deletions docs/installation.rst
Expand Up @@ -404,12 +404,24 @@ Here's a list of some of the recommended packages.
| Vertica | ``pip install | ``vertica+vertica_python://`` |
| | sqlalchemy-vertica-python`` | |
+------------------+---------------------------------------+-------------------------------------------------+
| Hana | ``pip install hdbcli sqlalchemy-hana``| ``hana://`` |
| | or ``pip install superset[hana]`` | |
+------------------+---------------------------------------+-------------------------------------------------+


Note that many other databases 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.

Hana
------------

The connection string for Hana looks like this ::

hana://{username}:{password}@{host}:{port}


(AWS) Athena
------------

Expand Down
24 changes: 12 additions & 12 deletions docs/sqllab.rst
Expand Up @@ -128,7 +128,7 @@ can optionally specify a custom formatter. Eg:

.. code-block:: python
def presto_query_cost_formatter(cost_estimate: List[Dict[str, float]]) -> List[Dict[str, str]]:
def presto_query_cost_formatter(cost_estimate: List[Dict[str, float]]) -> List[Dict[str, str]]:
"""
Format cost estimate returned by Presto.
Expand All @@ -137,21 +137,21 @@ can optionally specify a custom formatter. Eg:
"""
# Convert cost to dollars based on CPU and network cost. These coefficients are just
# examples, they need to be estimated based on your infrastructure.
cpu_coefficient = 2e-12
network_coefficient = 1e-12
cpu_coefficient = 2e-12
network_coefficient = 1e-12
cost = 0
for row in cost_estimate:
cost += row.get("cpuCost", 0) * cpu_coefficient
cost += row.get("networkCost", 0) * network_coefficient
cost = 0
for row in cost_estimate:
cost += row.get("cpuCost", 0) * cpu_coefficient
cost += row.get("networkCost", 0) * network_coefficient
return [{"Cost": f"US$ {cost:.2f}"}]
return [{"Cost": f"US$ {cost:.2f}"}]
DEFAULT_FEATURE_FLAGS = {
"ESTIMATE_QUERY_COST": True,
"QUERY_COST_FORMATTERS_BY_ENGINE": {"presto": presto_query_cost_formatter},
}
DEFAULT_FEATURE_FLAGS = {
"ESTIMATE_QUERY_COST": True,
"QUERY_COST_FORMATTERS_BY_ENGINE": {"presto": presto_query_cost_formatter},
}
.. _ref_ctas_engine_config:

Expand Down
25 changes: 25 additions & 0 deletions docs/tutorials.rst
@@ -0,0 +1,25 @@
.. 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.
Tutorials
---------

.. toctree::
:maxdepth: 2

admintutorial
usertutorial

0 comments on commit 3d598ce

Please sign in to comment.