Closed prjemian closed 1 year ago
@olliviergassant Thanks for the review, and merge.
Since the column labels were already defined in the __init__()
method, before the call to super().__init__()
, seemed consistent to make this change in the same place. The list of column labels is still available, but now it is the list of dictionary keys.
Since Python (now) renders a dictionary's list of keys in the order they were added to the dict, it is possible to maintain that order when creating and maintaining the table view. The values of the dict are used to provide instruction on how to get the content for that column for each run. The instruction is either a list strings that define the path in run.metadata
or a method object that returns the value for that column of the table.
The code must determine which type of instruction is provided. Here: https://github.com/BCDA-APS/tiled-viz2023/blob/4b25060de61accf79fec3930e516777ed5ac1b8e/gemviz23/demo/resultwindow.py#L58-L61