Closed jschalk closed 1 month ago
This pull request implements significant refactoring and enhancement of the codebase, primarily focusing on renaming and restructuring filter-related functionality, adding new world management features, and improving file handling capabilities.
classDiagram
class FilterUnit {
OwnerID face_id
dict~str, BridgeKind~ bridgekinds
str unknown_word
str otx_road_delimiter
str inx_road_delimiter
+set_bridgekind(BridgeKind x_bridgekind)
+get_bridgekind(str x_python_type) BridgeKind
+is_valid() bool
+set_otx_to_inx(str x_python_type, str x_otx, str x_inx)
+_get_inx_value(str x_python_type, str x_otx) str
+otx_to_inx_exists(str x_python_type, str x_otx, str x_inx) bool
+del_otx_to_inx(str x_python_type, str x_otx)
+set_explicit_label(str x_python_type, str x_otx, str x_inx)
+_get_explicit_inx_label(str x_python_type, str x_otx) str
+explicit_label_exists(str x_python_type, str x_otx, str x_inx) bool
+del_explicit_label(str x_python_type, str x_otx)
+get_dict() dict
+get_json() str
}
class BridgeKind {
dict otx_to_inx
str unknown_word
str otx_road_delimiter
str inx_road_delimiter
dict explicit_label
str python_type
OwnerID face_id
+set_all_otx_to_inx(dict x_otx_to_inx, bool raise_exception_if_invalid)
+set_otx_to_inx(str otx_word, str inx_word)
+_get_inx_value(str otx_word) str
+get_create_inx(str otx_word, bool missing_add) str
+_get_create_roadunit_inx(RoadNode otx_road) RoadUnit
+_get_explicit_roadnode(RoadNode x_roadNode) RoadNode
+otx_to_inx_exists(str otx_word, str inx_word) bool
+otx_exists(str otx_word) bool
+del_otx_to_inx(str otx_word)
+set_explicit_label(RoadNode otx_label, RoadNode inx_label)
+_set_new_explicit_label_to_otx_inx(RoadNode otx_label, RoadNode inx_label)
+_get_explicit_inx_label(RoadNode otx_label) RoadNode
+explicit_label_exists(RoadNode otx_label, RoadNode inx_label) bool
+explicit_otx_label_exists(RoadNode otx_label) bool
+del_explicit_label(RoadNode otx_label)
+_unknown_word_in_otx_to_inx() bool
+_otx_road_delimiter_in_otx_words() bool
+_inx_road_delimiter_in_otx_words() bool
+_otx_road_delimiter_in_inx_words() bool
+_inx_road_delimiter_in_inx_words() bool
+_is_otx_delimiter_inclusion_correct() bool
+_is_inx_delimiter_inclusion_correct() bool
+all_otx_parent_roads_exist() bool
+is_valid() bool
+get_dict() dict
+get_json() str
}
FilterUnit --> BridgeKind
BridgeKind --> OwnerID
BridgeKind --> RoadNode
BridgeKind --> RoadUnit
classDiagram
class WorldUnit {
WorldID world_id
str worlds_dir
TimeLinePoint current_time
dict~FaceID, FilterUnit~ faces
dict~FaceID~ _faces_dir
dict~TimeLineLabel, TimeConversion~ timeconversions
set~FiscalID~ _fiscalunits
+set_face_id(FaceID face_id, FilterUnit x_filterunit)
+face_id_exists(FaceID face_id) bool
+get_filterunit(FaceID face_id) FilterUnit
+del_face_id(FaceID face_id)
+del_all_face_id()
+face_ids_empty() bool
+_face_dir(FaceID face_id) str
+save_filterunit_files(FaceID face_id)
+face_dir_exists(FaceID face_id) bool
+_set_all_face_ids_from_dirs()
+_delete_filterunit_dir(FaceID face_id)
+get_timeconversions_dict() dict~TimeLineLabel, TimeConversion~
+load_filterunit_from_files(FaceID face_id)
+get_dict() dict
}
class TimeConversion {
str fiscal_id
str addin
}
WorldUnit --> FilterUnit
WorldUnit --> TimeConversion
WorldUnit --> FaceID
WorldUnit --> WorldID
WorldUnit --> TimeLinePoint
WorldUnit --> TimeLineLabel
WorldUnit --> FiscalID
Change | Details | Files |
---|---|---|
Renamed BridgeUnit to FilterUnit and refactored related code |
|
src/f09_filter/filter.py src/f09_filter/test/test_filterunit_.py src/f09_filter/test/test_filterunit_dict.py |
Added new WorldUnit functionality for managing world states |
|
src/f10_world/world.py src/f10_world/test/test_world_.py src/f10_world/test/test_world_json.py |
Enhanced file handling and directory management |
|
src/f00_instrument/file.py src/f00_instrument/pandas_tool.py src/f00_instrument/test/test_file.py |
Added configuration management improvements |
|
src/f08_brick/brick_config.json src/f08_brick/test_brick_config/test_brick_config_.py src/f01_road/finance_tran.py |
Summary by Sourcery
Refactor the filtering and world management components by introducing the WorldUnit class and renaming BridgeUnit to FilterUnit. Enhance file handling with new utility functions and update tests to cover new functionalities. Add openpyxl to dependencies for Excel file handling.
New Features:
Enhancements:
Build:
Tests: