Commit Graph

53 Commits

Author SHA1 Message Date
John Bodley 847ed3f5b0
refactor: Ensure Flask framework leverages the Flask-SQLAlchemy session (Phase II) (#26909) 2024-02-14 06:20:15 +13:00
EugeneTorap 42d0474cc2
chore: Update pylint to 2.17.7 (#25566) 2023-10-09 11:51:41 -07:00
EugeneTorap 5f103072b0
fix: Python3.11 (str, Enum) issue (#24803) 2023-07-31 09:04:09 -07:00
EugeneTorap fc89718d48
chore: Update pylint to 2.17.4 (#24700)
Co-authored-by: John Bodley <john.bodley@gmail.com>
2023-07-24 17:13:49 -07:00
Sebastian Liebscher c963416c09
chore: remove deprecated distutils (#24001) 2023-05-11 19:00:04 +03:00
John Bodley 50d2e5a15d
fix: Address performance regression introduced in #11785 (#20893) 2022-07-28 22:56:39 -07:00
John Bodley f0ca158989
fix: Refactor ownership checks and ensure consistency (#20499)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2022-07-07 11:04:27 -07:00
John Bodley fb4650a6eb
chore(pylint): Remove top-level disable (#16589)
* chore(pylint): Remove top-level disable

* Update examples.py

* Update command.py

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-09-15 09:30:23 -07:00
John Bodley 1669947bcd
chore(pylint): Reenable too-many-lines check (#16287)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-09-13 13:22:19 -07:00
Ville Brofeldt ac1d779a30
chore(ci): bump pylint to 2.10.2 (#16463) 2021-08-26 20:30:41 +03:00
John Bodley 7e4c940314
chore(pylint): Enable useless-suppression check (#16388)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-24 03:58:41 +12:00
John Bodley be7065faf8
chore(pylint): Reenable raise-missing-from check (#16266)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 10:26:10 +12:00
John Bodley 36bc7b0b80
chore(pylint): Reenable too-few-public-methods check (#16264)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 05:20:44 +12:00
John Bodley 0df15bf207
chore(pylint): Reenable import-outside-toplevel check (#16263)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 05:20:13 +12:00
John Bodley b5c7ed9f18
chore(pylint): Reenable too-many-locals check (#16268)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 04:23:40 +12:00
John Bodley 7b724439b9
chore(pylint): Reenable ungrouped-imports check (#16256)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 04:01:01 +12:00
John Bodley 8e07dd28bc
chore(pylint): Re-enable super-with-arguments check (#16138)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-17 04:00:24 +12:00
John Bodley 24b43beff9
chore(pylint): Bump Pylint to 2.9.6 (#16146)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-14 10:32:28 +12:00
Hugh A. Miles II 171514360e
feat: Allow users to connect via legacy SQLA form (#16201)
* hugh/dbui-other

* remove extra condition

* add not callable

* Update .pylintrc

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-08-12 15:10:42 -04:00
Hugh A. Miles II 4cb79e5017
fix: Fix long dashboards screenshot emails (#15954)
* create serialize json function

* create new setting for reports

* cleanup

* address comments

* up the attributes
2021-08-02 16:37:34 -04:00
Jesse Yang b73d7baedf
fix(dashboard): FilterBox JS error when datasets API is slow (#15993) 2021-07-30 22:06:29 -07:00
Hugh A. Miles II bfe7eb9a7b
feat(dbc ui): Adding Google Sheets Dynamic Form (#15801)
* feat: Make Google Sheets Dyanmic (#15576)

* first draft

* second draft

* added tests

* first draft

* added table_catalog

* remove console.log

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* revisions

* save this for now

* working form

* save disable on public sheets

* refactor somethings

* saving this for now

* working edit

* add back query to schema

* working add

* fix styling

* fixing x

* fix linting

* prettier

* fix some type issues

* more lint fixes

* remove unused dependency

* fix linint

* fix validation

* pylint bypass

* pylint bypass

* fix this

* fix mypy

* yerp

* fix test

* fix test

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm.tsx

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* wrap add sheets

* fix linting issues

* fix unit test

* ignore typing

* fix editting and paste issues

* remove query

* fix this

* fix test

* add test back

* fix error messaging

* update url messaging on error

* change error type

* Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* add errors for sheets with no name

* fix

* fix messaging for gsheets

* stop pylint

* update line

Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>
Co-authored-by: Arash <arash.afghahi@gmail.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-07-28 15:00:27 -04:00
Beto Dealmeida 3441182630
chore: remove unnecessary deps (#15787)
* chore: remove unneeded deps

* fix lint

* Run compile
2021-07-21 16:53:45 -07:00
John Bodley 32a5680510
chore: pylint reenable bad-option-value (#15775)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-07-22 04:34:08 +12:00
John Bodley 5bce2538a2
chore: Re-eanble non-problemaric Pylint messages (#15772)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-07-21 09:19:15 -07:00
John Bodley ca873acd55
chore: Reformat disable checks to multiline (#15753)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-07-19 14:11:49 +12:00
Yongjie Zhao e6bc7c99e7
feat: add type_generic and is_dttm to table metadata (#14863) 2021-06-03 08:20:47 +08:00
Craig Rueda a49e0b2037
feat: Adding encrypted field factory (#14109)
* First cut at adding enc type factory

* Finalized enc type factory

* Adding unit test

* PyLinting

* Adding license

* Apply suggestions from code review

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>

* Moving things from enc -> encrypt

* CI commit

* One more fix

* Tweaking config name

* Fixing broken test

* Fixing broken test again

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2021-04-16 09:01:18 -07:00
Jesse Yang e3db935c62
refactor: migrate table chart to new API (#10270)
* refactor: migrate table chart to new API

* chore: bump superset-ui to 0.17.0

* Fix Cypress tests

* Apply soft-conversion to numeric metrics

Fix time column formatting test

* Add translation to chart does not exist error

* Bump to 0.17.1
2021-01-29 13:12:09 +02:00
Kasia Kucharczyk 6b318c477e
Removed disable global pytlint rule `standarderror-builtin` which isn't appearing for Python3 (#11038) 2020-09-24 13:48:02 -07:00
Kasia Kucharczyk 74a2270d0a
fix: re-enabling several globally disabled lint rules (#10957)
* Removed global pylintrc rule: bad-continuation. Black repaired it.

* Enable global pylintrc rule: duplicate-code. It might help with providing clean code and future refactors.

* Removed global rule `dict-iter-method` since Python3 doesn't support methods: dict.iterkeys(), itervalues() or iteritems()

* Removing global disabler rule `invalid-unary-operand-type`, because all unary operators are used on objects which supports those operations
2020-09-21 08:47:04 -07:00
Kasia Kucharczyk 8735a14ea7
Removed global pylintrc rule: old-ne-operator. Which is not applicable in code anymore. (#10915) 2020-09-17 06:47:52 -07:00
Bogdan 19a9bcc9c5
chore: ci Initial hive support (#10593)
* Initial hive support

* Clone hive setup

* Make hive tests work locally

* Debugging presto failure

* sleep in dataset test

* Address comments

* Address comments

* Pin ipython, exclude new pylint rules

Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
2020-08-27 09:49:18 -07:00
John Bodley cda764fd4b
chore: Adding pip-compile-multi et al. (#10499)
* chore: Adding pip-compile-multi et al

* Specify requirements.txt path for fossa

* [ci] Fixing CI

Co-authored-by: John Bodley <john.bodley@airbnb.com>
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2020-08-04 19:31:52 -07:00
Will Barrett 8e23d4f369
chore: Upgrade pylint to 2.5.3 and fix most new rules (#10101)
* Bump pylint version to 2.5.3

* Add a global disable for the most common new pylint error

* Fix a bunch of files containing very few errors

* More pylint tweakage, low-hanging fruit

* More easy stuff...

* Fix more erroring files

* Fix the last couple of errors, clean pylint!

* Black

* Fix mypy issue in connectors/druid/models.py
2020-06-18 14:03:42 -07:00
Will Barrett 01aede0652
refactor: Break up superset/views/core.py (#10078)
* Remove unreferenced function from views/core.py

* Remove excess constants from views/core.py

* Extract CssTemplate-related views to their own file from core.py

* Remove duplicate constant declaration and make the constant less racist

* Move free-floating functions in views/core.py to views/utils.py

* Move AccessRequestsModelView out of views/core.py into its own module

* Move health checks and KV ModelView out of core.py and into their own modules

* Move R model view to its own module

* Move after-request header setting to views/base.py from views/core.py

* black

* mypy

* isort

* Fix reference to imported app

* pylint

* Fix some imports

* Add some missing view imports

* Fix a missing import
2020-06-17 13:42:13 -07:00
Ville Brofeldt 980dd2fd41
pylint: accept specific 2 character names by default (#9460)
* lint: accept 2 letter names by default

* Address review comments

* Remove e and d from good-names
2020-04-08 20:32:26 +03:00
Will Barrett 562aeab1aa Fix a bunch of files with pylint disabled (#8743)
* Re-enable pylint for superset/jinja_context.py

* Re-enable pylint for superset/sql_lab.py

* Re-enable pylint for superset/sql_parse.py

* Re-enable pylint for superset/exceptions.py

* Re-enable lint for superset/translations/utils.py

* Re-enable pylint for superset/views/schedules.py

* Re-enable pylint for superset/views/base.py

* Re-enable pylint for superset/views/log/views.py

* Re-enable pylint for superset/views/annotations.py

* black

* PR feedback, pylint, isort fixes

* Black, one more time...

* Move ungrouped-imports to a global disable
2019-12-11 10:14:24 -08:00
John Bodley 5c58fd1802
[format] Using Black (#7769) 2019-06-25 13:34:48 -07:00
bolkedebruin 1fece0d2fa Add licenses to translations (#6732)
* Add licenses

* More licenses

* Ignore messages.json as they are generated

* More licenses

* Also typescript

* Fix alignment

* Add to svg

* Many more licenses

* more licenses

* Better excludes

* Add licenses to docs and md files

* Pre-finalize licenses

* Fix newlines

* Finalize all sourde licenses

* Fix lint
2019-01-22 08:21:13 -08:00
Christine Chambers 8c0551ed46 [SIP-5] Open a new /api/v1/query endpoint that takes query_obj (#6220)
* [SIP-5] Open a new /api/v1/query endpoint that takes query_obj

- Introduce a new handle_superset_exception decorator to avoid repeating the logic for catching SupersetExceptions
- Create a query_obj_backfill method that takes form_data and constructs a query_obj that will be constructed in the client in the future. Use the backfill in explore_json.
- Create a new /api/v1/query endpoint that takes query_obj only and returns the payload data. Note the query_obj is constructed in the client. The endpoint currently only handles query_obj for table view viz (we'll be adding support to new viz types as we go).
- Unit test to verify the new endpoint for table view

* fix tests and lint errors

* - Move the new query endpoint into its own api.py view.
- Create QueryObject and QueryContext class to encapsulate query_object to be built from the client and additional info (e.g. datasource) needed to get the data payload for a given query
- Remove the query_obj_backfill as we'll start building the first query_object on the client so it no longer makes sense to have a short-lived backfill for the matter of days.

* Fixing lint and test errors

* Fixing additional lint error from the previous rebase.

* fixing additional lint error

* addressing additional pr comments

* Make /query accept a list of queries in the query_context object.

* fixing a lint error

* - Move time_shift based calculation and since, until check into util
- Add typing info for get_since_until
- Add new unit tests to verify time_shift calculation and the since until check
2018-11-07 17:23:52 -08:00
Maxime Beauchemin 7b3095d6ff
Fix examples charts/dashboards and refactor (#5881)
* Fix examples charts/dashboards and refactor

* pylinting

* Fix pylint

* Lint the refactor

* Rebased
2018-10-31 15:29:04 -07:00
Beto Dealmeida 359b31ebab Increase pylint jobs (#5646) 2018-08-21 20:50:53 -07:00
John Bodley 7fcc2af68f
[sql] Correct SQL parameter formatting (#5178) 2018-07-21 12:01:26 -07:00
Gabe Lyons 1c9474b4ff treating floats like doubles for druid versions lower than 11.0.0 (#5030) 2018-05-21 11:50:04 -07:00
grafke 8591319bde [sql lab] Use context manager for sqllab sessions (#4927)
* use session context manager

* contextlib2 added to requirements.txt

* Fixing error: Import statements are in the wrong order. from contextlib2 import contextmanager should be before import sqlalchemy

* Fixing return inside generator

* fixed C812 missing trailing comma

* E501 line too long

* fixed E127 continuation line over-indented for visual indent

* E722 do not use bare except

* reorganized imports

* added context manager contextlib2.contextmanager

* fixed import ordering
2018-05-10 10:32:31 -07:00
John Bodley d533ce0967
[pylint] prepping for enabling pylint for non-errors (#4884) 2018-04-28 20:08:09 -07:00
michellethomas 97afcd5809 Adding to list of generated-members to fix pylint errors (#4632)
* Adding to list of generated-members

* Updating to ignore-classes sqlalchemy scoped_session
2018-03-16 16:20:25 -07:00
Maxime Beauchemin 3a8af5d0b0 DECKGL integration - Phase 1 (#3771)
* DECKGL integration

Adding a new set of geospatial visualizations building on top of the
awesome deck.gl library. https://github.com/uber/deck.gl

While the end goal it to expose all types of layers and let users bind
their data to control most props exposed by the deck.gl API, this
PR focusses on a first set of visualizations and props:

* ScatterLayer
* HexagonLayer
* GridLayer
* ScreenGridLayer

* Addressing comments

* lint

* Linting

* Addressing chri's comments
2017-11-16 00:30:02 -08:00
Maxime Beauchemin 366ecefbaa Bumping the JS libs to fix the build (#2616)
* bumping the js libs

* New linting rules

* More linting

* More

* Done linting

* npm >=4.5.0

* Bumping node

* Tweaking the build

* Fixing the damn build

* Fixing the apps
2017-04-13 15:04:09 -07:00