You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/06/17 03:25:16 UTC

[GitHub] [incubator-superset] willbarrett opened a new pull request #10078: refactor: Break up superset/views/core.py

willbarrett opened a new pull request #10078:
URL: https://github.com/apache/incubator-superset/pull/10078


   ### SUMMARY
   
   The file `superset/views/core.py` is massive, to the point that I get lost in there all the time when I'm working on something. There's no need for us to stuff so much functionality into a single Python module. This PR tackles some low-hanging fruit for breaking up this file, moving out a few pieces that are logically separate from the elephant in the room: the `Superset` class.
   
   I'm hoping that in a near-future PR I'll be able to start breaking up some of the larger functions in the `Superset` class, but I wanted to get the community's reaction to these changes first.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   N/A
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   CI! Boot up locally and make sure everything still works!
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### Reviewers
   @john-bodley @mistercrunch @craig-rueda 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] craig-rueda merged pull request #10078: refactor: Break up superset/views/core.py

Posted by GitBox <gi...@apache.org>.
craig-rueda merged pull request #10078:
URL: https://github.com/apache/incubator-superset/pull/10078


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] john-bodley commented on pull request #10078: refactor: Break up superset/views/core.py

Posted by GitBox <gi...@apache.org>.
john-bodley commented on pull request #10078:
URL: https://github.com/apache/incubator-superset/pull/10078#issuecomment-645750438


   @willbarrett thanks for the change.
   
   Unrelated to this change (but relevant to the `superset.views` module) I think we should probably strive to use `base.py` to represent base classes which get extended and `core.py` (or similar) to represent core logic (including functions). I think at the moment there isn't a clear divide between the two.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #10078: refactor: Break up superset/views/core.py

Posted by GitBox <gi...@apache.org>.
dpgaspar commented on a change in pull request #10078:
URL: https://github.com/apache/incubator-superset/pull/10078#discussion_r441665116



##########
File path: .pylintrc
##########
@@ -48,7 +48,7 @@ unsafe-load-any-extension=no
 # A comma-separated list of package or module names from where C extensions may
 # be loaded. Extensions are loading into the active Python interpreter and may
 # run arbitrary code
-extension-pkg-whitelist=
+extension-pkg-whitelist=pyarrow

Review comment:
       nice!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter commented on pull request #10078: refactor: Break up superset/views/core.py

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #10078:
URL: https://github.com/apache/incubator-superset/pull/10078#issuecomment-645136536


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10078?src=pr&el=h1) Report
   > Merging [#10078](https://codecov.io/gh/apache/incubator-superset/pull/10078?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/26120467af3825577a30190f42d942836b147c9f&el=desc) will **decrease** coverage by `10.77%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10078/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10078?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #10078       +/-   ##
   ===========================================
   - Coverage   70.50%   59.72%   -10.78%     
   ===========================================
     Files         585      402      -183     
     Lines       31074    12919    -18155     
     Branches     3185     3193        +8     
   ===========================================
   - Hits        21909     7716    -14193     
   + Misses       9056     5025     -4031     
   - Partials      109      178       +69     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `59.72% <ø> (+0.21%)` | :arrow_up: |
   | #python | `?` | |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10078?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10078/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10078/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10078/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10078/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10078/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10078/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/10078/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10078/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupFormatters.js](https://codecov.io/gh/apache/incubator-superset/pull/10078/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwRm9ybWF0dGVycy5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/10078/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [324 more](https://codecov.io/gh/apache/incubator-superset/pull/10078/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10078?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10078?src=pr&el=footer). Last update [2612046...6ec50b1](https://codecov.io/gh/apache/incubator-superset/pull/10078?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] willbarrett commented on pull request #10078: refactor: Break up superset/views/core.py

Posted by GitBox <gi...@apache.org>.
willbarrett commented on pull request #10078:
URL: https://github.com/apache/incubator-superset/pull/10078#issuecomment-645593484


   Woohoo! Green build! What do you think @john-bodley @craig-rueda - good to go?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] willbarrett commented on pull request #10078: refactor: Break up superset/views/core.py

Posted by GitBox <gi...@apache.org>.
willbarrett commented on pull request #10078:
URL: https://github.com/apache/incubator-superset/pull/10078#issuecomment-645753733


   @john-bodley agreed on centralizing base classes. As for `core.py`, I think `core.py` should turn into `superset.py` and only hold the `Superset` class. Ideally the majority of the functionality of that class would be extracted to Command or DAO objects. More on this in PR form in the near future I hope.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org