Commit Graph

100 Commits

Author SHA1 Message Date
Will Barrett 0730261342 Fix column type on dbs.encrypted_extra, add instructions for testing migration downgrades (#8493)
* Fix column type on dbs.encrypted_extra

* Add instructions for testing migration downgrades

* Account for non-Postgres DBs in migration

* Use batch_alter_table to make SQLite happy

* Another CI-appeasing tweak
2019-11-04 23:13:21 -08:00
Will Barrett e4ca44e95f Use `config[]` not `config.get()` (#8454)
* Typo fix in CONTRIBUTING.md

* Alter references to config.get('FOO') to use preferred config['FOO']

* Set missing configuration constants in superset/config.py

* Misc. CI fixes

* Add type annotation for FEATURE_FLATGS
2019-10-30 16:19:16 -07:00
Will Barrett 148cec4690 Add UI-only database configuration method for extended authorization scenarios (#8448)
* Add encrypted_extra to dbs

* WIP - UI-based BigQuery connection configuration

* Fix 500 bubbling to the surface when adding a database connection

* Add check for valid json

* black formatting:

* isort

* Incorporate PR feedback. Thanks all!

* black

* Typo fix in CONTRIBUTING.md
2019-10-28 15:49:40 +00:00
Maxime Beauchemin cde17a8c9d
docs: Add an 'Orientation' section to CONTRIBUTING.md (#8422) 2019-10-22 21:44:11 -07:00
John Bodley 9fc37ea9f1 [ci] Deprecate flake8 (#8409)
* [ci] Deprecate flake8

* Addressing @villebro's comments
2019-10-18 14:44:27 -07:00
Maxime Beauchemin 5c7a50c104
Improvements related to ASF release process (#7539)
* [WiP] Improvements related to ASF release process

* Removing translation binaries (.mo)
* Working on 2 docker files to help package and validate releases
  * Dockerfile.from_tarball: takes a VERSION as input, downloads
    official source release fro svn and bakes it into a functional
    docker image that can be validated
  * Dockerfile.make_tarball: helps a maintainer to package and sign a
    release candidate or release

* Address COPYRIGHT + LICENSE issues

(cherry picked from commit 5ae2836b25)

* Add Roboto font to LICENSE, remove glyphicons files

(cherry picked from commit 9615f39f7a556afe217b4e3288c9116f8ffaab91)

* remove unused LICENSE entries

* Change babytux to open image in birth dashboard

(cherry picked from commit 2776d11893596a029b8af37b96fd6ce1a9f12059)

* Improve instructions

* Docker tweaks

(cherry picked from commit df6e6462458ea8cff1482c142921b20f5607ad8e)

* Include image
2019-07-03 22:33:14 -07:00
John Bodley 5c58fd1802
[format] Using Black (#7769) 2019-06-25 13:34:48 -07:00
Daniel Vaz Gaspar 4b1452e15a [docs] Fix, flask fab cli does not need app parameter (#7696) 2019-06-13 09:34:52 -07:00
Marcus f486f435b4 adding command for seeing changes reflected. (#7598) 2019-06-09 19:13:43 -07:00
Daniel Vaz Gaspar de9f61e934 [docs] Fix, deprecate fabmanager cli (#7660) 2019-06-06 22:15:00 -07:00
Russell Jurney 023faf3b56 Rjurney master docs update (#7426)
* resolved conflict

* Docs updated re: Anaconda/certifi issue re #7373

* Removed --console-log "not working" note

* A note about Anaconda virtualenvs

* Make anaconda comment fit on page

* Added README to docker directory

* Added install doc reference to master copy of contrib/docker/README.md

* merged master, removed mysqlclient

* Removed mysql dependency, Anaconda and --console-log references

* Add cypress install command to cypress test instructions

* Fixed cypress instructions re: port 8081

* Removed anaconda reference, runserver references

* Remove anaconda reference

* Added back a self-contained version of mysqlclient to dev requirements

* Added ASF license to docker README.md
2019-05-20 17:06:08 -07:00
Beto Dealmeida ef13500d1a
Refactor ConsoleLog (#7428) 2019-05-08 13:05:01 -07:00
Russell Jurney 70be44afe1 Removed --console-log and superset runserver (#7421) 2019-05-01 20:46:39 -07:00
Maxime Beauchemin 5f28027ce7 Merging lyftga into master 2019-04-18 22:47:47 -07:00
Maxime Beauchemin 97718daea3 Fix control validation handling (#7231)
Fixes a series of unexpected things around control validation.

* when a chart opens in a state where a control is invalid, it still
  runs the query, and sometimes gets stuck in what appears to be a 'running'
  state. After this change, no query is run, and a warning is displayed
  in the chart panel body, just like any other error would
* validation used to be done in the <Control> component and alter the
  redux store as it went. Clearly this is not the right approach, now
  validation occurs on loading the initial redux state, as well as in
  the reducer when controls are changed
* currently, when going from a invalid control state to a valid one
  (user addresses what is needed), it auto-triggers a query which can be
  unexpected. After this change, the error message disappears, and the
  "Run Query" overlay gets displayed
* when changing viz type, it's common to get new validation
  errors, and currently when that occurs it will still go ahead and run
  a query with invalid inputs, which often results in errors
  that are not well handled, since much of the logic
  assumes control-validated input.
* prettier control validation messages

(cherry picked from commit a3212eba5df95bca834d8d6d98c11d522d9172f3)
2019-04-18 11:36:38 -07:00
Maxime Beauchemin 0c3e46f8ae
Deprecate npm run backend-sync and related logic (#7211) 2019-04-10 08:46:05 -07:00
Maxime Beauchemin c2b971af91
[docs] CONTRIBUTING.md - how to setup SQL Lab in async mode (#7103) 2019-03-26 22:50:19 -07:00
John Bodley 80d6f5a090 [mypy] Adding mypy linting (#7053) 2019-03-24 20:35:48 -07:00
Boris Hajduk 5137539a86 [fix] Use HTTPS, not HTTP wherever practical (#7040)
* Download RAT binary via HTTPS, not HTTP

* Merge branch 'patch-1' of github.com:hajdbo/incubator-superset into patch-1
2019-03-17 23:21:32 -07:00
Christine Chambers b70a9ae524 Merge default feature flags and user defined feature flags
- Rename the default feature flags key in `config.py` to DEFAULT_FEATURE_FLAGS
- Merge default feature flags with user defined ones allowing the latter to overwrite the former
- Expose feature_flags for both server and client to use
- Add a utility method for checking whether a feature flag is on on server side
2019-01-30 22:23:27 -08:00
Wonjin Kim 5938ac30d6 fix #6760 (#6762) 2019-01-28 22:45:16 -08:00
Krist Wongsuphasawat ebb799140a
Update CONTRIBUTING.md based on SIP-13 and add how to use labels (#6701)
* update contributing based on SIP-13

* update link

* add labels instruction

* minor edit

* minor edit

* update table of content

* Add ASF header and update insructions

* update table

* update text
2019-01-19 03:18:22 -08:00
Christopher Council 207d9529b2 Fix for #6590: Numeric values in columns sometimes returned as quoted strings (#6591)
* Fix: https://github.com/apache/incubator-superset/issues/6590, also depends on https://github.com/apache-superset/superset-ui/pull/71

* Bumped version of superset-ui-connector

* Added @babel/polyfill import

* Reset mock history before each test, not after each test

* Update CONTRIBUTING.md
2019-01-14 15:35:28 -08:00
Yao Zhou f480a52074 Add doc about translation using poedit (#6600)
* Update CONTRIBUTING.md
2019-01-15 01:48:12 +07:00
Maxime Beauchemin 60ccf3eb9d [SIP-14] remove dependency on yarn in favor of npm (#6541)
* [SIP-14] remove dependency on yarn in favor of npm

Find more details here
https://github.com/apache/incubator-superset/issues/6217

* Add core-js to dev deps

* lint

* fix cypress

* break down cypress_build.sh

* fix cypress

* Use 'npm ci' in place of 'npm install'

* Bump npm req to >=6.5.0

* Enforcing  npm@'>=6.5.0'

* Using latest lts of nvm

* Make cache settings global

* remove uneeded 'npm run test' as 'npm run cover' takes care of that

* Prefix with 'time'

* Trying to upgrade babel-eslint instead of downgrading

* upgrading babel-polyfill to '@babel/polyfill'

* Moving to babel 7

* remove unused packages
2018-12-21 10:24:49 -08:00
Chanakya c6263fc096 Documentation Correction to use http.server for Python3 (#6549) 2018-12-17 17:20:33 -08:00
Krist Wongsuphasawat 96a0105f7a
Update contributing.md with latest local dev instructions (#6513) 2018-12-11 13:45:50 -08:00
Hugh A. Miles II 52bb92d0d4 [Docs] Make sure venv is py3 and export app (#6401)
* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md
2018-11-27 11:41:50 -08:00
Victor Noël 02aa3c6395 Improve development experience with Docker (#5966)
- Improve Docker image
  - smaller
  - faster to build
  - deterministict dependencies (see #5958)
- Rework process to simplify setting things up
  - updated documentation
  - less commands to type
  - no files to move and modify
  - optional loading of samples
- Still working in standalone mode (without volumes for superset)
2018-11-27 11:19:55 -08:00
Craig Rueda 5ca8c0ba3c Updated local dev instructions to include missing step (#6428) 2018-11-26 11:16:58 -08:00
Beto Dealmeida d1cbb0d000
Update CONTRIBUTING.md (#6259) 2018-11-01 11:19:35 -07:00
Maxime Beauchemin e46ab4db52
Bump Flask, bleach and sync pip-compile (#6239)
* sync pip-compile

* Support Flask >= 1.0.0

* pylint

* Trying something else to fix pylint
2018-10-31 16:58:50 -07:00
Krist Wongsuphasawat 1473e2cced Integrate translation module @superset-ui/translation (#6222)
* add translation modules

* Update package.json

* Update instructions in CONTRIBUTING

* Remove old files

* Add new entry point "translation"

* Change imports

* move setupTranslation code

* remove translation from entry

* Update python template

* Refactor utils into smaller, independent files

* Define preamble

* working state

* combine toggleCheckbox with setupApp

* move code block out of document.ready

* move setupClient to preamble

* fix unit tests

* update package version

* delete deletion code
2018-10-30 14:51:44 -07:00
Christine Chambers 5f1eaa49f2 [SIP-9] Introduce TypeScript (#6120)
* [SIP-9] Introduce TypeScript

- Introduce TypeScript and co to both source and tests
- Define alias for src directory in both webpack config and jest config so we can avoid using long relative paths like ../../src in both source and tests
- Type check feature flags system to prevent typos of flag names
- Change the feature flags system and the flags on window instead of populating them through the state tree. When introducing the first SCOPED_FILTER feature flag, it became too difficult to pipe the flags through the state initializers and layers of components and containers (the resulting code is hard to read and has a handful of methods taking an additional feature flag map parameter). Given that feature flags don't change throughout the life time of the app, it is better to leave them on window for easy access than piping them through the global state tree, which is meant to store the state of the app which changes frequently.
- Add a barebone filter panel that only shows when the SCOPED_FILTER feature flag is on

* Remove unnecessary dev-dependency on gl

* - Adding linting for TypeScript files via tslint.
- Fixing linting for Javascript files importing Typscript files
- Also fix linting for Javascript files that now leverage the webpack alias for the src directory

- up Typescript and type def versions

* Rename src directory's webpack alias from @ to src to be more explicit.
2018-10-23 22:33:51 -07:00
Christine Chambers 9029701f24 [refactor] Migrate from Mocha+Chai to Jest (#6079)
* [refactor] Migrate from Mocha+Chai to Jest

This change migrates all the existing unit tests
- to Jest's global expect and matchers from chai's imported expect, asserts and matchers.
- to Jest's describe/test from mocha's describe/it

The majority of the mechanical changes to tests are achieved through running jest-codemods. The only two note-worthy manual tweaks:
1. Setting a testURL of http://localhost in jest config and adjusting a few tests to leverage this value instead of relying on about:blank.
2. Re-enabling ExploreChartPanel_spec which was previously commented out as we cannot have empty tests with nothing in it with Jest. :)

This change also removes dependencies to Mocha and Chai.

* Remove the test:one command as it now does the same thing as test.

* Fixing lint errors. The diff looks large but is large done through `yarn run lint --fix`

The only noteworthy change is the one in eslintrc for tests. The env has been updated from mocha to jest.

* Adding eslint-plugin-jest and further modify tests.

- One small fix in sqllab's Timer Spec for a test that is not using the spy it created for testing.
- Deletion of a duplicated test caught by eslint-plugin-jest.

* - Make istanbul coverage work with Jest.

- Remove dependency on stand-alone istanbul and babel-istanbul as they're built-into jest. Yes!

* Attempt to fix dynamic imports in tests.

* run sequentially and log heap usage

* - tweaking maxworkers for travis and specifying coverageDirectory for codecov

- remove dynamic import in shim.js now that it is set in babelrc for tests only.
2018-10-15 13:10:18 -07:00
timifasubaa dd9eeda03e
remove future (#6065) 2018-10-13 09:39:04 -07:00
John Bodley 238ffb4dee
[setup] Using pip-tools to create requirements.txt (#6054) 2018-10-09 13:45:43 -07:00
Junda Yang 712c1aa767 Allow user to force refresh metadata (#5933)
* Allow user to force refresh metadata

* fix javascript test error

* nit

* fix styling

* allow custom cache timeout configuration on any database

* minor improvement

* nit

* fix test

* nit

* preserve the old endpoint
2018-10-08 20:25:40 -07:00
Alek Storm 549328f8f0 Clean up CONTRIBUTING.md: (#5911)
- Reorganize sections for better navigability
- Add table of contents
- Rework frontend assets section for clarity and DRY
- Rework translating section for clarity, add "Add Translations" contribution type
- Move release docs only useful for maintainers to RELEASING.md
- Other miscellaneous improvements
2018-09-19 10:01:51 -07:00
Chris Williams 42ab1754db
[contributing.md] swap cypress command order (#5921) 2018-09-18 14:37:44 -07:00
Hugh A. Miles II 1e35030a90
[Docs] Running DB migration (#5748)
* Add doc to add new columns

* spelling

* spelling
2018-09-12 07:16:58 -10:00
michellethomas 9f4d67b49b Adding instructions on how to run Cypress in Contributing.md (#5840) 2018-09-07 10:26:51 -07:00
Krist Wongsuphasawat eb41756e5e Configure webpack-dev-server (#5786)
* setup devserver with correct proxy

* dev server wroking with written manifest

* add comments

* Change webpack to default port 9000 and minor js formatting

* Use hash in development.

* write to disk = true

* Take ports as argument for dev-server

* update instructions

* update instructions

* add devtools

* use mode instead of NODE_ENV

* use minicssextract for prod (like before)

* remove empty line
2018-09-04 10:39:05 -07:00
Maxime Beauchemin 12cc2fbe15 [docs] note as to how to build and view the docs 2018-08-25 16:31:03 -07:00
Hugh A. Miles II dd5e0ba70b
Update CONTRIBUTING.md (#5668) 2018-08-19 15:42:09 -07:00
Octavian 39ff9deb57 update python3 version for testing to 3.6 (#5562)
* update python version for testing to 3.6

* CONTRIBUTING.md states pull requests should work on py27, py36+

* CONTRIBUTING.md states pull requests should work on py27 and py36
2018-08-07 13:22:19 -07:00
Maxime Beauchemin 971e9f0993
Fix the build by merging both db migrations heads (#5464) 2018-07-23 09:43:09 -07:00
Vishal Jagtap 6441f69271 Typo fixes in viz.py and CONTRIBUTING.md (#5432) 2018-07-19 16:45:56 -07:00
Kengo Seki 860a4d9123 [docs] minor file name and format fix for the setup document (#4844) 2018-04-19 11:34:23 -07:00
Beto Dealmeida fd84fd89ce RFC: add logger that logs into browser console (#4702)
* Option for logging into browser console

* Move import

* Add lint req

* Add docs, use Flask logger
2018-04-12 21:48:17 -07:00