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

🐛 / ✨ Enhance Dynaport Logic and Data Structure Handling for Dynamic Component References #283

Merged
merged 5 commits into from
Feb 1, 2024

Conversation

MFA-X-AI
Copy link
Member

@MFA-X-AI MFA-X-AI commented Jan 26, 2024

Description

This pull request introduces several updates and bug fixes to the Dynaport logic within the Xircuits framework. Key improvements include:

  • Bug Fix for Dynamic Ports: Resolved an issue where passing parameters from non-literal components incorrectly used the port name string ('c_5.page', 'c_11.current_item') instead of the actual component values. This fix ensures that references like c_9.inspect.value = [c_5.page, c_11.current_item] now correctly use the actual values from the components, enhancing the accuracy of data handling.

  • Dynamic Data Structure Handling: The update introduces improved argument classes with getter methods, allowing for more flexible data processing. The dynalist and dynatuple have been redefined as subclasses of Python's built-in list and tuple, respectively, to enhance their functionality. The dynadict class has been removed due to its limitations, and its functionality is replaced by the new MakeDict component, which constructs dictionaries from dynalist instances for keys and values, maintaining dynamic component connectivity.

  • Lit to Port Validation Logic Update: The PR also includes updates to the lit to port validation logic, such as allowing Literal Chats to connect to a list InPort, further broadening the framework's versatility.

References

#265

Pull Request Type

  • Xircuits Component Library
  • Others (Please Specify)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Tests

1. Test if Parameter is Passed from Non-Literal

1. Set up a scenario where parameters are passed from non-literal components.
2. Verify the generated code to ensure that actual component references are used instead of strings.

2. Test if Literal Chat can be passed to a List inPort

Tested on?

  • Windows
  • Others (Please Specify)

Visual Verification

@MFA-X-AI MFA-X-AI changed the title 🐛 Fix Dynaport Logic if Parameter is passed from a Non-Literal Component 🐛 / ✨ Enhance Dynaport Logic and Data Structure Handling for Dynamic Component References Jan 30, 2024
@MFA-X-AI MFA-X-AI merged commit e7a061c into master Feb 1, 2024
8 checks passed
@MFA-X-AI MFA-X-AI deleted the fahreza/dynaport-hotfix branch February 1, 2024 02:49
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