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.
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
Refactor readers iii #242
base: refactor_readers_II
Are you sure you want to change the base?
Refactor readers iii #242
Changes from all commits
dd7c88e
8cef330
62f736e
3c6c53e
5d98e5d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jalew188 here, a lot of hidden complexity arises (also connected to
_init_modification_mapping
) as the "column_mapping" parameter in the yaml is overloaded (could either be str or dict).Could we introduce a (mutually exclusive ) "column_mapping_type` in the yaml, that served to reference another reader?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we shall then add a new method:
add_new_column_mapping_item
to handle user-defined columnsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both modification_mapping and column_mapping are not well designed in alphabase readers. We need a better way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I absolutely agree. I think the modification mapping is already quite close but we need to make sure it works the same where everywhere. It's also not yet compatible with custom mods and MP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why this attribute is mutated in place, while the others are reassigned?
(see e.g. line 269)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess for readability? Complex Inplace operations are hard to read and track
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch @lucas-diedrich , I was wondering too .. it's as @jalew188 suspected indeed the limited complexity that made me keep
str_mods_to_lists
as in-place .. but more based on a gut feeling rather than on a strict reasoning .. I could change it for consistency if you like?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thank you for the explanation 👍 So I guess the alternative would then be something like
With
I don't have a strong opinion on this, and the current way looks great, so no need to change it!