forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/origin/master' into filter_inpu…
…t_box * remotes/origin/master: (340 commits) [New Viz] Partition Diagram (apache#3642) Add description for running specific test (apache#3665) Making the sort order for metrics pull from fd for time table viz (apache#3661) Make columns that return an exception on click unsortable. (apache#3417) Adding sort time table (apache#3651) added aihello as superset user. (apache#3647) Fix apache#3612 - reverse sign in difference calculation (apache#3646) Fixing some warnings during tests (apache#3648) [Translations] Restored lost French translations (apache#3645) [sql lab] fix impersonation + template issue (apache#3644) Pin moment.js library since 2.19.0 creates problem (apache#3641) [time_table] adding support for URLs / links (apache#3600) Set tooltip to show extent of sparkData (apache#3626) add explicit message display for 'Fetching Annotation Layer' error (apache#3631) [bugfix] Template rendering failed: '_AppCtxGlobals' object has no attribute 'user' (apache#3637) fix long title text wrapping in editable-title component (apache#3638) [minor] proper tooltip on ControlHeader's instant re-render trigger (apache#3625) add annotation option and a linear color map for heatmap viz. (apache#3634) [bugfix] empty From date filter NoneType error (apache#3633) remove unused imports (apache#3621) ...
- Loading branch information
Showing
314 changed files
with
39,112 additions
and
7,066 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
repo_token: eESbYiv4An6KEvjpmguDs4L7YkubXbqn1 | ||
repo_token: 4P9MpvLrZfJKzHdGZsdV3MzO43OZJgYFn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,9 @@ If you are reporting a bug, please include: | |
troubleshooting. | ||
- Detailed steps to reproduce the bug. | ||
|
||
When you post python stack traces please quote them using | ||
[markdown blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/). | ||
|
||
### Fix Bugs | ||
|
||
Look through the GitHub issues for bugs. Anything tagged with "bug" is | ||
|
@@ -26,7 +29,7 @@ open to whoever wants to implement it. | |
### Implement Features | ||
|
||
Look through the GitHub issues for features. Anything tagged with | ||
"feature" is open to whoever wants to implement it. | ||
"feature" or "starter_task" is open to whoever wants to implement it. | ||
|
||
### Documentation | ||
|
||
|
@@ -47,9 +50,27 @@ If you are proposing a feature: | |
- Remember that this is a volunteer-driven project, and that | ||
contributions are welcome :) | ||
|
||
## Pull Request Guidelines | ||
|
||
Before you submit a pull request from your forked repo, check that it | ||
meets these guidelines: | ||
|
||
1. The pull request should include tests, either as doctests, | ||
unit tests, or both. | ||
2. If the pull request adds functionality, the docs should be updated | ||
as part of the same PR. Doc string are often sufficient, make | ||
sure to follow the sphinx compatible standards. | ||
3. The pull request should work for Python 2.7, and ideally python 3.4+. | ||
``from __future__ import`` will be required in every `.py` file soon. | ||
4. Code will be reviewed by re running the unittests, flake8 and syntax | ||
should be as rigorous as the core Python project. | ||
5. Please rebase and resolve all conflicts before submitting. | ||
6. If you are asked to update your pull request with some changes there's | ||
no need to create a new one. Push your changes to the same branch. | ||
|
||
## Documentation | ||
|
||
The latest documentation and tutorial are available [here](http://airbnb.io/superset). | ||
The latest documentation and tutorial are available [here](https://superset.incubator.apache.org/). | ||
|
||
Contributing to the official documentation is relatively easy, once you've setup | ||
your environment and done an edit end-to-end. The docs can be found in the | ||
|
@@ -64,7 +85,7 @@ Before you start changing the docs, you'll want to | |
[fork the Superset project on Github](https://help.github.com/articles/fork-a-repo/). | ||
Once that new repository has been created, clone it on your local machine: | ||
|
||
git clone [email protected]:your_username/superset.git | ||
git clone [email protected]:your_username/incubator-superset.git | ||
|
||
At this point, you may also want to create a | ||
[Python virtual environment](http://docs.python-guide.org/en/latest/dev/virtualenvs/) | ||
|
@@ -76,7 +97,7 @@ to manage the Python packages you're about to install: | |
Finally, to make changes to the rst files and build the docs using Sphinx, | ||
you'll need to install a handful of dependencies from the repo you cloned: | ||
|
||
cd superset | ||
cd incubator-superset | ||
pip install -r dev-reqs-for-docs.txt | ||
|
||
To get the feel for how to edit and build the docs, let's edit a file, build | ||
|
@@ -123,7 +144,7 @@ referenced in the rst, e.g. | |
|
||
aren't actually included in that directory. _Instead_, you'll want to add and commit | ||
images (and any other static assets) to the _superset/assets/images_ directory. | ||
When the docs are being pushed to [airbnb.io](http://airbnb.io/superset/), images | ||
When the docs are being pushed to [Apache Superset (incubating)](https://superset.incubator.apache.org/), images | ||
will be moved from there to the _\_static/img_ directory, just like they're referenced | ||
in the docs. | ||
|
||
|
@@ -140,19 +161,19 @@ instead. | |
|
||
## Setting up a Python development environment | ||
|
||
Check the [OS dependencies](http://airbnb.io/superset/installation.html#os-dependencies) before follows these steps. | ||
Check the [OS dependencies](https://superset.incubator.apache.org/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 [email protected]:airbnb/superset.git | ||
# git clone [email protected]:apache/incubator-superset.git | ||
|
||
# [optional] setup a virtual env and activate it | ||
virtualenv env | ||
source env/bin/activate | ||
|
||
# install for development | ||
python setup.py develop | ||
pip install -e . | ||
|
||
# Create an admin user | ||
fabmanager create-admin --app superset | ||
|
@@ -202,8 +223,13 @@ To install third party libraries defined in `package.json`, run the | |
following within the `superset/assets/` directory which will install them in a | ||
new `node_modules/` folder within `assets/`. | ||
|
||
``` | ||
npm install | ||
```bash | ||
# from the root of the repository, move to where our JS package.json lives | ||
cd superset/assets/ | ||
# install yarn, a replacement for `npm install` that is faster and more deterministic | ||
npm install -g yarn | ||
# run yarn to fetch all the dependencies | ||
yarn | ||
``` | ||
|
||
To parse and generate bundled files for superset, run either of the | ||
|
@@ -231,9 +257,20 @@ npm run dev | |
|
||
## Testing | ||
|
||
Python tests can be run with: | ||
Before running python unit tests, please setup local testing environment: | ||
``` | ||
pip install -r dev-reqs.txt | ||
``` | ||
|
||
All python tests can be run with: | ||
|
||
./run_tests.sh | ||
|
||
Alternatively, you can run a specific test with: | ||
|
||
./run_specific_test.sh tests.core_tests:CoreTests.test_function_name | ||
|
||
Note that before running specific tests, you have to both setup the local testing environment and run all tests. | ||
|
||
We use [Mocha](https://mochajs.org/), [Chai](http://chaijs.com/) and [Enzyme](http://airbnb.io/enzyme/) to test Javascript. Tests can be run with: | ||
|
||
|
@@ -292,23 +329,6 @@ The `variables.less` and `bootswatch.less` files that ship with Superset are der | |
[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] | ||
|
||
## Pull Request Guidelines | ||
|
||
Before you submit a pull request from your forked repo, check that it | ||
meets these guidelines: | ||
|
||
1. The pull request should include tests, either as doctests, | ||
unit tests, or both. | ||
2. If the pull request adds functionality, the docs should be updated | ||
as part of the same PR. Doc string are often sufficient, make | ||
sure to follow the sphinx compatible standards. | ||
3. The pull request should work for Python 2.6, 2.7, and ideally python 3.3. | ||
``from __future__ import`` will be required in every `.py` file soon. | ||
4. Code will be reviewed by re running the unittests, flake8 and syntax | ||
should be as rigorous as the core Python project. | ||
5. Please rebase and resolve all conflicts before submitting. | ||
|
||
|
||
## Translations | ||
|
||
We use [Babel](http://babel.pocoo.org/en/latest/) to translate Superset. The | ||
|
@@ -317,6 +337,8 @@ key is to instrument the strings that need translation using | |
a module, all you have to do is to `_("Wrap your strings")` using the | ||
underscore `_` "function". | ||
|
||
We use `import {t, tn, TCT} from locales;` in js, JSX file, locales is in `./superset/assets/javascripts/` directory. | ||
|
||
To enable changing language in your environment, you can simply add the | ||
`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 | ||
|
@@ -333,17 +355,25 @@ new language dictionary, run the following command: | |
|
||
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 | ||
Then it's a matter of running the statement below to gather all strings that | ||
need translation | ||
|
||
fabmanager babel-extract --target superset/translations/ | ||
fabmanager babel-extract --target superset/translations/ -k _ -k __ -k t -k tn -k tct | ||
|
||
You can then translate the strings gathered in files located under | ||
`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 superset/translations/ | ||
|
||
In the case of JS translation, we need to convert the PO file into a JSON file, and we need the global download of the npm package po2json. | ||
We need to be compiled using this command: | ||
|
||
npm install po2json -g | ||
|
||
Execute this command to convert the en PO file into a json file: | ||
|
||
po2json -d superset -f jed1.x superset/translations/en/LC_MESSAGES/messages.po superset/translations/en/LC_MESSAGES/messages.json | ||
|
||
## Adding new datasources | ||
|
||
|
@@ -360,3 +390,39 @@ to take effect, they need to be compiled using this command: | |
`ADDITIONAL_MODULE_DS_MAP = {'superset.my_models': ['MyDatasource', 'MyOtherDatasource']}` | ||
|
||
This means it'll register MyDatasource and MyOtherDatasource in superset.my_models module in the source registry. | ||
|
||
## Creating a new visualization type | ||
|
||
Here's an example as a Github PR with comments that describe what the | ||
different sections of the code do: | ||
https://github.com/apache/incubator-superset/pull/3013 | ||
|
||
## Refresh documentation website | ||
|
||
Every once in a while we want to compile the documentation and publish it. | ||
Here's how to do it. | ||
|
||
.. code:: | ||
|
||
# install doc dependencies | ||
pip install -r dev-reqs-for-docs.txt | ||
|
||
# build the docs | ||
python setup.py build_sphinx | ||
|
||
# copy html files to temp folder | ||
cp -r docs/_build/html/ /tmp/tmp_superset_docs/ | ||
|
||
# clone the docs repo | ||
cd ~/ | ||
git clone https://git-wip-us.apache.org/repos/asf/incubator-superset-site.git | ||
|
||
# copy | ||
cp -r /tmp/tmp_superset_docs/ ~/incubator-superset-site.git/ | ||
|
||
# commit and push to `asf-site` branch | ||
cd ~/incubator-superset-site.git/ | ||
git checkout asf-site | ||
git add . | ||
git commit -a -m "New doc version" | ||
git push origin master |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
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 superset/static/assets/node_modules * | ||
recursive-exclude tests * | ||
recursive-include superset/data * | ||
recursive-include superset/migrations * |
Oops, something went wrong.