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: move post_processing to unittest #18779

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

zhaoyongjie
Copy link
Member

@zhaoyongjie zhaoyongjie commented Feb 17, 2022

SUMMARY

This PR decouple post-processing unit test and move it from the integration_test to the unit_tests. In order to make life easy, replace class test cases with functional test cases.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Feb 17, 2022

Codecov Report

Merging #18779 (a2c38a6) into master (2421d17) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head a2c38a6 differs from pull request most recent head ead18f1. Consider uploading reports for the commit ead18f1 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #18779   +/-   ##
=======================================
  Coverage   66.32%   66.32%           
=======================================
  Files        1620     1620           
  Lines       63087    63092    +5     
  Branches     6372     6372           
=======================================
+ Hits        41840    41845    +5     
  Misses      19590    19590           
  Partials     1657     1657           
Flag Coverage Δ
hive 52.22% <60.00%> (+<0.01%) ⬆️
mysql 81.43% <100.00%> (+<0.01%) ⬆️
postgres 81.47% <100.00%> (+<0.01%) ⬆️
presto 52.07% <60.00%> (+<0.01%) ⬆️
python 81.91% <100.00%> (+<0.01%) ⬆️
sqlite 81.16% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
superset/common/query_object.py 95.67% <100.00%> (+0.04%) ⬆️
...perset/utils/pandas_postprocessing/contribution.py 100.00% <100.00%> (ø)

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 2421d17...ead18f1. Read the comment docs.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Love the change to proper unit tests! One question about the change in the contribution operator - should we potentially split this PR in two - the first for the refactor, and the second for the functional change once the refactor has been merged?

Comment on lines 76 to 77
# replace infinity and nan with 0 in dataframe
numeric_df.replace(to_replace=[np.Inf, -np.Inf, np.nan], value=0, inplace=True)
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure we want to display infinities as 0? I think having 1/0 to result in null to be more intuitive. I assume keeping infinities as null would cause a break in the chart as opposed to it dropping to zero, which IMO feels more intuitive.

Copy link
Member Author

Choose a reason for hiding this comment

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

let us discuss this in new PR.

@zhaoyongjie
Copy link
Member Author

zhaoyongjie commented Feb 17, 2022

Love the change to proper unit tests! One question about the change in the contribution operator - should we potentially split this PR in two - the first for the refactor, and the second for the functional change once the refactor has been merged?

it's my bad. I'm gonna split it to 2 PRs.

@zhaoyongjie zhaoyongjie changed the title fix: contribution operator and refactor unittest refactor: move post_processing to unittest Feb 17, 2022
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@zhaoyongjie zhaoyongjie merged commit 30a9d14 into apache:master Feb 17, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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/XXL 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants