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

[BUGFIX] Inverse channel_name_map fix for FlascDataFrame #222

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

misi9170
Copy link
Collaborator

@paulf81 pointed out a bug on FlascDataFrame that arose when the channel_name_map property is set after instantiation. In this case, the hidden property _channel_name_map_inverse was not generated correctly to follow. In principle, this could have been fixed by using a setter method for channel_name_map (that also sets _channel_name_map_inverse); however, I was having issues with recursion when using getters/setters for channel_name_map.

As the inverse map is only used within the one method of FlascDataFrame, convert_to_user_format(), the approach taken here is to simply remove the _channel_name_map_inverse attribute entirely and instead create the inverse map from channel_name_map on the fly when convert_to_user_format() is called.

@misi9170 misi9170 added the bug Something isn't working label Oct 18, 2024
@misi9170 misi9170 requested a review from paulf81 October 18, 2024 20:21
@misi9170 misi9170 merged commit 8690a3a into NREL:develop Oct 18, 2024
3 checks passed
@misi9170 misi9170 deleted the bugfix/fdf-inverse-map branch October 18, 2024 20:24
@misi9170 misi9170 mentioned this pull request Oct 19, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants