Closed jschalk closed 2 weeks ago
This PR implements changes to support OTX (One True X) key functionality in the brick reference system. The main changes include modifying the BrickRef class to store attributes with OTX key flags and updating the grouping logic to handle these flags appropriately.
sequenceDiagram
participant Test as Test Suite
participant BrickRef
Test->>BrickRef: set_attribute(x_attribute, True)
BrickRef->>BrickRef: _attributes[x_attribute] = {"otx_key": True}
Test->>BrickRef: set_attribute(x_attribute, False)
BrickRef->>BrickRef: _attributes[x_attribute] = {"otx_key": False}
classDiagram
class BrickRef {
- str brick_name
- str categorys
- dict<str, dict<str, bool>> _attributes
+ set_attribute(x_attribute: str, otx_key: bool)
+ list<str> get_headers_list()
+ list<str> get_otx_keys_list()
+ list<str> get_otx_values_list()
}
note for BrickRef "Attributes now store OTX key flags"
Change | Details | Files |
---|---|---|
Modified BrickRef class to support OTX key functionality |
|
src/f09_brick/brick.py src/f09_brick/test_brick_format/test_brick_column.py |
Refactored grouping functionality to use SQL for consistent value filtering |
|
src/f09_brick/pandas_tool.py src/f00_instrument/db_toolbox.py src/f09_brick/test_brick_config/test_pandas_tool.py |
Updated brick reference handling and file operations |
|
src/f09_brick/brick_config.py src/f09_brick/test_brick_config/test_brick_config_.py |
Modified zoo_to_otx transformation logic |
|
src/f10_world/world.py src/f10_world/test/test_world_jungle.py |
Summary by Sourcery
Refactor the BrickRef class to use a dictionary for attributes, allowing for more complex metadata handling. Update related functions and tests to support this change, including renaming functions for clarity and adding new test cases to verify the updated logic.
Enhancements:
Tests: