jschalk / jaar

Cross-cultural communication engine built on customizable economic systems. Produces personalized agendas, calendars, finance reports for users.
0 stars 1 forks source link

175 enable documentation process #352

Closed jschalk closed 1 month ago

jschalk commented 1 month ago

Summary by Sourcery

Refactor code to improve consistency and error handling in the BridgeKind class, particularly around road delimiters and explicit label mapping. Enhance file handling with a new directory creation function and update test cases to cover these changes.

Enhancements:

Tests:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request implements changes to enable documentation processes, including modifications to various data structures, functions, and file operations across multiple modules. The changes primarily focus on refactoring code to improve consistency, adding new functionality, and updating tests to reflect these changes.

Class diagram for BridgeKind and BridgeUnit modifications

classDiagram
    class BridgeKind {
        +set_explicit_label_map(src_label: RoadNode, dst_label: RoadNode)
        +_get_explicit_dst_label(src_label: RoadNode) : RoadNode
        +explicit_label_map_exists(src_label: RoadNode, dst_label: RoadNode) : bool
        +del_explicit_label_map(src_label: RoadNode)
    }
    class BridgeUnit {
        +set_explicit_label_map(x_python_type: str, x_src: str, x_dst: str)
        +_get_explicit_dst_label(x_python_type: str, x_src: str) : str
        +explicit_label_map_exists(x_python_type: str, x_src: str, x_dst: str) : bool
        +del_explicit_label_map(x_python_type: str, x_src: str)
    }

Class diagram for AwardLink and TeamUnit modifications

classDiagram
    class AwardLink {
        +awardee_id: GroupID
        +give_force: float
        +take_force: float
    }
    class TeamUnit {
        +set_teamlink(team_id: GroupID)
        +teamlink_exists(team_id: GroupID) : bool
        +del_teamlink(team_id: GroupID)
        +get_teamlink(team_id: GroupID) : GroupID
    }

File-Level Changes

Change Details Files
Refactor group and team-related data structures
  • Rename 'group_id' to 'awardee_id' in AwardLink and related classes
  • Rename 'group_id' to 'team_id' in TeamLink and related classes
  • Update function signatures and method calls to reflect these changes
src/f02_bud/group.py
src/f02_bud/reason_team.py
src/f04_gift/atom_config.py
src/f04_gift/normal_models.py
Enhance filtering functionality
  • Implement filter_face_dir_files function to process multiple files
  • Add new test cases for filtering functionality
  • Update BridgeKind and BridgeUnit classes to support new filtering features
src/f09_filter/filter.py
src/f09_filter/test/test_filter_file.py
src/f09_filter/bridge.py
Improve file handling and DataFrame operations
  • Add create_dir function to ensure directory exists before saving files
  • Implement save_dataframe_to_csv function with column ordering
  • Add tests for new pandas-related functions
src/f00_instrument/file.py
src/f00_instrument/pandas_tool.py
src/f00_instrument/test/test_pandas_tool.py
Update and add tests across multiple modules
  • Modify existing tests to accommodate refactored data structures
  • Add new tests for filtering, file operations, and DataFrame handling
  • Update test data and expected results
src/f02_bud/test_bud/test_bud_json.py
src/f02_bud/test_bud_settle/test_tree_traverse_reason_team.py
src/f04_gift/test_delta/test_delta_legible_item_teamlink.py
src/f09_filter/test/test_bridgekind_dict.py
Refactor and update configuration files
  • Update atom_config.json with new field names
  • Modify brick format files to reflect changes in data structures
  • Update brick_config.py with new column names
src/f04_gift/atom_config.json
src/f08_brick/brick_formats/brick_format_00022_bud_item_awardlink_v0_0_0.json
src/f08_brick/brick_formats/brick_format_00024_bud_item_teamlink_v0_0_0.json
src/f08_brick/brick_config.py

Possibly linked issues


Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).