Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: sql_json view endpoint: separate flask response creation concern #16676

Merged
merged 1 commit into from
Sep 12, 2021

Conversation

ofekisr
Copy link
Contributor

@ofekisr ofekisr commented Sep 12, 2021

SUMMARY

The sql_json view code in superset core view without any "clean code" standard and it does not adopt any software development principle.

This is the eleventh PR in the sequence of future PRs (previous PR) try to solve it by refactoring the code.

The PR focus on separating the creating the flask response concern from multiple methods to one place.
This is the first PR who build the basis so the code will be able to be separated into layers

there are no logic changes so it implies on the current tests.

@ofekisr ofekisr changed the title Refactor/sql json view11 refactor: sql_json view endpoint: separate flask response creation concern Sep 12, 2021
@ofekisr ofekisr force-pushed the refactor/sql_json_view11 branch from e35a2a9 to f40ac66 Compare September 12, 2021 10:05
@codecov
Copy link

codecov bot commented Sep 12, 2021

Codecov Report

Merging #16676 (f40ac66) into master (1429d9d) will increase coverage by 0.07%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16676      +/-   ##
==========================================
+ Coverage   76.84%   76.91%   +0.07%     
==========================================
  Files        1005     1005              
  Lines       54019    54017       -2     
  Branches     7337     7337              
==========================================
+ Hits        41509    41547      +38     
+ Misses      12270    12230      -40     
  Partials      240      240              
Flag Coverage Δ
hive 81.25% <85.71%> (+<0.01%) ⬆️
mysql 81.59% <85.71%> (-0.04%) ⬇️
postgres 81.69% <85.71%> (+<0.01%) ⬆️
presto 81.53% <85.71%> (?)
python 82.19% <85.71%> (+0.14%) ⬆️
sqlite 81.30% <85.71%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/views/core.py 76.24% <85.71%> (+0.03%) ⬆️
superset/models/core.py 89.40% <0.00%> (+0.25%) ⬆️
superset/connectors/sqla/models.py 89.70% <0.00%> (+1.42%) ⬆️
superset/db_engine_specs/presto.py 89.95% <0.00%> (+5.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1429d9d...f40ac66. Read the comment docs.

Copy link
Member

@amitmiran137 amitmiran137 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@amitmiran137 amitmiran137 merged commit 51acada into apache:master Sep 12, 2021
@amitmiran137 amitmiran137 deleted the refactor/sql_json_view11 branch September 12, 2021 12:04
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants