Skip to content

Conversation

@pas-calc
Copy link
Contributor

@pas-calc pas-calc commented Feb 2, 2026

Added option to attach unit properties from sorting to the TsGroup object.

#4346

pas-calc and others added 2 commits February 2, 2026 12:26
Added option to attach unit properties from sorting to the TsGroup object.
Changed attach_unit_properties to True by default and updated property_data assignment to convert to list.
@alejoe91 alejoe91 added the exporters Related to exporters module label Feb 2, 2026
@samuelgarcia
Copy link
Member

Cool!

Comment on lines +89 to +92
for property_key in property_keys: # loop through sorting's properties
property_data = sorting.get_property(property_key)
property_df[property_key] = list(property_data)
metadata_list.append(property_df)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests are failing when there are no sorting properties. I would put these four lines inside a if len(property_keys) > 0, so that the metadata_list is only updated if there are some property keys.

# Look for good metadata to add, if there is a sorting analyzer
if attach_unit_metadata and isinstance(sorting_analyzer_or_sorting, SortingAnalyzer):

metadata_list = []
Copy link
Member

@chrishalcrow chrishalcrow Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

I noticed that this metadata_list = [] is not needed! A bug from me when I first coded this. Could you remove it please - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exporters Related to exporters module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants