-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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 lab command: separate concerns into different modules #16917
Conversation
8e1100c
to
59f7d7b
Compare
311b05f
to
d5788d5
Compare
8957fb0
to
dcf24fb
Compare
dcf24fb
to
98ca456
Compare
Codecov Report
@@ Coverage Diff @@
## master #16917 +/- ##
========================================
Coverage 77.03% 77.03%
========================================
Files 1021 1026 +5
Lines 54846 55005 +159
Branches 7481 7481
========================================
+ Hits 42250 42375 +125
- Misses 12349 12383 +34
Partials 247 247
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice separation of concerns!
@@ -14,6 +14,7 @@ | |||
# KIND, either express or implied. See the License for the | |||
# specific language governing permissions and limitations | |||
# under the License. | |||
# pylint: disable=arguments-renamed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ofekisr could we move these to the lines where the issue occurs? There was an effort in #16589 to remove top-level Pylint disable checks as it's i) unclear to the reader where these violations are occurring, and ii) potentially masks issues in future changes.
I realize that this wasn't clear and so adding it to the CONTRIBUTING.md
in #17016.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @john-bodley as you notice this is the only change that was done to the file.
It was done bc all of a sudden pylint required it in the CI
The recent series of pylint rules changes that was done has awaken wiered behaviour and the CI and require us to work for the pylint instead of it working for us
linting all of sudden became a disturbance we need hop over on every PR
…odules (apache#16917)" This reverts commit 0d0c759.
…odules (apache#16917)" This reverts commit 0d0c759.
…odules (apache#16917)" This reverts commit 0d0c759.
…pache#16917) * chore move sql_execution_context to sqllab package * add new helper methods into base Dao * refactor separate get existing query concern from command * refactor separate query access validation concern * refactor separate get query's database concern from command * refactor separate get query rendering concern from command * refactor sqllab_execution_context * refactor separate creating payload for view * chore decouple command from superset app * fix pylint issues * fix failed tests * fix pylint issues * fix failed test * fix failed black * fix failed black * fix failed test
…pache#16917) * chore move sql_execution_context to sqllab package * add new helper methods into base Dao * refactor separate get existing query concern from command * refactor separate query access validation concern * refactor separate get query's database concern from command * refactor separate get query rendering concern from command * refactor sqllab_execution_context * refactor separate creating payload for view * chore decouple command from superset app * fix pylint issues * fix failed tests * fix pylint issues * fix failed test * fix failed black * fix failed black * fix failed test
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 sixteenth PR in the sequence of future PRs (previous PR) try to solve it by refactoring the code.
The PR focus on separating sqlJsonCommand concerns into dependencies (interfaces)
actually, there are no logic changes so it implies on the current tests.