🐛 / ✨ Enhance Dynaport Logic and Data Structure Handling for Dynamic Component References #283
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 likec_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
anddynatuple
have been redefined as subclasses of Python's built-inlist
andtuple
, respectively, to enhance their functionality. Thedynadict
class has been removed due to its limitations, and its functionality is replaced by the newMakeDict
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
Type of Change
Tests
1. Test if Parameter is Passed from Non-Literal
2. Test if Literal Chat can be passed to a List inPort
Tested on?
Visual Verification