[WiP] rename project from Caravel to Superset (#1576)
* Change in files * Renamin files and folders * cleaning up a single piece of lint * Removing boat picture from docs * add superset word mark * Update rename note in docs * Fixing images * Pinning datatables * Fixing issues with mapbox-gl * Forgot to rename one file * Linting * v0.13.0 * adding pyyaml to dev-reqs
|
@ -6,7 +6,7 @@ engines:
|
|||
eslint:
|
||||
enabled: true
|
||||
config:
|
||||
config: caravel/assets/.eslintrc
|
||||
config: superset/assets/.eslintrc
|
||||
pep8:
|
||||
enabled: true
|
||||
fixme:
|
||||
|
@ -19,17 +19,17 @@ engines:
|
|||
ratings:
|
||||
paths:
|
||||
- "**.py"
|
||||
- "caravel/assets/**.js"
|
||||
- "caravel/assets/**.jsx"
|
||||
- "superset/assets/**.js"
|
||||
- "superset/assets/**.jsx"
|
||||
exclude_paths:
|
||||
- ".*"
|
||||
- "**.pyc"
|
||||
- "**.gz"
|
||||
- "env/"
|
||||
- "tests/"
|
||||
- "caravel/assets/images/"
|
||||
- "caravel/assets/vendor/"
|
||||
- "caravel/assets/node_modules/"
|
||||
- "caravel/assets/javascripts/dist/"
|
||||
- "caravel/migrations"
|
||||
- "superset/assets/images/"
|
||||
- "superset/assets/vendor/"
|
||||
- "superset/assets/node_modules/"
|
||||
- "superset/assets/javascripts/dist/"
|
||||
- "superset/migrations"
|
||||
- "docs/"
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
*.pyc
|
||||
caravel/assets/coverage/*
|
||||
superset/assets/coverage/*
|
||||
changelog.sh
|
||||
.DS_Store
|
||||
.coverage
|
||||
_build
|
||||
_static
|
||||
_images
|
||||
caravel/bin/caravelc
|
||||
superset/bin/supersetc
|
||||
env_py3
|
||||
.eggs
|
||||
build
|
||||
*.db
|
||||
tmp
|
||||
caravel_config.py
|
||||
superset_config.py
|
||||
local_config.py
|
||||
env
|
||||
dist
|
||||
caravel.egg-info/
|
||||
superset.egg-info/
|
||||
app.db
|
||||
*.bak
|
||||
.idea
|
||||
|
@ -27,3 +27,4 @@ app.db
|
|||
*.js.map
|
||||
node_modules
|
||||
npm-debug.log
|
||||
yarn.lock
|
||||
|
|
|
@ -16,8 +16,8 @@ pep8:
|
|||
full: true
|
||||
ignore-paths:
|
||||
- docs
|
||||
- caravel/migrations/env.py
|
||||
- caravel/ascii_art.py
|
||||
- superset/migrations/env.py
|
||||
- superset/ascii_art.py
|
||||
ignore-patterns:
|
||||
- ^example/doc_.*\.py$
|
||||
- (^|/)docs(/|$)
|
||||
|
|
|
@ -24,10 +24,10 @@ env:
|
|||
before_install:
|
||||
- npm install -g npm@'>=3.9.5'
|
||||
before_script:
|
||||
- mysql -e 'drop database if exists caravel; create database caravel DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci' -u root
|
||||
- mysql -e 'drop database if exists superset; create database superset DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci' -u root
|
||||
- mysql -u root -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED BY 'mysqluserpassword';"
|
||||
- mysql -u root -e "GRANT ALL ON caravel.* TO 'mysqluser'@'localhost';"
|
||||
- psql -c 'create database caravel;' -U postgres
|
||||
- mysql -u root -e "GRANT ALL ON superset.* TO 'mysqluser'@'localhost';"
|
||||
- psql -c 'create database superset;' -U postgres
|
||||
- psql -c "CREATE USER postgresuser WITH PASSWORD 'pguserpassword';" -U postgres
|
||||
- export PATH=${PATH}:/tmp/hive/bin
|
||||
install:
|
||||
|
|
|
@ -30,8 +30,8 @@ Look through the GitHub issues for features. Anything tagged with
|
|||
|
||||
### Documentation
|
||||
|
||||
Caravel could always use better documentation,
|
||||
whether as part of the official Caravel docs,
|
||||
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.
|
||||
|
||||
|
@ -49,16 +49,16 @@ If you are proposing a feature:
|
|||
|
||||
## Latest Documentation
|
||||
|
||||
Latest documentation and tutorial are available [here](http://airbnb.io/caravel)
|
||||
Latest documentation and tutorial are available [here](http://airbnb.io/superset)
|
||||
|
||||
## Setting up a Python development environment
|
||||
|
||||
Check the [OS dependencies](http://airbnb.io/caravel/installation.html#os-dependencies) before follows these steps.
|
||||
Check the [OS dependencies](http://airbnb.io/superset/installation.html#os-dependencies) before follows these steps.
|
||||
|
||||
# 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:airbnb/caravel.git
|
||||
# git clone git@github.com:airbnb/superset.git
|
||||
|
||||
# [optional] setup a virtual env and activate it
|
||||
virtualenv env
|
||||
|
@ -68,24 +68,24 @@ Check the [OS dependencies](http://airbnb.io/caravel/installation.html#os-depend
|
|||
python setup.py develop
|
||||
|
||||
# Create an admin user
|
||||
fabmanager create-admin --app caravel
|
||||
fabmanager create-admin --app superset
|
||||
|
||||
# Initialize the database
|
||||
caravel db upgrade
|
||||
superset db upgrade
|
||||
|
||||
# Create default roles and permissions
|
||||
caravel init
|
||||
superset init
|
||||
|
||||
# Load some data to play with
|
||||
caravel load_examples
|
||||
superset load_examples
|
||||
|
||||
# start a dev web server
|
||||
caravel runserver -d
|
||||
superset runserver -d
|
||||
|
||||
|
||||
## Setting up the node / npm javascript environment
|
||||
|
||||
`caravel/assets` contains all npm-managed, front end assets.
|
||||
`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.
|
||||
|
@ -112,14 +112,14 @@ export PATH="$HOME/.npm-packages/bin:$PATH"
|
|||
|
||||
#### npm packages
|
||||
To install third party libraries defined in `package.json`, run the
|
||||
following within the `caravel/assets/` directory which will install them in a
|
||||
following within the `superset/assets/` directory which will install them in a
|
||||
new `node_modules/` folder within `assets/`.
|
||||
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
To parse and generate bundled files for caravel, run either of the
|
||||
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.
|
||||
|
||||
|
@ -135,7 +135,7 @@ For every development session you will have to start a flask dev server
|
|||
as well as an npm watcher
|
||||
|
||||
```
|
||||
caravel runserver -d -p 8081
|
||||
superset runserver -d -p 8081
|
||||
npm run dev
|
||||
```
|
||||
|
||||
|
@ -147,7 +147,7 @@ Python tests can be run with:
|
|||
|
||||
We use [Mocha](https://mochajs.org/), [Chai](http://chaijs.com/) and [Enzyme](http://airbnb.io/enzyme/) to test Javascript. Tests can be run with:
|
||||
|
||||
cd /caravel/caravel/assets/javascripts
|
||||
cd /superset/superset/assets/javascripts
|
||||
npm i
|
||||
npm run test
|
||||
|
||||
|
@ -157,13 +157,13 @@ Lint the project with:
|
|||
|
||||
# for python changes
|
||||
flake8 changes tests
|
||||
flake8 changes caravel
|
||||
flake8 changes superset
|
||||
|
||||
# for javascript
|
||||
npm run lint
|
||||
|
||||
## Linting with codeclimate
|
||||
Codeclimate is a service we use to measure code quality and test coverage. To get codeclimate's report on your branch, ideally before sending your PR, you can setup codeclimate against your Caravel fork. After you push to your fork, you should be able to get the report at http://codeclimate.com . Alternatively, if you prefer to work locally, you can install the codeclimate cli tool.
|
||||
Codeclimate is a service we use to measure code quality and test coverage. To get codeclimate's report on your branch, ideally before sending your PR, you can setup codeclimate against your Superset fork. After you push to your fork, you should be able to get the report at http://codeclimate.com . Alternatively, if you prefer to work locally, you can install the codeclimate cli tool.
|
||||
|
||||
*Install the codeclimate cli tool*
|
||||
```
|
||||
|
@ -193,12 +193,12 @@ Generate the documentation with:
|
|||
cd docs && ./build.sh
|
||||
|
||||
## CSS Themes
|
||||
As part of the npm build process, CSS for Caravel is compiled from `Less`, a dynamic stylesheet language.
|
||||
As part of the npm build process, CSS for Superset is compiled from `Less`, a dynamic stylesheet language.
|
||||
|
||||
It's possible to customize or add your own theme to Caravel, either by overriding CSS rules or preferably
|
||||
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/`.
|
||||
|
||||
The `variables.less` and `bootswatch.less` files that ship with Caravel are derived from
|
||||
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]
|
||||
|
||||
|
@ -221,14 +221,14 @@ meets these guidelines:
|
|||
|
||||
## Translations
|
||||
|
||||
We use [Babel](http://babel.pocoo.org/en/latest/) to translate Caravel. The
|
||||
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".
|
||||
|
||||
To enable changing language in your environment, you can simply add the
|
||||
`LANGUAGES` parameter to your `caravel_config.py`. Having more than one
|
||||
`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.
|
||||
|
||||
|
@ -241,23 +241,23 @@ navigation bar.
|
|||
As per the [Flask AppBuilder documentation] about translation, to create a
|
||||
new language dictionary, run the following command:
|
||||
|
||||
pybabel init -i ./babel/messages.pot -d caravel/translations -l es
|
||||
pybabel init -i ./babel/messages.pot -d superset/translations -l es
|
||||
|
||||
Then it's a matter of running the statement below to gather all stings that
|
||||
need translation
|
||||
|
||||
fabmanager babel-extract --target caravel/translations/
|
||||
fabmanager babel-extract --target superset/translations/
|
||||
|
||||
You can then translate the strings gathered in files located under
|
||||
`caravel/translation`, where there's one per language. For the translations
|
||||
`superset/translation`, where there's one per language. For the translations
|
||||
to take effect, they need to be compiled using this command:
|
||||
|
||||
fabmanager babel-compile --target caravel/translations/
|
||||
fabmanager babel-compile --target superset/translations/
|
||||
|
||||
|
||||
## Adding new datasources
|
||||
|
||||
1. Create Models and Views for the datasource, add them under caravel folder, like a new my_models.py
|
||||
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.
|
||||
|
||||
|
@ -267,6 +267,6 @@ to take effect, they need to be compiled using this command:
|
|||
|
||||
For example:
|
||||
|
||||
`ADDITIONAL_MODULE_DS_MAP = {'caravel.my_models': ['MyDatasource', 'MyOtherDatasource']}`
|
||||
`ADDITIONAL_MODULE_DS_MAP = {'superset.my_models': ['MyDatasource', 'MyOtherDatasource']}`
|
||||
|
||||
This means it'll register MyDatasource and MyOtherDatasource in caravel.my_models module in the source registry.
|
||||
This means it'll register MyDatasource and MyOtherDatasource in superset.my_models module in the source registry.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Please use [pull requests](https://github.com/airbnb/caravel/pull/new/master)
|
||||
Please use [pull requests](https://github.com/airbnb/superset/pull/new/master)
|
||||
to add your organization and/or project to this document!
|
||||
|
||||
Organizations
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
Make sure these boxes are checked before submitting your issue - thank you!
|
||||
|
||||
- [ ] I have checked the caravel 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 caravel
|
||||
- [ ] 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
|
||||
|
||||
|
||||
### Caravel version
|
||||
### Superset version
|
||||
|
||||
|
||||
### Expected results
|
||||
|
|
16
MANIFEST.in
|
@ -1,9 +1,9 @@
|
|||
recursive-include caravel/templates *
|
||||
recursive-include caravel/static *
|
||||
recursive-exclude caravel/static/assets/node_modules *
|
||||
recursive-include caravel/static/assets/node_modules/font-awesome *
|
||||
recursive-exclude caravel/static/docs *
|
||||
recursive-exclude caravel/static/spec *
|
||||
recursive-include superset/templates *
|
||||
recursive-include superset/static *
|
||||
recursive-exclude superset/static/assets/node_modules *
|
||||
recursive-include superset/static/assets/node_modules/font-awesome *
|
||||
recursive-exclude superset/static/docs *
|
||||
recursive-exclude superset/static/spec *
|
||||
recursive-exclude tests *
|
||||
recursive-include caravel/data *
|
||||
recursive-include caravel/migrations *
|
||||
recursive-include superset/data *
|
||||
recursive-include superset/migrations *
|
||||
|
|
54
README.md
|
@ -1,20 +1,20 @@
|
|||
Caravel
|
||||
Superset
|
||||
=========
|
||||
<img src="http://i.imgur.com/H0Kyvyi.jpg" style="border-radius: 20px; box-shadow:5px 5px 5px gray;" alt="Caravel" width="500"/>
|
||||
<img src="http://i.imgur.com/H0Kyvyi.jpg" style="border-radius: 20px; box-shadow:5px 5px 5px gray;" alt="Superset" width="500"/>
|
||||
|
||||
[![Build Status](https://travis-ci.org/airbnb/caravel.svg?branch=master)](https://travis-ci.org/airbnb/caravel)
|
||||
[![PyPI version](https://badge.fury.io/py/caravel.svg)](https://badge.fury.io/py/caravel)
|
||||
[![Coverage Status](https://coveralls.io/repos/airbnb/caravel/badge.svg?branch=master&service=github)](https://coveralls.io/github/airbnb/caravel?branch=master)
|
||||
[![JS Test Coverage](https://codeclimate.com/github/airbnb/caravel/badges/coverage.svg)](https://codeclimate.com/github/airbnb/caravel/coverage)
|
||||
[![Code Health](https://landscape.io/github/airbnb/caravel/master/landscape.svg?style=flat)](https://landscape.io/github/airbnb/caravel/master)
|
||||
[![Code Climate](https://codeclimate.com/github/airbnb/caravel/badges/gpa.svg)](https://codeclimate.com/github/airbnb/caravel)
|
||||
[![PyPI](https://img.shields.io/pypi/pyversions/caravel.svg?maxAge=2592000)](https://pypi.python.org/pypi/caravel)
|
||||
[![Requirements Status](https://requires.io/github/airbnb/caravel/requirements.svg?branch=master)](https://requires.io/github/airbnb/caravel/requirements/?branch=master)
|
||||
[![Join the chat at https://gitter.im/airbnb/caravel](https://badges.gitter.im/airbnb/caravel.svg)](https://gitter.im/airbnb/caravel?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[![Documentation](https://img.shields.io/badge/docs-airbnb.io-blue.svg)](http://airbnb.io/caravel/)
|
||||
[![dependencies Status](https://david-dm.org/airbnb/caravel/status.svg?path=caravel/assets)](https://david-dm.org/airbnb/caravel?path=caravel/assets)
|
||||
[![Build Status](https://travis-ci.org/airbnb/superset.svg?branch=master)](https://travis-ci.org/airbnb/superset)
|
||||
[![PyPI version](https://badge.fury.io/py/superset.svg)](https://badge.fury.io/py/superset)
|
||||
[![Coverage Status](https://coveralls.io/repos/airbnb/superset/badge.svg?branch=master&service=github)](https://coveralls.io/github/airbnb/superset?branch=master)
|
||||
[![JS Test Coverage](https://codeclimate.com/github/airbnb/superset/badges/coverage.svg)](https://codeclimate.com/github/airbnb/superset/coverage)
|
||||
[![Code Health](https://landscape.io/github/airbnb/superset/master/landscape.svg?style=flat)](https://landscape.io/github/airbnb/superset/master)
|
||||
[![Code Climate](https://codeclimate.com/github/airbnb/superset/badges/gpa.svg)](https://codeclimate.com/github/airbnb/superset)
|
||||
[![PyPI](https://img.shields.io/pypi/pyversions/superset.svg?maxAge=2592000)](https://pypi.python.org/pypi/superset)
|
||||
[![Requirements Status](https://requires.io/github/airbnb/superset/requirements.svg?branch=master)](https://requires.io/github/airbnb/superset/requirements/?branch=master)
|
||||
[![Join the chat at https://gitter.im/airbnb/superset](https://badges.gitter.im/airbnb/superset.svg)](https://gitter.im/airbnb/superset?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[![Documentation](https://img.shields.io/badge/docs-airbnb.io-blue.svg)](http://airbnb.io/superset/)
|
||||
[![dependencies Status](https://david-dm.org/airbnb/superset/status.svg?path=superset/assets)](https://david-dm.org/airbnb/superset?path=superset/assets)
|
||||
|
||||
Caravel is a data exploration platform designed to be visual, intuitive
|
||||
Superset is a data exploration platform designed to be visual, intuitive
|
||||
and interactive.
|
||||
|
||||
[this project used to be named **Panoramix**]
|
||||
|
@ -36,12 +36,12 @@ Screenshots & Gifs
|
|||
---
|
||||
![img](http://i.imgur.com/DRCnbq6.png)
|
||||
|
||||
Caravel
|
||||
Superset
|
||||
---------
|
||||
Caravel's main goal is to make it easy to slice, dice and visualize data.
|
||||
Superset's main goal is to make it easy to slice, dice and visualize data.
|
||||
It empowers users to perform **analytics at the speed of thought**.
|
||||
|
||||
Caravel provides:
|
||||
Superset provides:
|
||||
* A quick way to intuitively visualize datasets by allowing users to create
|
||||
and share interactive dashboards
|
||||
* A rich set of visualizations to analyze your data, as well as a flexible
|
||||
|
@ -54,7 +54,7 @@ Caravel provides:
|
|||
displayed in the UI, by defining which fields should show up in
|
||||
which dropdown and which aggregation and function (metrics) are
|
||||
made available to the user
|
||||
* Deep integration with Druid allows for Caravel to stay blazing fast while
|
||||
* Deep integration with Druid allows for Superset to stay blazing fast while
|
||||
slicing and dicing large, realtime datasets
|
||||
* Fast loading dashboards with configurable caching
|
||||
|
||||
|
@ -62,7 +62,7 @@ Caravel provides:
|
|||
Database Support
|
||||
----------------
|
||||
|
||||
Caravel was originally designed on top of Druid.io, but quickly broadened
|
||||
Superset was originally designed on top of Druid.io, but quickly broadened
|
||||
its scope to support other databases through the use of SQLAlchemy, a Python
|
||||
ORM that is compatible with
|
||||
[most common databases](http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html).
|
||||
|
@ -83,7 +83,7 @@ power analytic dashboards and applications.*
|
|||
Installation & Configuration
|
||||
----------------------------
|
||||
|
||||
[See in the documentation](http://airbnb.io/caravel/installation.html)
|
||||
[See in the documentation](http://airbnb.io/superset/installation.html)
|
||||
|
||||
|
||||
More screenshots
|
||||
|
@ -112,26 +112,26 @@ More screenshots
|
|||
|
||||
Resources
|
||||
-------------
|
||||
* [Caravel Google Group](https://groups.google.com/forum/#!forum/airbnb_caravel)
|
||||
* [Gitter (live chat) Channel](https://gitter.im/airbnb/caravel)
|
||||
* [Docker image 1](https://hub.docker.com/r/kochalex/caravel/)
|
||||
[Docker image 2](https://hub.docker.com/r/amancevice/caravel/) (community contributed)
|
||||
* [Superset Google Group](https://groups.google.com/forum/#!forum/airbnb_superset)
|
||||
* [Gitter (live chat) Channel](https://gitter.im/airbnb/superset)
|
||||
* [Docker image 1](https://hub.docker.com/r/kochalex/superset/)
|
||||
[Docker image 2](https://hub.docker.com/r/amancevice/superset/) (community contributed)
|
||||
* [Slides from Strata (March 2016)](https://drive.google.com/open?id=0B5PVE0gzO81oOVJkdF9aNkJMSmM)
|
||||
|
||||
|
||||
Tip of the Hat
|
||||
--------------
|
||||
|
||||
Caravel would not be possible without these great frameworks / libs
|
||||
Superset would not be possible without these great frameworks / libs
|
||||
|
||||
* Flask App Builder - Allowing us to focus on building the app quickly while
|
||||
getting the foundation for free
|
||||
* The Flask ecosystem - Simply amazing. So much Plug, easy play.
|
||||
* NVD3 - One of the best charting libraries out there
|
||||
* Much more, check out the `install_requires` section in the [setup.py](https://github.com/airbnb/caravel/blob/master/setup.py) file!
|
||||
* Much more, check out the `install_requires` section in the [setup.py](https://github.com/airbnb/superset/blob/master/setup.py) file!
|
||||
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Interested in contributing? Casual hacking? Check out [Contributing.MD](https://github.com/airbnb/caravel/blob/master/CONTRIBUTING.md)
|
||||
Interested in contributing? Casual hacking? Check out [Contributing.MD](https://github.com/airbnb/superset/blob/master/CONTRIBUTING.md)
|
||||
|
|
4
TODO.md
|
@ -1,5 +1,5 @@
|
|||
# TODO
|
||||
List of TODO items for Caravel
|
||||
List of TODO items for Superset
|
||||
|
||||
## Important
|
||||
* **Getting proper JS testing:** unit tests on the Python side are pretty
|
||||
|
@ -7,7 +7,7 @@ List of TODO items for Caravel
|
|||
testing all the ajax-type calls
|
||||
* **Viz Plugins:** Allow people to define and share visualization plugins.
|
||||
ideally one would only need to drop in a set of files in a folder and
|
||||
Caravel would discover and expose the plugins
|
||||
Superset would discover and expose the plugins
|
||||
|
||||
## Features
|
||||
* **Dashboard URL filters:** `{dash_url}#fltin__fieldname__value1,value2`
|
||||
|
|
|
@ -29,7 +29,7 @@ script_location = migrations
|
|||
# are written from script.py.mako
|
||||
# output_encoding = utf-8
|
||||
|
||||
sqlalchemy.url = scheme://localhost/caravel
|
||||
sqlalchemy.url = scheme://localhost/superset
|
||||
|
||||
# Logging configuration
|
||||
[loggers]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[ignore: caravel/assets/node_modules/**]
|
||||
[python: caravel/**.py]
|
||||
[jinja2: caravel/**/templates/**.html]
|
||||
[ignore: superset/assets/node_modules/**]
|
||||
[python: superset/**.py]
|
||||
[jinja2: superset/**/templates/**.html]
|
||||
encoding = utf-8
|
||||
|
|
Before Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 236 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 147 KiB |
|
@ -5,6 +5,7 @@ mock
|
|||
mysqlclient
|
||||
nose
|
||||
psycopg2
|
||||
pyyaml
|
||||
sphinx
|
||||
sphinx-rtd-theme
|
||||
sphinxcontrib.youtube
|
||||
|
|
|
@ -87,9 +87,9 @@ qthelp:
|
|||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/caravel.qhcp"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/superset.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/caravel.qhc"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/superset.qhc"
|
||||
|
||||
applehelp:
|
||||
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
|
||||
|
@ -104,8 +104,8 @@ devhelp:
|
|||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/caravel"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/caravel"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/superset"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/superset"
|
||||
@echo "# devhelp"
|
||||
|
||||
epub:
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<img src="_static/img/dash.png">
|
||||
<div class="carousel-caption">
|
||||
<div>
|
||||
<h1>Caravel</h1>
|
||||
<h1>Superset</h1>
|
||||
<p>
|
||||
an open source data visualization platform
|
||||
</p>
|
||||
|
@ -80,7 +80,7 @@
|
|||
<hr/>
|
||||
<div class="container">
|
||||
<div class="jumbotron">
|
||||
<h1>Caravel</h1>
|
||||
<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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
rm -rf _build
|
||||
make html
|
||||
#cp -r ../caravel/assets/images/ _build/html/_static/img/
|
||||
cp -r ../caravel/assets/images/ _static/img/
|
||||
rm -rf /tmp/caravel-docs
|
||||
cp -r _build/html /tmp/caravel-docs
|
||||
#cp -r ../superset/assets/images/ _build/html/_static/img/
|
||||
cp -r ../superset/assets/images/ _static/img/
|
||||
rm -rf /tmp/superset-docs
|
||||
cp -r _build/html /tmp/superset-docs
|
||||
|
|
14
docs/conf.py
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# caravel documentation build configuration file, created by
|
||||
# superset documentation build configuration file, created by
|
||||
# sphinx-quickstart on Thu Dec 17 15:42:06 2015.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
|
@ -51,7 +51,7 @@ source_suffix = '.rst'
|
|||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = "Caravel's documentation"
|
||||
project = "Superset's documentation"
|
||||
copyright = None
|
||||
author = u'Maxime Beauchemin'
|
||||
|
||||
|
@ -209,7 +209,7 @@ html_show_copyright = False
|
|||
#html_search_scorer = 'scorer.js'
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'caraveldoc'
|
||||
htmlhelp_basename = 'supersetdoc'
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
|
@ -231,7 +231,7 @@ latex_elements = {
|
|||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, 'caravel.tex', u'Caravel Documentation',
|
||||
(master_doc, 'superset.tex', u'Superset Documentation',
|
||||
u'Maxime Beauchemin', 'manual'),
|
||||
]
|
||||
|
||||
|
@ -261,7 +261,7 @@ latex_documents = [
|
|||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
(master_doc, 'Caravel', u'caravel Documentation',
|
||||
(master_doc, 'Superset', u'superset Documentation',
|
||||
[author], 1)
|
||||
]
|
||||
|
||||
|
@ -275,8 +275,8 @@ man_pages = [
|
|||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, 'Caravel', u'Caravel Documentation',
|
||||
author, 'Caravel', 'One line description of project.',
|
||||
(master_doc, 'Superset', u'Superset Documentation',
|
||||
author, 'Superset', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Druid
|
||||
=====
|
||||
|
||||
Caravel works well with Druid, though currently not all
|
||||
Superset works well with Druid, though currently not all
|
||||
advanced features out of Druid are covered. This page clarifies what is
|
||||
covered and what isn't and explains how to use some of the features.
|
||||
|
||||
|
@ -15,7 +15,7 @@ Supported
|
|||
Aggregations
|
||||
------------
|
||||
|
||||
Common aggregations, or Druid metrics can be defined and used in Caravel.
|
||||
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``).
|
||||
|
@ -34,7 +34,7 @@ documentation.
|
|||
Post-Aggregations
|
||||
-----------------
|
||||
|
||||
Druid supports post aggregation and this works in Caravel. All you have to
|
||||
Druid supports post aggregation and this works in Superset. All you have to
|
||||
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
|
||||
|
|
14
docs/faq.rst
|
@ -4,7 +4,7 @@ FAQ
|
|||
|
||||
Can I query/join multiple tables at one time?
|
||||
---------------------------------------------
|
||||
Not directly no. A Caravel SQLAlchemy datasource can only be a single table
|
||||
Not directly no. A Superset SQLAlchemy datasource can only be a single table
|
||||
or a view.
|
||||
|
||||
When working with tables, the solution would be to materialize
|
||||
|
@ -14,15 +14,15 @@ through some scheduled batch process.
|
|||
A view is a simple logical layer that abstract an arbitrary SQL queries as
|
||||
a virtual table. This can allow you to join and union multiple tables, and
|
||||
to apply some transformation using arbitrary SQL expressions. The limitation
|
||||
there is your database performance as Caravel effectively will run a query
|
||||
there is your database performance as Superset effectively will run a query
|
||||
on top of your query (view). A good practice may be to limit yourself to
|
||||
joining your main large table to one or many small tables only, and avoid
|
||||
using ``GROUP BY`` where possible as Caravel will do its own ``GROUP BY`` and
|
||||
using ``GROUP BY`` where possible as Superset will do its own ``GROUP BY`` and
|
||||
doing the work twice might slow down performance.
|
||||
|
||||
Whether you use a table or a view, the important factor is whether your
|
||||
database is fast enough to serve it in an interactive fashion to provide
|
||||
a good user experience in Caravel.
|
||||
a good user experience in Superset.
|
||||
|
||||
|
||||
How BIG can my data source be?
|
||||
|
@ -42,7 +42,7 @@ framework, in the meantime, we've tagged a few pull requests as
|
|||
``example`` to give people examples of how to contribute new
|
||||
visualizations.
|
||||
|
||||
https://github.com/airbnb/caravel/issues?q=label%3Aexample+is%3Aclosed
|
||||
https://github.com/airbnb/superset/issues?q=label%3Aexample+is%3Aclosed
|
||||
|
||||
|
||||
Why are my queries timing out?
|
||||
|
@ -53,14 +53,14 @@ it's because the web server is timing out web requests. If you want to
|
|||
increase the default (50), you can specify the timeout when starting the
|
||||
web server with the ``-t`` flag, which is expressed in seconds.
|
||||
|
||||
``caravel runserver -t 300``
|
||||
``superset runserver -t 300``
|
||||
|
||||
|
||||
Why is the map not visible in the mapbox visualization?
|
||||
-------------------------------------------------------
|
||||
|
||||
You need to register to mapbox.com, get an API key and configure it as
|
||||
``MAPBOX_API_KEY`` in ``caravel_config.py``.
|
||||
``MAPBOX_API_KEY`` in ``superset_config.py``.
|
||||
|
||||
|
||||
How to add dynamic filters to a dashboard?
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
Caravel's documentation
|
||||
Superset's documentation
|
||||
'''''''''''''''''''''''
|
||||
|
||||
Caravel is a data exploration platform designed to be visual, intuitive
|
||||
Superset is a data exploration platform designed to be visual, intuitive
|
||||
and interactive.
|
||||
|
||||
.. image:: _static/img/caravel.jpg
|
||||
|
||||
----------------
|
||||
|
||||
.. warning:: This project used to be named Panoramix and has been renamed
|
||||
to Caravel in March 2016
|
||||
.. warning:: This project was originally named Panoramix, was renamed to
|
||||
Caravel in March 2016, and is currently named Superset as of November 2016
|
||||
|
||||
Overview
|
||||
=======================================
|
||||
|
|
|
@ -4,19 +4,19 @@ Installation & Configuration
|
|||
Getting Started
|
||||
---------------
|
||||
|
||||
Caravel is tested using Python 2.7 and Python 3.4+. Python 3 is the recommended version,
|
||||
Superset is tested using Python 2.7 and Python 3.4+. Python 3 is the recommended version,
|
||||
Python 2.6 won't be supported.
|
||||
|
||||
|
||||
OS dependencies
|
||||
---------------
|
||||
|
||||
Caravel stores database connection information in its metadata database.
|
||||
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.
|
||||
|
||||
You may want to attempt the next step
|
||||
("Caravel installation and initialization") and come back to this step if
|
||||
("Superset installation and initialization") and come back to this step if
|
||||
you encounter an error.
|
||||
|
||||
Here's how to install them:
|
||||
|
@ -47,7 +47,7 @@ attempt it, download `get-pip.py <https://bootstrap.pypa.io/get-pip.py>`_, and r
|
|||
|
||||
Python virtualenv
|
||||
-----------------
|
||||
It is recommended to install Caravel inside a virtualenv. Python 3 already ships virtualenv, for
|
||||
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: ::
|
||||
|
||||
|
@ -73,40 +73,40 @@ and ``setuptools`` libraries.::
|
|||
|
||||
pip install --upgrade setuptools pip
|
||||
|
||||
Caravel installation and initialization
|
||||
Superset installation and initialization
|
||||
---------------------------------------
|
||||
Follow these few simple steps to install Caravel.::
|
||||
Follow these few simple steps to install Superset.::
|
||||
|
||||
# Install caravel
|
||||
pip install caravel
|
||||
# Install superset
|
||||
pip install superset
|
||||
|
||||
# Create an admin user
|
||||
fabmanager create-admin --app caravel
|
||||
fabmanager create-admin --app superset
|
||||
|
||||
# Initialize the database
|
||||
caravel db upgrade
|
||||
superset db upgrade
|
||||
|
||||
# Load some data to play with
|
||||
caravel load_examples
|
||||
superset load_examples
|
||||
|
||||
# Create default roles and permissions
|
||||
caravel init
|
||||
superset init
|
||||
|
||||
# Start the web server on port 8088
|
||||
caravel runserver -p 8088
|
||||
superset runserver -p 8088
|
||||
|
||||
# To start a development web server, use the -d switch
|
||||
# caravel runserver -d
|
||||
# superset runserver -d
|
||||
|
||||
|
||||
After installation, you should be able to point your browser to the right
|
||||
hostname:port `http://localhost:8088 <http://localhost:8088>`_, login using
|
||||
the credential you entered while creating the admin account, and navigate to
|
||||
`Menu -> Admin -> Refresh Metadata`. This action should bring in all of
|
||||
your datasources for Caravel to be aware of, and they should show up in
|
||||
your datasources for Superset to be aware of, and they should show up in
|
||||
`Menu -> Datasources`, from where you can start playing with your data!
|
||||
|
||||
Please note that *gunicorn*, Caravel default application server, does not
|
||||
Please note that *gunicorn*, Superset default application server, does not
|
||||
work on Windows so you need to use the development web server.
|
||||
The development web server though is not intended to be used on production systems
|
||||
so better use a supported platform that can run *gunicorn*.
|
||||
|
@ -114,14 +114,14 @@ so better use a supported platform that can run *gunicorn*.
|
|||
Configuration behind a load balancer
|
||||
------------------------------------
|
||||
|
||||
If you are running caravel behind a load balancer or reverse proxy (e.g. NGINX
|
||||
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 caravel instance is running. This is provided
|
||||
load balancer knows if your superset instance is running. This is provided
|
||||
at ``/health`` which will return a 200 response containing "OK" if the
|
||||
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 caravel config file to extract and use
|
||||
should set `ENABLE_PROXY_FIX = True` in the superset config file to extract and use
|
||||
the headers.
|
||||
|
||||
|
||||
|
@ -129,16 +129,16 @@ Configuration
|
|||
-------------
|
||||
|
||||
To configure your application, you need to create a file (module)
|
||||
``caravel_config.py`` and make sure it is in your PYTHONPATH. Here are some
|
||||
``superset_config.py`` and make sure it is in your PYTHONPATH. Here are some
|
||||
of the parameters you can copy / paste in that configuration module: ::
|
||||
|
||||
#---------------------------------------------------------
|
||||
# Caravel specific config
|
||||
# Superset specific config
|
||||
#---------------------------------------------------------
|
||||
ROW_LIMIT = 5000
|
||||
CARAVEL_WORKERS = 4
|
||||
SUPERSET_WORKERS = 4
|
||||
|
||||
CARAVEL_WEBSERVER_PORT = 8088
|
||||
SUPERSET_WEBSERVER_PORT = 8088
|
||||
#---------------------------------------------------------
|
||||
|
||||
#---------------------------------------------------------
|
||||
|
@ -149,10 +149,10 @@ of the parameters you can copy / paste in that configuration module: ::
|
|||
|
||||
# The SQLAlchemy connection string to your database backend
|
||||
# This connection defines the path to the database that stores your
|
||||
# caravel metadata (slices, connections, tables, dashboards, ...).
|
||||
# superset metadata (slices, connections, tables, dashboards, ...).
|
||||
# Note that the connection information to connect to the datasources
|
||||
# you want to explore are managed directly in the web UI
|
||||
SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/caravel.db'
|
||||
SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/superset.db'
|
||||
|
||||
# Flask-WTF flag for CSRF
|
||||
CSRF_ENABLED = True
|
||||
|
@ -161,24 +161,24 @@ of the parameters you can copy / paste in that configuration module: ::
|
|||
MAPBOX_API_KEY = ''
|
||||
|
||||
This file also allows you to define configuration parameters used by
|
||||
Flask App Builder, the web framework used by Caravel. Please consult
|
||||
Flask App Builder, the web framework used by Superset. Please consult
|
||||
the `Flask App Builder Documentation
|
||||
<http://flask-appbuilder.readthedocs.org/en/latest/config.html>`_
|
||||
for more information on how to configure Caravel.
|
||||
for more information on how to configure Superset.
|
||||
|
||||
Please make sure to change:
|
||||
|
||||
* *SQLALCHEMY_DATABASE_URI*, by default it is stored at *~/.caravel/caravel.db*
|
||||
* *SQLALCHEMY_DATABASE_URI*, by default it is stored at *~/.superset/superset.db*
|
||||
* *SECRET_KEY*, to a long random string
|
||||
|
||||
Database dependencies
|
||||
---------------------
|
||||
|
||||
Caravel does not ship bundled with connectivity to databases, except
|
||||
Superset does not ship bundled with connectivity to databases, except
|
||||
for Sqlite, which is part of the Python standard library.
|
||||
You'll need to install the required packages for the database you
|
||||
want to use as your metadata database as well as the packages needed to
|
||||
connect to the databases you want to access through Caravel.
|
||||
connect to the databases you want to access through Superset.
|
||||
|
||||
Here's a list of some of the recommended packages.
|
||||
|
||||
|
@ -213,9 +213,9 @@ database you want to connect to should get you to the right place.
|
|||
Caching
|
||||
-------
|
||||
|
||||
Caravel uses `Flask-Cache <https://pythonhosted.org/Flask-Cache/>`_ for
|
||||
Superset uses `Flask-Cache <https://pythonhosted.org/Flask-Cache/>`_ for
|
||||
caching purpose. Configuring your caching backend is as easy as providing
|
||||
a ``CACHE_CONFIG``, constant in your ``caravel_config.py`` that
|
||||
a ``CACHE_CONFIG``, constant in your ``superset_config.py`` that
|
||||
complies with the Flask-Cache specifications.
|
||||
|
||||
Flask-Cache supports multiple caching backends (Redis, Memcached,
|
||||
|
@ -224,7 +224,7 @@ Memcached please use the pylibmc client library as python-memcached does
|
|||
not handle storing binary data correctly. If you use Redis, please install
|
||||
[python-redis](https://pypi.python.org/pypi/redis).
|
||||
|
||||
For setting your timeouts, this is done in the Caravel metadata and goes
|
||||
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``.
|
||||
|
@ -252,7 +252,7 @@ Schemas (Postgres & Redshift)
|
|||
|
||||
Postgres and Redshift, as well as other database,
|
||||
use the concept of **schema** as a logical entity
|
||||
on top of the **database**. For Caravel to connect to a specific schema,
|
||||
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.
|
||||
|
||||
|
||||
|
@ -284,7 +284,7 @@ Druid
|
|||
|
||||
* Navigate to your datasources
|
||||
|
||||
Note that you can run the ``caravel refresh_druid`` command to refresh the
|
||||
Note that you can run the ``superset refresh_druid`` command to refresh the
|
||||
metadata from your Druid cluster(s)
|
||||
|
||||
|
||||
|
@ -293,10 +293,10 @@ CORS
|
|||
|
||||
The extra CORS Dependency must be installed:
|
||||
|
||||
caravel[cors]
|
||||
superset[cors]
|
||||
|
||||
|
||||
The following keys in `caravel_config.py` can be specified to configure CORS:
|
||||
The following keys in `superset_config.py` can be specified to configure CORS:
|
||||
|
||||
|
||||
* ``ENABLE_CORS``: Must be set to True in order to enable CORS
|
||||
|
@ -307,16 +307,16 @@ Upgrading
|
|||
|
||||
Upgrading should be as straightforward as running::
|
||||
|
||||
pip install caravel --upgrade
|
||||
caravel db upgrade
|
||||
caravel init
|
||||
pip install superset --upgrade
|
||||
superset db upgrade
|
||||
superset init
|
||||
|
||||
SQL Lab
|
||||
-------
|
||||
SQL Lab is a powerful SQL IDE that works with all SQLAlchemy compatible
|
||||
databases out there. By default, queries are run in a web request, and
|
||||
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 Caravel
|
||||
request in your environment, whether it'd be a reverse proxy or the Superset
|
||||
server itself.
|
||||
|
||||
In the modern analytics world, it's not uncommon to run large queries that
|
||||
|
@ -324,7 +324,7 @@ run 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 deploy an asynchronous backend, which consist of one or many
|
||||
Caravel worker, which is implemented as a Celery worker, and a Celery
|
||||
Superset worker, which is implemented as a Celery worker, and a Celery
|
||||
broker for which we recommend using Redis or RabbitMQ.
|
||||
|
||||
It's also preferable to setup an async result backend as a key value store
|
||||
|
@ -333,20 +333,20 @@ details to come as to how to set this up here soon.
|
|||
|
||||
SQL Lab supports templating in queries, and it's possible to override
|
||||
the default Jinja context in your environment by defining the
|
||||
``JINJA_CONTEXT_ADDONS`` in your caravel configuration. Objects referenced
|
||||
``JINJA_CONTEXT_ADDONS`` in your superset configuration. Objects referenced
|
||||
in this dictionary are made available for users to use in their SQL.
|
||||
|
||||
|
||||
Making your own build
|
||||
---------------------
|
||||
|
||||
For more advanced users, you may want to build Caravel 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.::
|
||||
|
||||
# assuming $CARAVEL_HOME as the root of the repo
|
||||
cd $CARAVEL_HOME/caravel/assets
|
||||
# assuming $SUPERSET_HOME as the root of the repo
|
||||
cd $SUPERSET_HOME/superset/assets
|
||||
npm install
|
||||
npm run prod
|
||||
cd $CARAVEL_HOME
|
||||
cd $SUPERSET_HOME
|
||||
python setup.py install
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
Security
|
||||
========
|
||||
Security in Caravel is handled by Flask AppBuilder (FAB). FAB is a
|
||||
Security in Superset is handled by Flask AppBuilder (FAB). FAB is a
|
||||
"Simple and rapid application development framework, built on top of Flask.".
|
||||
FAB provides authentication, user management, permissions and roles.
|
||||
|
||||
|
||||
Provided Roles
|
||||
--------------
|
||||
Caravel ships with 3 roles that are handled by Caravel itself. You can
|
||||
assume that these 3 roles will stay up-to-date as Caravel evolves.
|
||||
Superset ships with 3 roles that are handled by Superset itself. You can
|
||||
assume that these 3 roles will stay up-to-date as Superset evolves.
|
||||
|
||||
Admin
|
||||
"""""
|
||||
|
@ -59,17 +59,17 @@ 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 create (can_add, can_delete, can_show, can_edit, ...) as well as for
|
||||
each view. On top of that, Caravel can expose more granular permissions like
|
||||
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 Caravel build 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
|
||||
"""""""""""
|
||||
|
||||
Roles are composed of a set of permissions, and Caravel has many categories
|
||||
Roles are composed of a set of permissions, and Superset has many categories
|
||||
of permissions. Here are the different categories of permissions:
|
||||
|
||||
- **Model & action**: models are entities like ``Dashboard``,
|
||||
|
|
|
@ -9,7 +9,7 @@ Feature Overview
|
|||
----------------
|
||||
- Connects to just about any database backend
|
||||
- A multi-tab environment to work on multiple queries at a time
|
||||
- A smooth flow to visualize your query results using Caravel's rich
|
||||
- A smooth flow to visualize your query results using Superset's rich
|
||||
visualization capabilities
|
||||
- Browse database metadata: tables, columns, indexes, partitions
|
||||
- Support for long-running queries
|
||||
|
@ -45,7 +45,7 @@ Available macros
|
|||
''''''''''''''''
|
||||
|
||||
We expose certain modules from Python's standard library in
|
||||
Caravel's Jinja context:
|
||||
Superset's Jinja context:
|
||||
- ``time``: ``time``
|
||||
- ``datetime``: ``datetime.datetime``
|
||||
- ``uuid``: ``uuid``
|
||||
|
@ -56,5 +56,5 @@ Caravel's Jinja context:
|
|||
`Jinja's builtin filters <http://jinja.pocoo.org/docs/dev/templates/>`_ can be also be applied where needed.
|
||||
|
||||
|
||||
.. autoclass:: caravel.jinja_context.PrestoContext
|
||||
.. autoclass:: superset.jinja_context.PrestoTemplateProcessor
|
||||
:members:
|
||||
|
|
|
@ -3,7 +3,7 @@ Tutorial
|
|||
|
||||
This basic linear tutorial will take you through connecting to a database,
|
||||
adding a table, creating a slice and a dashboard. First you'll need to tell
|
||||
Caravel where to find the database you want to
|
||||
Superset where to find the database you want to
|
||||
query. First go to the database menu
|
||||
|
||||
.. image:: _static/img/tutorial/db_menu.png
|
||||
|
@ -29,7 +29,7 @@ plus (``+``) sign there (similar to the one ).
|
|||
|
||||
Now enter the name of the table in the ``Table Name`` textbox, and select
|
||||
the database you just created in the ``Database`` dropdown, hit save. At this
|
||||
moment, Caravel fetched the column names, their data types and tries to guess
|
||||
moment, Superset fetched the column names, their data types and tries to guess
|
||||
which fields are metrics in dimensions. From the list view, edit the table
|
||||
that you just created by clicking the tiny pen icon.
|
||||
|
||||
|
@ -42,9 +42,9 @@ showing you the list of columns in your table as well as their data types.
|
|||
.. image:: _static/img/tutorial/matrix.png
|
||||
:scale: 30 %
|
||||
|
||||
Click the checkboxes here that inform Caravel how your columns should be
|
||||
Click the checkboxes here that inform Superset how your columns should be
|
||||
shown in the explore view, and which metrics should be created. Make sure
|
||||
to inform Caravel about your date columns. You could also create
|
||||
to inform Superset about your date columns. You could also create
|
||||
"SQL expression" columns here, or metrics in that tab as aggregate expressions,
|
||||
but let's not do that just yet. Hit ``save``.
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@ Videos
|
|||
======
|
||||
|
||||
Here is a collection of short videos showing different aspect
|
||||
of Caravel.
|
||||
of Superset.
|
||||
|
||||
Quick Intro
|
||||
'''''''''''
|
||||
This video demonstrates how Caravel works at a high level, it shows how
|
||||
This video demonstrates how Superset works at a high level, it shows how
|
||||
to navigate through datasets and dashboards that are already available.
|
||||
|
||||
.. youtube:: https://www.youtube.com/watch?v=3Txm_nj_R7M
|
||||
|
@ -41,7 +41,7 @@ to toggle them on dashboards.
|
|||
|
||||
Adding a Table
|
||||
''''''''''''''
|
||||
This videos shows you how to expose a new table in Caravel, and how to
|
||||
This videos shows you how to expose a new table in Superset, and how to
|
||||
define the semantics on how this can be accessed by others in the ``Explore``
|
||||
and ``Dashboard`` views.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cd caravel/assets/
|
||||
cd superset/assets/
|
||||
rm build/*
|
||||
npm run prod
|
||||
cd ../..
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
echo $DB
|
||||
rm -f .coverage
|
||||
export CARAVEL_CONFIG=tests.caravel_test_config
|
||||
export SUPERSET_CONFIG=tests.superset_test_config
|
||||
set -e
|
||||
caravel/bin/caravel version -v
|
||||
superset/bin/superset version -v
|
||||
export SOLO_TEST=1
|
||||
# e.g. tests.core_tests:CoreTests.test_templated_sql_json
|
||||
nosetests $1
|
||||
|
|
14
run_tests.sh
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
echo $DB
|
||||
rm ~/.caravel/unittests.db
|
||||
rm ~/.caravel/celerydb.sqlite
|
||||
rm ~/.caravel/celery_results.sqlite
|
||||
rm ~/.superset/unittests.db
|
||||
rm ~/.superset/celerydb.sqlite
|
||||
rm ~/.superset/celery_results.sqlite
|
||||
rm -f .coverage
|
||||
export CARAVEL_CONFIG=tests.caravel_test_config
|
||||
export SUPERSET_CONFIG=tests.superset_test_config
|
||||
set -e
|
||||
caravel/bin/caravel db upgrade
|
||||
caravel/bin/caravel db upgrade # running twice on purpose as a test
|
||||
caravel/bin/caravel version -v
|
||||
superset/bin/superset db upgrade
|
||||
superset/bin/superset db upgrade # running twice on purpose as a test
|
||||
superset/bin/superset version -v
|
||||
python setup.py nosetests
|
||||
coveralls
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[metadata]
|
||||
name = Caravel
|
||||
name = Superset
|
||||
summary = a data exploration platform
|
||||
description-file = README.md
|
||||
author = Maxime Beauchemin
|
||||
|
@ -7,7 +7,7 @@ author-email = maximebeauchemin@gmail.com
|
|||
license = Apache License, Version 2.0
|
||||
|
||||
[files]
|
||||
packages = caravel
|
||||
packages = superset
|
||||
|
||||
[build_sphinx]
|
||||
source-dir = docs/
|
||||
|
@ -22,7 +22,7 @@ verbosity=3
|
|||
detailed-errors=1
|
||||
with-coverage=1
|
||||
nocapture=1
|
||||
cover-package=caravel
|
||||
cover-package=superset
|
||||
|
||||
[pycodestyle]
|
||||
max-line-length=90
|
||||
|
|
10
setup.py
|
@ -4,13 +4,13 @@ import json
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
PACKAGE_DIR = os.path.join(BASE_DIR, 'caravel', 'static', 'assets')
|
||||
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']
|
||||
|
||||
setup(
|
||||
name='caravel',
|
||||
name='superset',
|
||||
description=(
|
||||
"A interactive data visualization platform build on SqlAlchemy "
|
||||
"and druid.io"),
|
||||
|
@ -18,7 +18,7 @@ setup(
|
|||
packages=find_packages(),
|
||||
include_package_data=True,
|
||||
zip_safe=False,
|
||||
scripts=['caravel/bin/caravel'],
|
||||
scripts=['superset/bin/superset'],
|
||||
install_requires=[
|
||||
'celery==3.1.23',
|
||||
'cryptography==1.5.3',
|
||||
|
@ -57,9 +57,9 @@ setup(
|
|||
],
|
||||
author='Maxime Beauchemin',
|
||||
author_email='maximebeauchemin@gmail.com',
|
||||
url='https://github.com/airbnb/caravel',
|
||||
url='https://github.com/airbnb/superset',
|
||||
download_url=(
|
||||
'https://github.com/airbnb/caravel/tarball/' + version_string),
|
||||
'https://github.com/airbnb/superset/tarball/' + version_string),
|
||||
classifiers=[
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
|
|
|
@ -13,13 +13,13 @@ from flask_appbuilder import SQLA, AppBuilder, IndexView
|
|||
from flask_appbuilder.baseviews import expose
|
||||
from flask_cache import Cache
|
||||
from flask_migrate import Migrate
|
||||
from caravel.source_registry import SourceRegistry
|
||||
from superset.source_registry import SourceRegistry
|
||||
from werkzeug.contrib.fixers import ProxyFix
|
||||
from caravel import utils
|
||||
from superset import utils
|
||||
|
||||
|
||||
APP_DIR = os.path.dirname(__file__)
|
||||
CONFIG_MODULE = os.environ.get('CARAVEL_CONFIG', 'caravel.config')
|
||||
CONFIG_MODULE = os.environ.get('SUPERSET_CONFIG', 'superset.config')
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(CONFIG_MODULE)
|
||||
|
@ -66,11 +66,11 @@ if app.config.get('UPLOAD_FOLDER'):
|
|||
class MyIndexView(IndexView):
|
||||
@expose('/')
|
||||
def index(self):
|
||||
return redirect('/caravel/welcome')
|
||||
return redirect('/superset/welcome')
|
||||
|
||||
appbuilder = AppBuilder(
|
||||
app, db.session,
|
||||
base_template='caravel/base.html',
|
||||
base_template='superset/base.html',
|
||||
indexview=MyIndexView,
|
||||
security_manager_class=app.config.get("CUSTOM_SECURITY_MANAGER"))
|
||||
|
||||
|
@ -84,4 +84,4 @@ module_datasource_map = app.config.get("DEFAULT_MODULE_DS_MAP")
|
|||
module_datasource_map.update(app.config.get("ADDITIONAL_MODULE_DS_MAP"))
|
||||
SourceRegistry.register_sources(module_datasource_map)
|
||||
|
||||
from caravel import views, config # noqa
|
||||
from superset import views, config # noqa
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 459 KiB After Width: | Height: | Size: 459 KiB |
Before Width: | Height: | Size: 702 KiB After Width: | Height: | Size: 702 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 328 KiB After Width: | Height: | Size: 328 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 552 KiB After Width: | Height: | Size: 552 KiB |
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 154 KiB |
Before Width: | Height: | Size: 190 KiB After Width: | Height: | Size: 190 KiB |
Before Width: | Height: | Size: 245 KiB After Width: | Height: | Size: 245 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 141 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 253 KiB |
Before Width: | Height: | Size: 242 KiB After Width: | Height: | Size: 242 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 425 KiB After Width: | Height: | Size: 425 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 738 KiB After Width: | Height: | Size: 738 KiB |
Before Width: | Height: | Size: 314 KiB After Width: | Height: | Size: 314 KiB |
Before Width: | Height: | Size: 220 KiB After Width: | Height: | Size: 220 KiB |
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 460 KiB After Width: | Height: | Size: 460 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 270 KiB After Width: | Height: | Size: 270 KiB |
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 170 KiB |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 133 KiB |
|
@ -77,7 +77,7 @@ export function requestQueryResults(query) {
|
|||
export function fetchQueryResults(query) {
|
||||
return function (dispatch) {
|
||||
dispatch(requestQueryResults(query));
|
||||
const sqlJsonUrl = `/caravel/results/${query.resultsKey}/`;
|
||||
const sqlJsonUrl = `/superset/results/${query.resultsKey}/`;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
|
@ -95,7 +95,7 @@ export function fetchQueryResults(query) {
|
|||
export function runQuery(query) {
|
||||
return function (dispatch) {
|
||||
dispatch(startQuery(query));
|
||||
const sqlJsonUrl = '/caravel/sql_json/';
|
||||
const sqlJsonUrl = '/superset/sql_json/';
|
||||
const sqlJsonRequest = {
|
||||
client_id: query.id,
|
||||
database_id: query.dbId,
|
||||
|
@ -211,7 +211,7 @@ export function mergeTable(table, query) {
|
|||
|
||||
export function addTable(query, tableName) {
|
||||
return function (dispatch) {
|
||||
let url = `/caravel/table/${query.dbId}/${tableName}/${query.schema}/`;
|
||||
let url = `/superset/table/${query.dbId}/${tableName}/${query.schema}/`;
|
||||
$.get(url, (data) => {
|
||||
const dataPreviewQuery = {
|
||||
id: shortid.generate(),
|
||||
|
@ -244,7 +244,7 @@ export function addTable(query, tableName) {
|
|||
);
|
||||
});
|
||||
|
||||
url = `/caravel/extra_table_metadata/${query.dbId}/${tableName}/${query.schema}/`;
|
||||
url = `/superset/extra_table_metadata/${query.dbId}/${tableName}/${query.schema}/`;
|
||||
$.get(url, (data) => {
|
||||
const table = {
|
||||
dbId: query.dbId,
|