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

fix(sankey): Return the exact faulty link instead of root #23444

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nottatdat
Copy link

SUMMARY

The current implementation returns the root of the faulty branch in the tree

if neighbour in path or visit(neighbour):
    return (vertex, neighbour)

The goal of this PR is to pinpoint the exact faulty link in the tree.

cycle = (vertex, neighbour) if neighbour in path else visit(neighbour)
if cycle:
    return cycle

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@rusackas
Copy link
Member

rusackas commented Feb 9, 2024

@nottatdat can you give us a way to test this, or screenshots of whatever's broken? I'm assuming this is still an issue in Superset 3.x? Meanwhile, closing/reopening to see if we can get it to pass CI.

@rusackas rusackas closed this Feb 9, 2024
@rusackas rusackas reopened this Feb 9, 2024
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.02%. Comparing base (7ef06b0) to head (cab4668).
Report is 2857 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #23444      +/-   ##
==========================================
+ Coverage   65.76%   68.02%   +2.26%     
==========================================
  Files        1908     1909       +1     
  Lines       73726    73906     +180     
  Branches     7989     7989              
==========================================
+ Hits        48489    50278    +1789     
+ Misses      23189    21580    -1609     
  Partials     2048     2048              
Flag Coverage Δ
hive 53.81% <0.00%> (?)
mysql 78.04% <100.00%> (?)
postgres 78.14% <100.00%> (-0.37%) ⬇️
presto 53.76% <0.00%> (?)
python 83.10% <100.00%> (+4.59%) ⬆️
sqlite 77.66% <100.00%> (?)
unit 56.49% <0.00%> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM. Pre-commit seems to be having issues... I'll close/reopen to kick-start CI.

@rusackas rusackas closed this Oct 4, 2024
@rusackas rusackas reopened this Oct 4, 2024
@rusackas
Copy link
Member

rusackas commented Oct 4, 2024

Looks like you just need to run the pre-commit hooks to fix this up (or let me push to your branch). To install the hook, run the following:

pip3 install -r requirements/development.txt
pre-commit install
A series of checks will now run when you make a git commit.

Alternatively it is possible to run pre-commit by running pre-commit manually:

pre-commit run --all-files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants