Beto Dealmeida
1d403dab98
fix: DB-specific quoting in Jinja macro ( #25779 )
...
(cherry picked from commit 5659c87ed2 )
2023-10-31 11:22:13 -03:00
John Bodley
3e76736874
chore(dao): Organize DAOs according to SIP-92 ( #24331 )
...
Co-authored-by: JUST.in DO IT <justin.park@airbnb.com >
2023-06-18 18:32:32 -07:00
John Bodley
a4d5d7c6b9
chore(pre-commit): Add pyupgrade and pycln hooks ( #24197 )
2023-06-01 12:01:10 -07:00
EugeneTorap
4a828f57f4
chore: Update mypy and fix stubs issue ( #24033 )
2023-05-12 08:47:14 +01:00
Beto Dealmeida
1874f9a3b6
fix: dataset_macro ( #23376 )
2023-03-14 16:29:12 -07:00
Daniel Vaz Gaspar
79274eb5bc
fix: memoized decorator memory leak ( #23139 )
2023-02-27 15:59:11 +00:00
John Bodley
3483446c28
refactor: Cleanup user get_id/get_user_id ( #20492 )
...
Co-authored-by: John Bodley <john.bodley@airbnb.com >
2022-06-24 17:57:04 -07:00
John Bodley
b08e21efd9
[requirements] Resolve rebase conflicts ( #20152 )
...
Co-authored-by: John Bodley <john.bodley@airbnb.com >
2022-06-03 15:27:35 -07:00
Beto Dealmeida
05a138a191
feat: query datasets from SQL Lab ( #15241 )
...
* feat: Jinja2 macro for querying datasets
* Add docs
* Address comments
2022-06-01 15:18:40 -07:00
Beto Dealmeida
83c3779a6c
feat: add a where_in filter for Jinja2 ( #19574 )
2022-04-07 07:27:23 -07:00
Ville Brofeldt
a619cb4ea9
chore: upgrade black ( #19410 )
2022-03-29 20:03:09 +03:00
Ville Brofeldt
d7834f17e3
fix(filter-indicator): show filters handled by jinja as applied ( #17140 )
2021-10-18 19:28:05 +02:00
Ville Brofeldt
88c09c2138
feat(jinja): improve url parameter formatting ( #16711 )
...
* feat(jinja): improve url parameter formatting
* add UPDATING.md
* fix test
2021-09-15 20:00:26 +03:00
Rob DiCiuccio
4e380db3fd
fix: Support Jinja template functions in global async queries ( #16412 )
...
* Support Jinja template functions in async queries
* Pylint
* Add tests for async tasks
* Remove redundant has_request_context check
2021-09-03 14:33:29 +03:00
grumpy-miner
1f1e2dd29a
fix: ensure setting operator to None ( #16371 ) ( #16372 )
2021-08-31 12:53:40 +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
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
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
Amit Miran
62a8f2e193
chore(python-testing): move memoized tests to unit tests ( #15507 )
...
* chore: move memoized test into a separated file
create integration test workflow
* chore: create unit test workflow to run purely pytest
* fix: bad reference
* fix: remove pip requirements bc there aren't any yet
* temp: install unit dependencies directly
* fix: --rootdir=
* fix: try to run only unit test
* chore: decouple memoized as separated module
* fix: bring back dependencies bc superset top-level module is coupled to flask and others so no reason no to do it
* fix: reference
* fix: pre-commit
* fix: pylint
2021-07-12 10:00:18 +03:00
cccs-jc
c519efe9ad
small code review fix ( #14756 )
...
Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca >
2021-05-27 16:04:42 +03:00
cccs-jc
590fe20a45
feat: Add a remove filter_flag to jinja filter_values function ( #14507 )
...
Implementation issue 13943
Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca >
2021-05-21 19:37:09 +03:00
Rob DiCiuccio
6875a1a9e2
Make g.user attribute access safe for public users ( #14287 )
2021-04-26 08:50:50 -07:00
Beto Dealmeida
8bda6b0bd9
feat: show missing parameters in query ( #12049 )
...
* feat: show missing parameters in query
* Fix lint
* Address comments
* Simplify error message
* Use f-string in helper function
2020-12-15 18:47:40 -08:00
Rob DiCiuccio
01d15f5368
feat(templating): Safer Jinja template processing ( #11704 )
...
* Enable safer Jinja template processing
* Allow JINJA_CONTEXT_ADDONS with SAFE_JINJA_PROCESSING
* Make template processor initialization less magical, refactor classes
* Consolidat Jinja logic, remove config flag in favor of sane defaults
* Restore previous ENABLE_TEMPLATE_PROCESSING default
* Add recursive type checking, update tests
* remove erroneous config file
* Remove TableColumn models from template context
* pylint refactoring
* Add entry to UPDATING.md
* Resolve botched merge conflict
* Update docs on running single python test
* Refactor template context checking to support engine-specific methods
2020-11-17 11:55:47 -08:00
Daniel Vaz Gaspar
7c60939429
chore: turn SQL templating off by default ( #11172 )
...
* feat: possible to turn off SQL templating
* turn SQL templating off by default
* Update UPDATING.md
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com >
* fix missing PR number
* fix missing PR number
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com >
2020-10-08 11:55:39 +01:00
Kasia Kucharczyk
3a08fd04f3
chore: pylint fixes in files in project's root ( #11064 )
...
* Pylint rule: not necesary unused-import in extensions.py. Autofomatted
* Pylint rule: not necesary unused-import in jinja_context.py. Autofomatted
* Pylint rule: not necesary no-value-for-parameter in stats_logger.py. Autofomatted
* Pylint rule: not necesary no-member in viz.py
* Pylint rule: not necesary no-member in viz_sip38.py
2020-09-28 14:32:45 -07:00
Daniel Vaz Gaspar
e375ed4678
fix(jinja): make context attrs private on SQL templates ( #10934 )
...
* fix(jinja): make SQLAlchemy models private on SQL templates
* add missing privates
* fix test
2020-09-18 12:56:07 +01:00
John Bodley
244677cf5e
style(mypy): Enforcing typing for superset ( #9943 )
...
Co-authored-by: John Bodley <john.bodley@airbnb.com >
2020-06-03 15:26:12 -07:00
John Bodley
7f6dbf838e
style: enforcing mypy typing for connectors ( #9824 )
...
Co-authored-by: John Bodley <john.bodley@airbnb.com >
2020-05-25 12:32:49 -07:00
John Bodley
7f89f12c4a
[debug] Debugging caching issue ( #9665 )
...
Co-authored-by: John Bodley <john.bodley@airbnb.com >
2020-04-29 12:16:47 -07:00
John Bodley
955a4fe792
[fix] Automatically add relevant Jinja methods to cache key if present ( #9572 )
...
* [fix] Adding URL params to cache key if present
* [cache] Wrapping Jinja methods
Co-authored-by: John Bodley <john.bodley@airbnb.com >
2020-04-24 08:18:22 -07:00
John Bodley
237ac59474
[fix] Fixing issue with Jinja filter_value ( #9582 )
...
Co-authored-by: John Bodley <john.bodley@airbnb.com >
2020-04-20 09:44:45 -07:00
dandanhub
72f051f3ce
[sqllab] Add CUSTOM_TEMPLATE_PROCESSOR config ( #9376 )
...
Co-authored-by: Dandan Shi <dshi@dropbox.com >
2020-04-07 21:00:42 +01: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
Daniel Vaz Gaspar
0ed0031412
[jinja_context] Fix, allow for app factory pattern ( #8693 )
...
Better app factory pattern on jinja context and introduces tests for building docs
2019-12-03 09:42:57 +00:00
Ville Brofeldt
7104b04817
Pass url parameters from dashboard to charts ( #8536 )
...
* Pass url_params from dashboard to charts
* Update params to form_data instead of overwriting
* Add cypress tests
* Add python test
* Add docs
* Move reserved url params to utils
* Bump cypress
2019-11-21 07:07:08 +02: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
John Bodley
9fc37ea9f1
[ci] Deprecate flake8 ( #8409 )
...
* [ci] Deprecate flake8
* Addressing @villebro's comments
2019-10-18 14:44:27 -07:00
Erik Ritter
cd6de3a1d8
[Jinja] Make Presto template functions backwards compatible ( #7993 )
2019-08-07 09:35:16 -07:00
Ville Brofeldt
4568b2a532
Add cache_key_wrapper to Jinja template processor ( #7816 )
2019-07-20 09:12:35 -07:00
Ville Brofeldt
0125ba40ef
Improve documentation ( #7813 )
...
* Improve documentation and add type annotations for jinja context
* Fix linting errors
* Move requirements to correct place and remove redundant line change
* Make example query more ANSI SQL
2019-07-03 19:54:03 +03:00
John Bodley
5c58fd1802
[format] Using Black ( #7769 )
2019-06-25 13:34:48 -07:00
Jim Horng
78c1674dc7
make filter_values() macro to properly accept value from filter box with single value setting ( #7494 )
2019-06-03 09:54:07 -07:00
Maxime Beauchemin
65f7f2920d
Fix url_param macro when param is missing ( #6699 )
...
User @ravi on Slack reported issues trying to use url_param jinja macro.
explore_json would raise a "KeyError: 'url_params'".
The feature works when a parameter is passed, but fails hard when none
are passed.
I improved the docstring on the macro as well.
2019-01-16 20:44:28 -08:00
Maxime Beauchemin
1dd4d7a587
Apply ASF licenses throughout the code base ( #5800 )
...
* Add license headers
* reabased
* lint
* Removing licenses from vendors folder
2019-01-15 15:53:27 -08:00
Antoan Milkov
fe994900ec
filter_values documentation fix ( #5977 )
2018-12-17 21:20:46 -08:00
timifasubaa
46c86672c8
remove utf8 declaration ( #6096 )
2018-10-15 11:53:24 -07:00
timifasubaa
dd9eeda03e
remove future ( #6065 )
2018-10-13 09:39:04 -07:00
Maxime Beauchemin
896c2608aa
[docs] iterating to get to ASF compliance on project site ( #5923 )
...
* [docs] iterating to get to ASF compliance on project site
https://whimsy.apache.org/pods/project/superset is a place to check on
whether we match the ASF's requirements
* Minor adjustments
2018-09-20 13:51:06 -07:00