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

🐛 Smart Link Fixes #348

Merged
merged 3 commits into from
Aug 1, 2024
Merged

🐛 Smart Link Fixes #348

merged 3 commits into from
Aug 1, 2024

Conversation

MFA-X-AI
Copy link
Member

@MFA-X-AI MFA-X-AI commented Jul 31, 2024

Description

The smart link action happens when a flow link is created between two nodes. It autoconnects the two nodes' parameter ports that have a shared string, eg: out_sparksession -> in_sparksession.

This PR updates it so that:

  • when a flow link is created, it will check if the port type matches, eg str-> str, any -> any
  • it will allow port linking if an arbitrary datatype is connected to an any type, ie str -> any. Vice versa does not apply, ie any -> x str.

A link should not be created if:

  • the port type does not match (with the exception of any)
  • the source OR the target port already has a link (previously it would overlay an additional link)

References

#153

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Xircuits Project Template
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

Verify the smart link logic:

  • type checks
  • type checks with any
  • port connect if already existing link

Tested on?

  • Windows
  • Linux Ubuntu
  • Centos
  • Mac
  • Others (State here -> xxx )

Copy link

Binder 👈 Launch a binder notebook on branch XpressAI/xircuits/fahreza/smart-link-revisit

@MFA-X-AI MFA-X-AI merged commit 4749f31 into master Aug 1, 2024
8 checks passed
@MFA-X-AI MFA-X-AI deleted the fahreza/smart-link-revisit branch August 1, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant