[dashed->caravel] Replace in files

This commit is contained in:
Maxime Beauchemin 2016-03-28 21:55:58 -07:00
parent d48796f00e
commit 619d35878f
59 changed files with 224 additions and 223 deletions

7
.gitignore vendored
View File

@ -4,15 +4,16 @@ babel
.coverage
_build
_static
dashed/bin/dashedc
caravel/bin/caravelc
envpy3
build
*.db
tmp
dashed_config.py
caravel_config.py
local_config.py
env
dist
dashed.egg-info/
caravel.egg-info/
app.db
*.bak

View File

@ -16,8 +16,8 @@ pep8:
full: true
ignore-paths:
- docs
- dashed/migrations/env.py
- dashed/ascii_art.py
- caravel/migrations/env.py
- caravel/ascii_art.py
ignore-patterns:
- ^example/doc_.*\.py$
- (^|/)docs(/|$)

View File

@ -11,7 +11,7 @@ before_install:
install:
- pip wheel -w $HOME/.wheelhouse -f $HOME/.wheelhouse .
- pip install --find-links=$HOME/.wheelhouse --no-index .
- cd dashed/assets
- cd caravel/assets
- npm install
- npm run lint
- npm run prod

View File

@ -30,8 +30,8 @@ Look through the GitHub issues for features. Anything tagged with
### Documentation
Dashed could always use better documentation,
whether as part of the official Dashed docs,
Caravel could always use better documentation,
whether as part of the official Caravel docs,
in docstrings, `docs/*.rst` or even on the web as blog posts or
articles.
@ -49,14 +49,14 @@ If you are proposing a feature:
## Latest Documentation
[API Documentation](http://pythonhosted.com/dashed)
[API Documentation](http://pythonhosted.com/caravel)
## Setting up a Python development environment
# 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:mistercrunch/dashed.git
# git clone git@github.com:mistercrunch/caravel.git
# [optional] setup a virtual env and activate it
virtualenv env
@ -66,24 +66,24 @@ If you are proposing a feature:
python setup.py develop
# Create an admin user
fabmanager create-admin --app dashed
fabmanager create-admin --app caravel
# Initialize the database
dashed db upgrade
caravel db upgrade
# Create default roles and permissions
dashed init
caravel init
# Load some data to play with
dashed load_examples
caravel load_examples
# start a dev web server
dashed runserver -d
caravel runserver -d
## Setting up the node / npm javascript environment
`dashed/assets` contains all npm-managed, front end assets.
`caravel/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.
@ -116,7 +116,7 @@ new `node_modules/` folder within `assets/`.
npm install
```
To parse and generate bundled files for dashed, run either of the
To parse and generate bundled files for caravel, 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.
@ -132,7 +132,7 @@ For every development session you will have to start a flask dev server
as well as an npm watcher
```
dashed runserver -d -p 8081
caravel runserver -d -p 8081
npm run dev
```
@ -157,12 +157,12 @@ Generate the documentation with:
cd docs && ./build.sh
## CSS Themes
As part of the npm build process, CSS for Dashed is compiled from ```Less```, a dynamic stylesheet language.
As part of the npm build process, CSS for Caravel is compiled from ```Less```, a dynamic stylesheet language.
It's possible to customize or add your own theme to Dashed, either by overriding CSS rules or preferably
It's possible to customize or add your own theme to Caravel, 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 Dashed are derived from
The ```variables.less``` and ```bootswatch.less``` files that ship with Caravel 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]

View File

@ -1,8 +1,8 @@
recursive-include dashed/templates *
recursive-include dashed/static *
recursive-exclude dashed/static/assets/node_modules *
recursive-include dashed/static/assets/node_modules/font-awesome *
recursive-exclude dashed/static/docs *
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 tests *
recursive-include dashed/data *
recursive-include dashed/migrations *
recursive-include caravel/data *
recursive-include caravel/migrations *

View File

@ -1,33 +1,33 @@
Dashed
Caravel
=========
[![PyPI version](https://badge.fury.io/py/dashed.svg)](https://badge.fury.io/py/dashed)
[![Coverage Status](https://coveralls.io/repos/airbnb/dashed/badge.svg?branch=master&service=github)](https://coveralls.io/github/airbnb/dashed?branch=master)
[![Code Health](https://landscape.io/github/airbnb/dashed/master/landscape.svg?style=flat)](https://landscape.io/github/airbnb/dashed/master)
[![Requirements Status](https://requires.io/github/airbnb/dashed/requirements.svg?branch=master)](https://requires.io/github/airbnb/dashed/requirements/?branch=master)
[![Join the chat at https://gitter.im/airbnb/dashed](https://badges.gitter.im/airbnb/dashed.svg)](https://gitter.im/airbnb/dashed?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![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)
[![Code Health](https://landscape.io/github/airbnb/caravel/master/landscape.svg?style=flat)](https://landscape.io/github/airbnb/caravel/master)
[![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)
Dashed is a data exploration platform designed to be visual, intuitive
Caravel is a data exploration platform designed to be visual, intuitive
and interactive.
[this project used to be named **Panoramix**]
Video - Introduction to Dashed
Video - Introduction to Caravel
---------------------------------
[![Dashed - ](http://img.youtube.com/vi/3Txm_nj_R7M/0.jpg)](http://www.youtube.com/watch?v=3Txm_nj_R7M)
[![Caravel - ](http://img.youtube.com/vi/3Txm_nj_R7M/0.jpg)](http://www.youtube.com/watch?v=3Txm_nj_R7M)
Screenshots
------------
![img](http://i.imgur.com/bi09J9X.png)
![img](http://i.imgur.com/aOaH0ty.png)
Dashed
Caravel
---------
Dashed's main goal is to make it easy to slice, dice and visualize data.
Caravel's main goal is to make it easy to slice, dice and visualize data.
It empowers its user to perform **analytics at the speed of thought**.
Dashed provides:
Caravel provides:
* A quick way to intuitively visualize datasets
* Create and share interactive dashboards
* A rich set of visualizations to analyze your data, as well as a flexible
@ -40,14 +40,14 @@ Dashed 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 Dashed to stay blazing fast while
* Deep integration with Druid allows for Caravel to stay blazing fast while
slicing and dicing large, realtime datasets
Database Support
----------------
Dashed was originally designed on to of Druid.io, but quickly broadened
Caravel was originally designed on to 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).
@ -68,36 +68,36 @@ power analytic dashboards and applications.*
Installation
------------
Dashed is currently only tested using Python 2.7.*. Python 3 support is
Caravel is currently only tested using Python 2.7.*. Python 3 support is
on the roadmap, Python 2.6 won't be supported.
Follow these few simple steps to install Dashed.
Follow these few simple steps to install Caravel.
```
# Install dashed
pip install dashed
# Install caravel
pip install caravel
# Create an admin user
fabmanager create-admin --app dashed
fabmanager create-admin --app caravel
# Initialize the database
dashed db upgrade
caravel db upgrade
# Create default roles and permissions
dashed init
caravel init
# Load some data to play with
dashed load_examples
caravel load_examples
# Start the development web server
dashed runserver -d
caravel 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 Dashed to be aware of, and they should show up in
your datasources for Caravel to be aware of, and they should show up in
`Menu -> Datasources`, from where you can start playing with your data!
Configuration
@ -134,14 +134,14 @@ More screenshots
Related Links
-------------
* [Dashed Google Group] (https://groups.google.com/forum/#!forum/airbnb_dashed)
* [Gitter (live chat) Channel](https://gitter.im/airbnb/dashed)
* [Caravel Google Group] (https://groups.google.com/forum/#!forum/airbnb_caravel)
* [Gitter (live chat) Channel](https://gitter.im/airbnb/caravel)
Tip of the Hat
--------------
Dashed would not be possible without these great frameworks / libs
Caravel 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
@ -153,4 +153,4 @@ getting the foundation for free
Contributing
------------
Interested in contributing? Casual hacking? Check out [Contributing.MD](https://github.com/airbnb/dashed/blob/master/CONTRIBUTING.md)
Interested in contributing? Casual hacking? Check out [Contributing.MD](https://github.com/airbnb/caravel/blob/master/CONTRIBUTING.md)

View File

@ -1,5 +1,5 @@
# TODO
List of TODO items for Dashed
List of TODO items for Caravel
## Important
* **Getting proper JS testing:** unit tests on the Python side are pretty
@ -7,7 +7,7 @@ List of TODO items for Dashed
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
Dashed would discover and expose the plugins
Caravel would discover and expose the plugins
## Features
* **Stars:** set dashboards, slices and datasets as favorites

View File

@ -29,7 +29,7 @@ script_location = migrations
# are written from script.py.mako
# output_encoding = utf-8
sqlalchemy.url = scheme://localhost/dashed
sqlalchemy.url = scheme://localhost/caravel
# Logging configuration
[loggers]

View File

@ -10,7 +10,7 @@ from flask.ext.cache import Cache
APP_DIR = os.path.dirname(__file__)
CONFIG_MODULE = os.environ.get('DASHED_CONFIG', 'dashed.config')
CONFIG_MODULE = os.environ.get('CARAVEL_CONFIG', 'caravel.config')
# Logging configuration
logging.basicConfig(format='%(asctime)s:%(levelname)s:%(name)s:%(message)s')
@ -28,15 +28,15 @@ migrate = Migrate(app, db, directory=APP_DIR + "/migrations")
class MyIndexView(IndexView):
@expose('/')
def index(self):
return redirect('/dashed/welcome')
return redirect('/caravel/welcome')
appbuilder = AppBuilder(
app, db.session,
base_template='dashed/base.html',
base_template='caravel/base.html',
indexview=MyIndexView,
security_manager_class=app.config.get("CUSTOM_SECURITY_MANAGER"))
sm = appbuilder.sm
get_session = appbuilder.get_session
from dashed import config, views # noqa
from caravel import config, views # noqa

View File

@ -1,6 +1,6 @@
var $ = window.$ = require('jquery');
var jQuery = window.jQuery = $;
var px = require('./modules/dashed.js');
var px = require('./modules/caravel.js');
var d3 = require('d3');
require('bootstrap');
@ -8,7 +8,7 @@ var ace = require('brace');
require('brace/mode/css');
require('brace/theme/crimson_editor');
require('./dashed-select2.js');
require('./caravel-select2.js');
require('../node_modules/gridster/dist/jquery.gridster.min.css');
require('../node_modules/gridster/dist/jquery.gridster.min.js');
@ -137,7 +137,7 @@ var Dashboard = function (dashboardData) {
};
$.ajax({
type: "POST",
url: '/dashed/save_dash/' + dashboard.id + '/',
url: '/caravel/save_dash/' + dashboard.id + '/',
data: {
data: JSON.stringify(data)
},

View File

@ -5,13 +5,13 @@
// js
var $ = window.$ = require('jquery');
var jQuery = window.jQuery = $;
var px = require('./modules/dashed.js');
var px = require('./modules/caravel.js');
require('jquery-ui');
$.widget.bridge('uitooltip', $.ui.tooltip); // Shutting down jq-ui tooltips
require('bootstrap');
require('./dashed-select2.js');
require('./caravel-select2.js');
require('../node_modules/bootstrap-toggle/js/bootstrap-toggle.min.js');

View File

@ -8,7 +8,7 @@ class App extends React.Component {
render () {
return (
<Jumbotron>
<h1>Dashed</h1>
<h1>Caravel</h1>
<p>Extensible visualization tool for exploring data from any database.</p>
</Jumbotron>
);

View File

@ -2,7 +2,7 @@ var $ = require('jquery');
var jQuery = $;
var d3 = require('d3');
require('../../stylesheets/dashed.css');
require('../../stylesheets/caravel.css');
// vis sources
var sourceMap = {
@ -46,7 +46,7 @@ var color = function () {
// Color factory
var seen = {};
return function (s) {
// next line is for dashed series that should have the same color
// next line is for caravel series that should have the same color
s = s.replace('---', '');
if (seen[s] === undefined) {
seen[s] = Object.keys(seen).length;
@ -133,7 +133,7 @@ var px = (function () {
}
function initFavStars() {
var baseUrl = '/dashed/favstar/';
var baseUrl = '/caravel/favstar/';
// Init star behavihor for favorite
function show() {
if ($(this).hasClass('selected')) {

View File

@ -36,7 +36,7 @@ $(document).ready(function () {
function showTableMetadata() {
$(".metadata").load(
'/dashed/table/' + database_id + '/' + $("#dbtable").val() + '/');
'/caravel/table/' + database_id + '/' + $("#dbtable").val() + '/');
}
$("#dbtable").on("change", showTableMetadata);
showTableMetadata();
@ -46,7 +46,7 @@ $(document).ready(function () {
$(".sqlcontent").show();
function selectStarOnClick() {
$.ajax('/dashed/select_star/' + database_id + '/' + $("#dbtable").val() + '/')
$.ajax('/caravel/select_star/' + database_id + '/' + $("#dbtable").val() + '/')
.done(function (msg) {
editor.setValue(msg);
});
@ -67,7 +67,7 @@ $(document).ready(function () {
history.pushState({}, document.title, '?sql=' + encodeURIComponent(editor.getValue()));
$.ajax({
type: "POST",
url: '/dashed/runsql/',
url: '/caravel/runsql/',
data: {
data: JSON.stringify({
database_id: $('#database_id').val(),

View File

@ -1,6 +1,6 @@
var $ = window.$ = require('jquery');
var jQuery = window.jQuery = $;
var px = require('./modules/dashed.js');
var px = require('./modules/caravel.js');
require('bootstrap');

View File

@ -1,7 +1,7 @@
var $ = window.$ = require('jquery');
var jQuery = window.jQuery = $;
require('../stylesheets/dashed.css');
require('../stylesheets/caravel.css');
require('../stylesheets/welcome.css');
require('bootstrap');
require('datatables');
@ -37,7 +37,7 @@ $(document).ready(function () {
cal.init({
start: new Date().setFullYear(new Date().getFullYear() - 1),
range: 13,
data: '/dashed/activity_per_day',
data: '/caravel/activity_per_day',
domain: "month",
subDomain: "day",
itemName: "action",

View File

@ -1,5 +1,5 @@
{
"name": "dashed",
"name": "caravel",
"version": "0.1.0",
"description": "Any database to any visualization",
"directories": {
@ -15,7 +15,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/mistercrunch/dashed.git"
"url": "git+https://github.com/mistercrunch/caravel.git"
},
"keywords": [
"big",
@ -31,9 +31,9 @@
],
"author": "Airbnb",
"bugs": {
"url": "https://github.com/mistercrunch/dashed/issues"
"url": "https://github.com/mistercrunch/caravel/issues"
},
"homepage": "https://github.com/mistercrunch/dashed#readme",
"homepage": "https://github.com/mistercrunch/caravel#readme",
"dependencies": {
"babel-loader": "^6.2.1",
"babel-polyfill": "^6.3.14",

View File

@ -4,7 +4,7 @@ var d3 = window.d3 || require('d3');
// CSS
require('./big_number.css');
var px = require('../javascripts/modules/dashed.js');
var px = require('../javascripts/modules/caravel.js');
function bigNumberVis(slice) {
var div = d3.select(slice.selector);

View File

@ -1,6 +1,6 @@
.select2-highlighted > .filter_box {
background-color: transparent;
border: 1px dashed black;
border: 1px caravel black;
}
.dashboard .filter_box .slice_container > div {

View File

@ -5,7 +5,7 @@ var d3 = window.d3 || require('d3');
// CSS
require('./filter_box.css');
require('../javascripts/dashed-select2.js');
require('../javascripts/caravel-select2.js');
function filterBox(slice) {
var filtersObj = {};

View File

@ -1,6 +1,6 @@
// JS
var $ = window.$ || require('jquery');
var px = window.px || require('../javascripts/modules/dashed.js');
var px = window.px || require('../javascripts/modules/caravel.js');
var d3 = require('d3');
d3.tip = require('d3-tip'); //using window.d3 doesn't capture events properly bc of multiple instances

View File

@ -1,4 +1,4 @@
g.dashed path {
g.caravel path {
stroke-dasharray: 5, 5;
}

View File

@ -1,7 +1,7 @@
// JS
var $ = window.$ || require('jquery');
var d3 = window.d3 || require('d3');
var px = window.px || require('../javascripts/modules/dashed.js');
var px = window.px || require('../javascripts/modules/caravel.js');
var nv = require('nvd3');
// CSS

View File

@ -1,7 +1,7 @@
// CSS
require('./sankey.css');
// JS
var px = window.px || require('../javascripts/modules/dashed.js');
var px = window.px || require('../javascripts/modules/caravel.js');
var d3 = window.d3 || require('d3');
d3.sankey = require('d3-sankey').sankey;

View File

@ -1,5 +1,5 @@
var d3 = window.d3 || require('d3');
var px = require('../javascripts/modules/dashed.js');
var px = require('../javascripts/modules/caravel.js');
var wrapSvgText = require('../javascripts/modules/utils.js').wrapSvgText;
require('./sunburst.css');

View File

@ -1,4 +1,4 @@
var px = window.px || require('../javascripts/modules/dashed.js');
var px = window.px || require('../javascripts/modules/caravel.js');
var d3 = window.d3 || require('d3');
var cloudLayout = require('d3-cloud');

View File

@ -5,11 +5,11 @@ import logging
from subprocess import Popen
from flask.ext.script import Manager
from dashed import app
from caravel import app
from flask.ext.migrate import MigrateCommand
import dashed
from dashed import db
from dashed import data, utils
import caravel
from caravel import db
from caravel import data, utils
config = app.config
@ -21,16 +21,16 @@ manager.add_command('db', MigrateCommand)
'-d', '--debug', action='store_true',
help="Start the web server in debug mode")
@manager.option(
'-p', '--port', default=config.get("DASHED_WEBSERVER_PORT"),
'-p', '--port', default=config.get("CARAVEL_WEBSERVER_PORT"),
help="Specify the port on which to run the web server")
@manager.option(
'-w', '--workers', default=config.get("DASHED_WORKERS", 16),
'-w', '--workers', default=config.get("CARAVEL_WORKERS", 16),
help="Number of gunicorn web server workers to fire up")
@manager.option(
'-t', '--timeout', default=config.get("DASHED_WEBSERVER_TIMEOUT"),
'-t', '--timeout', default=config.get("CARAVEL_WEBSERVER_TIMEOUT"),
help="Specify the timeout (seconds) for the gunicorn web server")
def runserver(debug, port, timeout, workers):
"""Starts a Dashed web server"""
"""Starts a Caravel web server"""
debug = debug or config.get("DEBUG")
if debug:
app.run(
@ -43,14 +43,14 @@ def runserver(debug, port, timeout, workers):
"-w {workers} "
"--timeout {timeout} "
"-b 0.0.0.0:{port} "
"dashed:app").format(**locals())
"caravel:app").format(**locals())
print("Starting server with command: " + cmd)
Popen(cmd, shell=True).wait()
@manager.command
def init():
"""Inits the Dashed application"""
utils.init(dashed)
"""Inits the Caravel application"""
utils.init(caravel)
@manager.option(
'-s', '--sample', action='store_true',
@ -74,7 +74,7 @@ def load_examples(sample):
def refresh_druid():
"""Refresh all druid datasources"""
session = db.session()
from dashed import models
from caravel import models
for cluster in session.query(models.DruidCluster).all():
try:
cluster.refresh_datasources()

View File

@ -1,4 +1,4 @@
"""The main config file for Dashed
"""The main config file for Caravel
All configuration in this file can be overridden by providing a local_config
in your PYTHONPATH as there is a ``from local_config import *``
@ -12,13 +12,13 @@ BASE_DIR = os.path.abspath(os.path.dirname(__file__))
# ---------------------------------------------------------
# Dashed specifix config
# Caravel specifix config
# ---------------------------------------------------------
ROW_LIMIT = 50000
WEBSERVER_THREADS = 8
DASHED_WEBSERVER_PORT = 8088
DASHED_WEBSERVER_TIMEOUT = 60
CARAVEL_WEBSERVER_PORT = 8088
CARAVEL_WEBSERVER_TIMEOUT = 60
CUSTOM_SECURITY_MANAGER = None
# ---------------------------------------------------------
@ -27,7 +27,7 @@ CUSTOM_SECURITY_MANAGER = None
SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h' # noqa
# The SQLAlchemy connection string.
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/dashed.db'
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/caravel.db'
# SQLALCHEMY_DATABASE_URI = 'mysql://myapp@localhost/myapp'
# SQLALCHEMY_DATABASE_URI = 'postgresql://root:password@localhost/myapp'
@ -44,7 +44,7 @@ SHOW_STACKTRACE = True
# GLOBALS FOR APP Builder
# ------------------------------
# Uncomment to setup Your App name
APP_NAME = "Dashed"
APP_NAME = "Caravel"
# Uncomment to setup Setup an App icon
# APP_ICON = "/static/img/something.png"
@ -116,6 +116,6 @@ CACHE_DEFAULT_TIMEOUT = None
CACHE_CONFIG = {'CACHE_TYPE': 'null'}
try:
from dashed_config import * # noqa
from caravel_config import * # noqa
except Exception:
pass

View File

@ -1,4 +1,4 @@
"""Loads datasets, dashboards and slices in a new dashed instance"""
"""Loads datasets, dashboards and slices in a new caravel instance"""
import gzip
import json
@ -8,7 +8,7 @@ import textwrap
import pandas as pd
from sqlalchemy import String, DateTime, Float
from dashed import app, db, models, utils
from caravel import app, db, models, utils
# Shortcuts
DB = models.Database

View File

@ -5,7 +5,7 @@ from wtforms import (
BooleanField, IntegerField, HiddenField)
from wtforms import validators, widgets
from copy import copy
from dashed import app
from caravel import app
from collections import OrderedDict
config = app.config
@ -73,7 +73,7 @@ class FreeFormSelectField(SelectField):
class OmgWtForm(Form):
"""Dashedification of the WTForm Form object"""
"""Caravelification of the WTForm Form object"""
fieldsets = {}
css_classes = dict()
@ -101,13 +101,13 @@ class FormFactory(object):
def __init__(self, viz):
self.viz = viz
from dashed.viz import viz_types
from caravel.viz import viz_types
viz = self.viz
datasource = viz.datasource
default_metric = datasource.metrics_combo[0][0]
default_groupby = datasource.groupby_column_names[0]
group_by_choices = [(s, s) for s in datasource.groupby_column_names]
# Pool of all the fields that can be used in Dashed
# Pool of all the fields that can be used in Caravel
self.field_dict = {
'viz_type': SelectField(
'Viz',
@ -180,7 +180,7 @@ class FormFactory(object):
('cca3', 'code ISO 3166-1 alpha-3 (cca3)'),
),
description=(
"The country code standard that Dashed should expect "
"The country code standard that Caravel should expect "
"to find in the [country] column")),
'groupby': SelectMultipleSortableField(
'Group by',
@ -581,7 +581,7 @@ class FormFactory(object):
"applies a date transformation to alter "
"your time column and defines a new time granularity."
"The options here are defined on a per database "
"engine basis in the Dashed source code"))
"engine basis in the Caravel source code"))
add_to_form(time_fields)
field_css_classes['time_grain_sqla'] = ['form-control', 'select2']
field_css_classes['granularity_sqla'] = ['form-control', 'select2']

View File

@ -1,4 +1,4 @@
"""A collection of ORM sqlalchemy models for Dashed"""
"""A collection of ORM sqlalchemy models for Caravel"""
from copy import deepcopy, copy
from collections import namedtuple
@ -29,8 +29,8 @@ from sqlalchemy.sql import table, literal_column, text, column
from sqlalchemy.sql.elements import ColumnClause
from sqlalchemy_utils import EncryptedType
from dashed import app, db, get_session, utils
from dashed.viz import viz_types
from caravel import app, db, get_session, utils
from caravel.viz import viz_types
from sqlalchemy.ext.declarative import declared_attr
config = app.config
@ -186,7 +186,7 @@ class Slice(Model, AuditMixinNullable):
slice_params['slice_name'] = self.slice_name
from werkzeug.urls import Href
href = Href(
"/dashed/explore/{self.datasource_type}/"
"/caravel/explore/{self.datasource_type}/"
"{self.datasource_id}/".format(self=self))
return href(slice_params)
@ -229,7 +229,7 @@ class Dashboard(Model, AuditMixinNullable):
@property
def url(self):
return "/dashed/dashboard/{}/".format(self.slug or self.id)
return "/caravel/dashboard/{}/".format(self.slug or self.id)
@property
def metadata_dejson(self):
@ -352,7 +352,7 @@ class Database(Model, AuditMixinNullable):
@property
def sql_url(self):
return '/dashed/sql/{}/'.format(self.id)
return '/caravel/sql/{}/'.format(self.id)
@property
def sql_link(self):
@ -437,7 +437,7 @@ class SqlaTable(Model, Queryable, AuditMixinNullable):
@property
def table_link(self):
url = "/dashed/explore/{self.type}/{self.id}/".format(self=self)
url = "/caravel/explore/{self.type}/{self.id}/".format(self=self)
return '<a href="{url}">{self.table_name}</a>'.format(
url=url, self=self)
@ -848,7 +848,7 @@ class DruidDatasource(Model, AuditMixinNullable, Queryable):
@property
def datasource_link(self):
url = "/dashed/explore/{self.type}/{self.id}/".format(self=self)
url = "/caravel/explore/{self.type}/{self.id}/".format(self=self)
return '<a href="{url}">{self.datasource_name}</a>'.format(
url=url, self=self)
@ -884,7 +884,7 @@ class DruidDatasource(Model, AuditMixinNullable, Queryable):
@classmethod
def sync_to_db(cls, name, cluster):
"""Fetches metadata for that datasource and merges the Dashed db"""
"""Fetches metadata for that datasource and merges the Caravel db"""
print("Syncing Druid datasource [{}]".format(name))
session = get_session()
datasource = session.query(cls).filter_by(datasource_name=name).first()
@ -1074,7 +1074,7 @@ class DruidDatasource(Model, AuditMixinNullable, Queryable):
class Log(Model):
"""ORM object used to log Dashed actions to the database"""
"""ORM object used to log Caravel actions to the database"""
__tablename__ = 'logs'

View File

@ -64,7 +64,7 @@
{{'checked' if item[value] }}
name="{{ '{}__{}'.format(pk, value) }}"
id="{{ '{}__{}'.format(pk, value) }}"
onchange="$.get('/dashed/checkbox/{{ modelview_name }}/{{ pk }}/{{ value }}/' + $('#{{ '{}__{}'.format(pk, value) }}')[0].checked ) + '/';">
onchange="$.get('/caravel/checkbox/{{ modelview_name }}/{{ pk }}/{{ value }}/' + $('#{{ '{}__{}'.format(pk, value) }}')[0].checked ) + '/';">
{% else %}
{{ item[value]|safe }}
{% endif %}

View File

@ -2,7 +2,7 @@
{% block head_css %}
<link rel="icon" type="image/png" href="/static/img/favicon.png">
<link rel="stylesheet" type="text/css" href="/static/assets/stylesheets/dashed.css" />
<link rel="stylesheet" type="text/css" href="/static/assets/stylesheets/caravel.css" />
{{super()}}
{% endblock %}

View File

@ -1,4 +1,4 @@
{% extends "dashed/basic.html" %}
{% extends "caravel/basic.html" %}
{% block head_js %}
{{ super() }}

View File

@ -1,4 +1,4 @@
{% extends "dashed/basic.html" %}
{% extends "caravel/basic.html" %}
{% block title %}
{% if slice %}

View File

@ -1,4 +1,4 @@
{% extends "dashed/basic.html" %}
{% extends "caravel/basic.html" %}
{% block tail_js %}
{{ super() }}

View File

@ -1,6 +1,6 @@
{% extends "appbuilder/general/model/add.html" %}
{% import "dashed/models/database/macros.html" as macros %}
{% import "caravel/models/database/macros.html" as macros %}
{% block tail_js %}
{{ super() }}
{{ macros.testconn() }}

View File

@ -1,6 +1,6 @@
{% extends "appbuilder/general/model/edit.html" %}
{% import "dashed/models/database/macros.html" as macros %}
{% import "caravel/models/database/macros.html" as macros %}
{% block tail_js %}
{{ super() }}
{{ macros.testconn() }}

View File

@ -3,7 +3,7 @@
$("#sqlalchemy_uri").parent()
.append('<button id="testconn" class="btn">Test Connection</button>');
$("#testconn").click(function() {
var url = "/dashed/testconn";
var url = "/caravel/testconn";
$.ajax({
method: "POST",
url: url,

View File

@ -1,4 +1,4 @@
{% extends "dashed/datasource.html" %}
{% extends "caravel/datasource.html" %}
{% block viz %}
<span class="alert alert-danger">No data: review your incantations.</span>

View File

@ -1,4 +1,4 @@
{% extends "dashed/basic.html" %}
{% extends "caravel/basic.html" %}
{% block head_css %}
{{super()}}

View File

@ -1,7 +1,7 @@
<html>
<head>
<script src="/static/assets/javascripts/dist/standalone.entry.js"></script>
<link rel="stylesheet" type="text/css" href="/static/assets/stylesheets/dashed.css" />
<link rel="stylesheet" type="text/css" href="/static/assets/stylesheets/caravel.css" />
{% set CSS_THEME = appbuilder.get_app.config.get("CSS_THEME") %}
{% set height = request.args.get("height", 700) %}
{% if CSS_THEME %}

View File

@ -1,4 +1,4 @@
{% extends "dashed/basic.html" %}
{% extends "caravel/basic.html" %}
{% block head_js %}
{{ super() }}

View File

@ -18,7 +18,7 @@
<img src="{{ url_for("static", filename="img/dash.png") }}">
<div class="carousel-caption">
<div>
<h1>Dashed</h1>
<h1>Caravel</h1>
<p>
an open source data visualization platform
</p>

View File

@ -1,4 +1,4 @@
"""Utility functions used across Dashed"""
"""Utility functions used across Caravel"""
from datetime import datetime
import hashlib
@ -169,11 +169,11 @@ class ColorFactory(object):
return self.BNB_COLORS[i % len(self.BNB_COLORS)]
def init(dashed):
"""Inits the Dashed application with security roles and such"""
db = dashed.db
models = dashed.models
sm = dashed.appbuilder.sm
def init(caravel):
"""Inits the Caravel application with security roles and such"""
db = caravel.db
models = caravel.models
sm = caravel.appbuilder.sm
alpha = sm.add_role("Alpha")
admin = sm.add_role("Admin")

View File

@ -1,4 +1,4 @@
"""Flask web views for Dashed"""
"""Flask web views for Caravel"""
from datetime import datetime
import json
@ -21,7 +21,7 @@ import pandas as pd
from sqlalchemy import select, text
from sqlalchemy.sql.expression import TextAsFrom
from dashed import appbuilder, db, models, viz, utils, app, sm, ascii_art
from caravel import appbuilder, db, models, viz, utils, app, sm, ascii_art
config = app.config
log_this = models.Log.log_this
@ -44,11 +44,11 @@ class DeleteMixin(object):
return redirect(self.get_redirect())
class DashedModelView(ModelView):
class CaravelModelView(ModelView):
page_size = 500
class TableColumnInlineView(CompactCRUDMixin, DashedModelView): # noqa
class TableColumnInlineView(CompactCRUDMixin, CaravelModelView): # noqa
datamodel = SQLAInterface(models.TableColumn)
can_delete = False
edit_columns = [
@ -69,7 +69,7 @@ appbuilder.add_view_no_menu(TableColumnInlineView)
class DruidColumnInlineView(CompactCRUDMixin, DashedModelView): # noqa
class DruidColumnInlineView(CompactCRUDMixin, CaravelModelView): # noqa
datamodel = SQLAInterface(models.DruidColumn)
edit_columns = [
'column_name', 'description', 'datasource', 'groupby',
@ -86,7 +86,7 @@ class DruidColumnInlineView(CompactCRUDMixin, DashedModelView): # noqa
appbuilder.add_view_no_menu(DruidColumnInlineView)
class SqlMetricInlineView(CompactCRUDMixin, DashedModelView): # noqa
class SqlMetricInlineView(CompactCRUDMixin, CaravelModelView): # noqa
datamodel = SQLAInterface(models.SqlMetric)
list_columns = ['metric_name', 'verbose_name', 'metric_type']
edit_columns = [
@ -97,7 +97,7 @@ class SqlMetricInlineView(CompactCRUDMixin, DashedModelView): # noqa
appbuilder.add_view_no_menu(SqlMetricInlineView)
class DruidMetricInlineView(CompactCRUDMixin, DashedModelView): # noqa
class DruidMetricInlineView(CompactCRUDMixin, CaravelModelView): # noqa
datamodel = SQLAInterface(models.DruidMetric)
list_columns = ['metric_name', 'verbose_name', 'metric_type']
edit_columns = [
@ -112,15 +112,15 @@ class DruidMetricInlineView(CompactCRUDMixin, DashedModelView): # noqa
appbuilder.add_view_no_menu(DruidMetricInlineView)
class DatabaseView(DashedModelView, DeleteMixin): # noqa
class DatabaseView(CaravelModelView, DeleteMixin): # noqa
datamodel = SQLAInterface(models.Database)
list_columns = ['database_name', 'sql_link', 'created_by_', 'changed_on']
order_columns = utils.list_minus(list_columns, ['created_by_'])
add_columns = ['database_name', 'sqlalchemy_uri', 'cache_timeout']
search_exclude_columns = ('password',)
edit_columns = add_columns
add_template = "dashed/models/database/add.html"
edit_template = "dashed/models/database/edit.html"
add_template = "caravel/models/database/add.html"
edit_template = "caravel/models/database/edit.html"
base_order = ('changed_on', 'desc')
description_columns = {
'sqlalchemy_uri': (
@ -147,7 +147,7 @@ appbuilder.add_view(
category_icon='fa-database',)
class TableModelView(DashedModelView, DeleteMixin): # noqa
class TableModelView(CaravelModelView, DeleteMixin): # noqa
datamodel = SQLAInterface(models.SqlaTable)
list_columns = [
'table_link', 'database', 'sql_link', 'is_featured',
@ -190,7 +190,7 @@ appbuilder.add_view(
appbuilder.add_separator("Sources")
class DruidClusterModelView(DashedModelView, DeleteMixin): # noqa
class DruidClusterModelView(CaravelModelView, DeleteMixin): # noqa
datamodel = SQLAInterface(models.DruidCluster)
add_columns = [
'cluster_name',
@ -210,7 +210,7 @@ if config['DRUID_IS_ACTIVE']:
category_icon='fa-database',)
class SliceModelView(DashedModelView, DeleteMixin): # noqa
class SliceModelView(CaravelModelView, DeleteMixin): # noqa
datamodel = SQLAInterface(models.Slice)
can_add = False
label_columns = {
@ -252,7 +252,7 @@ class SliceAsync(SliceModelView): # noqa
appbuilder.add_view_no_menu(SliceAsync)
class DashboardModelView(DashedModelView, DeleteMixin): # noqa
class DashboardModelView(CaravelModelView, DeleteMixin): # noqa
datamodel = SQLAInterface(models.Dashboard)
label_columns = {
'created_by_': 'Creator',
@ -301,7 +301,7 @@ class DashboardModelViewAsync(DashboardModelView): # noqa
appbuilder.add_view_no_menu(DashboardModelViewAsync)
class LogModelView(DashedModelView):
class LogModelView(CaravelModelView):
datamodel = SQLAInterface(models.Log)
list_columns = ('user', 'action', 'dttm')
edit_columns = ('user', 'action', 'dttm', 'json')
@ -314,7 +314,7 @@ appbuilder.add_view(
icon="fa-list-ol")
class DruidDatasourceModelView(DashedModelView, DeleteMixin): # noqa
class DruidDatasourceModelView(CaravelModelView, DeleteMixin): # noqa
datamodel = SQLAInterface(models.DruidDatasource)
list_columns = [
'datasource_link', 'cluster', 'owner',
@ -390,9 +390,9 @@ class R(BaseView):
appbuilder.add_view_no_menu(R)
class Dashed(BaseView):
class Caravel(BaseView):
"""The base views for Dashed!"""
"""The base views for Caravel!"""
@has_access
@expose("/explore/<datasource_type>/<datasource_id>/")
@ -463,9 +463,9 @@ class Dashed(BaseView):
mimetype="application/csv")
else:
if request.args.get("standalone") == "true":
template = "dashed/standalone.html"
template = "caravel/standalone.html"
else:
template = "dashed/explore.html"
template = "caravel/explore.html"
try:
resp = self.render_template(template, viz=obj, slice=slc)
@ -646,7 +646,7 @@ class Dashed(BaseView):
int(o['slice_id']): o
for o in json.loads(dash.position_json)}
return self.render_template(
"dashed/dashboard.html", dashboard=dash,
"caravel/dashboard.html", dashboard=dash,
templates=templates,
pos_dict=pos_dict)
@ -661,7 +661,7 @@ class Dashed(BaseView):
table_name = request.args.get('table_name')
return self.render_template(
"dashed/sql.html",
"caravel/sql.html",
tables=tables,
table_name=table_name,
db=mydb)
@ -676,7 +676,7 @@ class Dashed(BaseView):
df = pd.DataFrame([(c['name'], c['type']) for c in cols])
df.columns = ['col', 'type']
return self.render_template(
"dashed/ajah.html",
"caravel/ajah.html",
content=df.to_html(
index=False,
na_rep='',
@ -695,7 +695,7 @@ class Dashed(BaseView):
[c.name for c in t.columns] or "*")
s = "SELECT\n{}\nFROM {}".format(fields, table_name)
return self.render_template(
"dashed/ajah.html",
"caravel/ajah.html",
content=s
)
@ -786,7 +786,7 @@ class Dashed(BaseView):
"Stacktrace is hidden. Change the SHOW_STACKTRACE "
"configuration setting to enable it")
return render_template(
'dashed/traceback.html',
'caravel/traceback.html',
error_msg=error_msg,
title=ascii_art.stacktrace,
art=ascii_art.error), 500
@ -795,21 +795,21 @@ class Dashed(BaseView):
@expose("/welcome")
def welcome(self):
"""Personalized welcome page"""
return self.render_template('dashed/welcome.html', utils=utils)
return self.render_template('caravel/welcome.html', utils=utils)
appbuilder.add_view_no_menu(Dashed)
appbuilder.add_view_no_menu(Caravel)
if config['DRUID_IS_ACTIVE']:
appbuilder.add_link(
"Refresh Druid Metadata",
href='/dashed/refresh_datasources/',
href='/caravel/refresh_datasources/',
category='Sources',
category_icon='fa-database',
icon="fa-cog")
class CssTemplateModelView(DashedModelView, DeleteMixin):
class CssTemplateModelView(CaravelModelView, DeleteMixin):
datamodel = SQLAInterface(models.CssTemplate)
list_columns = ['template_name']
edit_columns = ['template_name', 'css']

View File

@ -1,7 +1,7 @@
"""This module contains the "Viz" objects
These objects represent the backend of all the visualizations that
Dashed can render.
Caravel can render.
"""
from collections import OrderedDict, defaultdict
@ -17,8 +17,8 @@ from werkzeug.datastructures import ImmutableMultiDict
from werkzeug.urls import Href
import pandas as pd
from dashed import app, utils, cache
from dashed.forms import FormFactory
from caravel import app, utils, cache
from caravel.forms import FormFactory
from six import string_types
@ -116,7 +116,7 @@ class BaseViz(object):
if d[key] is False:
del d[key]
href = Href(
'/dashed/explore/{self.datasource.type}/'
'/caravel/explore/{self.datasource.type}/'
'{self.datasource.id}/'.format(**locals()))
return href(d)
@ -725,7 +725,7 @@ class NVD3TimeSeriesViz(NVD3Viz):
df2 = self.get_df(query_object)
df2.index += delta
chart_data += self.to_series(
df2, classed='dashed', title_suffix="---")
df2, classed='caravel', title_suffix="---")
chart_data = sorted(chart_data, key=lambda x: x['key'])
return chart_data
@ -1077,7 +1077,7 @@ class WorldMapViz(BaseViz):
return qry
def get_data(self):
from dashed.data import countries
from caravel.data import countries
df = self.get_df()
cols = [self.form_data.get('entity')]
metric = self.form_data.get('metric')

View File

@ -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/dashed.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/caravel.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/dashed.qhc"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/caravel.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/dashed"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/dashed"
@echo "# mkdir -p $$HOME/.local/share/devhelp/caravel"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/caravel"
@echo "# devhelp"
epub:

View File

@ -21,7 +21,7 @@
<img src="_static/img/dash.png">
<div class="carousel-caption">
<div>
<h1>Dashed</h1>
<h1>Caravel</h1>
<p>
an open source data visualization platform
</p>
@ -80,7 +80,7 @@
<hr/>
<div class="container">
<div class="jumbotron">
<h1>Dashed</h1>
<h1>Caravel</h1>
<p>
is an open source data visualization platform that provides easy
exploration of your data and allows you to create and share

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
rm -rf _build
make html
cp -r ../dashed/assets/images/ _build/html/_static/img/
rm -rf /tmp/dashed-docs
cp -r _build/html /tmp/dashed-docs
cp -r ../caravel/assets/images/ _build/html/_static/img/
rm -rf /tmp/caravel-docs
cp -r _build/html /tmp/caravel-docs

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# dashed documentation build configuration file, created by
# caravel 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 = u'dashed'
project = u'caravel'
copyright = u'2015, Maxime Beauchemin, Airbnb'
author = u'Maxime Beauchemin'
@ -121,7 +121,7 @@ html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
# documentation.
html_theme_options = {
# 'bootswatch_theme': 'cosmo',
'navbar_title': 'Dashed Documentation',
'navbar_title': 'Caravel Documentation',
'navbar_fixed_top': "false",
'navbar_sidebarrel': False,
'navbar_site_name': "Topics",
@ -213,7 +213,7 @@ html_show_sourcelink = False
#html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'dasheddoc'
htmlhelp_basename = 'caraveldoc'
# -- Options for LaTeX output ---------------------------------------------
@ -235,7 +235,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'dashed.tex', u'Dashed Documentation',
(master_doc, 'caravel.tex', u'Caravel Documentation',
u'Maxime Beauchemin', 'manual'),
]
@ -265,7 +265,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'Dashed', u'dashed Documentation',
(master_doc, 'Caravel', u'caravel Documentation',
[author], 1)
]
@ -279,8 +279,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Dashed', u'Dashed Documentation',
author, 'Dashed', 'One line description of project.',
(master_doc, 'Caravel', u'Caravel Documentation',
author, 'Caravel', 'One line description of project.',
'Miscellaneous'),
]

View File

@ -1,5 +1,5 @@
.. warning:: This project used to be name Panoramix and has been renamed
to Dashed in March 2016
to Caravel in March 2016
Overview
=======================================

View File

@ -2,11 +2,11 @@ User Guide
==========
The user guide is a collection of short videos showing different aspect
of Dashed.
of Caravel.
Quick Intro
'''''''''''
This video demonstrates how Dashed works at a high level, it shows how
This video demonstrates how Caravel 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 Dashed, and how to
This videos shows you how to expose a new table in Caravel, and how to
define the semantics on how this can be accessed by others in the ``Explore``
and ``Dashboard`` views.

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
rm /tmp/dashed_unittests.db
export DASHED_CONFIG=tests.dashed_test_config
dashed/bin/dashed db upgrade
rm /tmp/caravel_unittests.db
export CARAVEL_CONFIG=tests.caravel_test_config
caravel/bin/caravel db upgrade
python setup.py nosetests

View File

@ -1,5 +1,5 @@
[metadata]
name = Dashed
name = Caravel
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 = dashed
packages = caravel
[build_sphinx]
source-dir = docs/
@ -21,4 +21,4 @@ upload-dir = docs/_build/html
verbosity=1
detailed-errors=1
with-coverage=1
cover-package=dashed
cover-package=caravel

View File

@ -3,7 +3,7 @@ from setuptools import setup, find_packages
version = '0.8.4'
setup(
name='dashed',
name='caravel',
description=(
"A interactive data visualization platform build on SqlAlchemy "
"and druid.io"),
@ -11,7 +11,7 @@ setup(
packages=find_packages(),
include_package_data=True,
zip_safe=False,
scripts=['dashed/bin/dashed'],
scripts=['caravel/bin/caravel'],
install_requires=[
'alembic>=0.8.5, <0.9.0',
'cryptography>=1.1.1, <2.0.0',
@ -38,7 +38,7 @@ setup(
tests_require=['coverage'],
author='Maxime Beauchemin',
author_email='maximebeauchemin@gmail.com',
url='https://github.com/airbnb/dashed',
url='https://github.com/airbnb/caravel',
download_url=(
'https://github.com/airbnb/dashed/tarball/' + version),
'https://github.com/airbnb/caravel/tarball/' + version),
)

View File

@ -1,6 +1,6 @@
from dashed.config import *
from caravel.config import *
AUTH_USER_REGISTRATION_ROLE = 'alpha'
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/dashed_unittests.db'
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/caravel_unittests.db'
DEBUG = True
DASHED_WEBSERVER_PORT = 8081
CARAVEL_WEBSERVER_PORT = 8081

View File

@ -2,13 +2,13 @@ import imp
import doctest
import os
import unittest
os.environ['DASHED_CONFIG'] = 'tests.dashed_test_config'
os.environ['CARAVEL_CONFIG'] = 'tests.caravel_test_config'
from flask.ext.testing import LiveServerTestCase, TestCase
import dashed
from dashed import app, db, models, utils
import caravel
from caravel import app, db, models, utils
BASE_DIR = app.config.get("BASE_DIR")
cli = imp.load_source('cli', BASE_DIR + "/bin/dashed")
cli = imp.load_source('cli', BASE_DIR + "/bin/caravel")
class LiveTest(TestCase):
@ -22,7 +22,7 @@ class LiveTest(TestCase):
pass
def test_init(self):
utils.init(dashed)
utils.init(caravel)
def test_load_examples(self):
cli.load_examples(sample=True)
@ -39,7 +39,7 @@ class LiveTest(TestCase):
self.client.get(viz.get_json())
def test_csv(self):
self.client.get('/dashed/explore/table/1/?viz_type=table&granularity=ds&since=100+years&until=now&metrics=count&groupby=name&limit=50&show_brush=y&show_brush=false&show_legend=y&show_brush=false&rich_tooltip=y&show_brush=false&show_brush=false&show_brush=false&show_brush=false&y_axis_format=&x_axis_showminmax=y&show_brush=false&line_interpolation=linear&rolling_type=None&rolling_periods=&time_compare=&num_period_compare=&where=&having=&flt_col_0=gender&flt_op_0=in&flt_eq_0=&flt_col_0=gender&flt_op_0=in&flt_eq_0=&slice_id=14&slice_name=Boys&collapsed_fieldsets=&action=&datasource_name=birth_names&datasource_id=1&datasource_type=table&previous_viz_type=line&csv=true')
self.client.get('/caravel/explore/table/1/?viz_type=table&granularity=ds&since=100+years&until=now&metrics=count&groupby=name&limit=50&show_brush=y&show_brush=false&show_legend=y&show_brush=false&rich_tooltip=y&show_brush=false&show_brush=false&show_brush=false&show_brush=false&y_axis_format=&x_axis_showminmax=y&show_brush=false&line_interpolation=linear&rolling_type=None&rolling_periods=&time_compare=&num_period_compare=&where=&having=&flt_col_0=gender&flt_op_0=in&flt_eq_0=&flt_col_0=gender&flt_op_0=in&flt_eq_0=&slice_id=14&slice_name=Boys&collapsed_fieldsets=&action=&datasource_name=birth_names&datasource_id=1&datasource_type=table&previous_viz_type=line&csv=true')
def test_dashboard(self):
for dash in db.session.query(models.Dashboard).all():

View File

@ -1,4 +1,4 @@
from dashed.config import *
from caravel.config import *
AUTH_USER_REGISTRATION_ROLE = 'alpha'
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/panoramix_unittests.db'