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 #348

Closed jschalk closed 1 month ago

jschalk commented 1 month ago

Summary by Sourcery

Enable the documentation process by introducing new features such as the DoarUnit class and purview_timestamp attribute, enhancing existing classes and methods for clarity, and adding comprehensive tests for new and existing functionalities.

New Features:

Enhancements:

Tests:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request implements several changes across multiple files, primarily focusing on enhancing the functionality of the project's data structures, improving test coverage, and introducing new features. The changes include modifications to existing classes, addition of new classes and functions, and updates to test cases.

Class diagram for new and modified classes

classDiagram
    class DoarUnit {
        +String __str__
        +get_road_from_doar(x_doarunit: DoarUnit, delimiter: str): RoadUnit
        +get_doar_from_road(x_roadunit: RoadUnit, delimiter: str): DoarUnit
    }
    class TempTestingObj {
        +RoadUnit x_road
        +find_replace_road(old_road, new_road)
    }
    class BudUnit {
        +BitNum respect_bit
        +RespectNum credor_respect
        +RespectNum debtor_respect
        +TimeLinePoint purview_timestamp
        +OriginUnit _originunit
        +dict[RoadUnit, ItemUnit] _item_dict
        +set_purview_timestamp(x_purview_timestamp: TimeLinePoint)
    }
    class ItemAttrHolder {
        +int mass
        +int uid
        +ReasonUnit reason
        +set_premise_range_attributes_influenced_by_premise_item(premise_open, premise_nigh, premise_denom)
    }
    class BridgeUnit {
        +String atom_arg
        +dict src_to_dst
        +String unknown_word
        +String src_road_delimiter
        +String dst_road_delimiter
        +String _calc_atom_python_type
        +set_atom_arg(x_atom_arg: String)
        +set_all_src_to_dst(x_src_to_dst: dict, raise_exception_if_invalid: bool)
        +set_src_to_dst(src_word: String, dst_word: String)
        +get_src_to_dst(src_word: String): String
        +src_to_dst_exists(src_word: String, dst_word: String): bool
        +del_src_to_dst(src_word: String)
        +is_valid(): bool
    }

File-Level Changes

Change Details Files
Introduction of a new BridgeUnit class for data mapping and validation
  • Added BridgeUnit class with methods for managing source-to-destination mappings
  • Implemented validation rules for different data types
  • Created bridgeunit_shop function for easy instantiation of BridgeUnit objects
  • Added comprehensive test cases for BridgeUnit functionality
src/f09_filter/filter.py
src/f09_filter/test/test_filter_core.py
Addition of purview_timestamp attribute to BudUnit
  • Added purview_timestamp attribute to BudUnit class
  • Updated related functions and methods to handle the new attribute
  • Modified test cases to include purview_timestamp checks
src/f02_bud/bud.py
src/f02_bud/test_bud/test_bud_.py
src/f04_gift/atom.py
src/f04_gift/atom_config.json
src/f04_gift/normal_models.py
Introduction of DoarUnit class and related functions
  • Added DoarUnit class as a reverse direction RoadUnit
  • Implemented get_road_from_doar and get_doar_from_road functions
  • Created test cases for the new DoarUnit functionality
src/f01_road/road.py
src/f01_road/test/test_road_doar.py
Refactoring and renaming of various functions and variables
  • Renamed ItemAttrFilter to ItemAttrHolder
  • Changed 'filter' related function names to 'clean' or 'get_rid_of'
  • Updated test case names to reflect the changes
src/f02_bud/item.py
src/f02_bud/test__item/test_item_attr_holder.py
src/f02_bud/test_bud/test_bud_item_crud.py
src/f02_bud/test_bud_settle/test_tree_traverse_reason_team.py
Addition of new world and filter modules
  • Created initial structure for world module
  • Added filter module with basic functionality
  • Implemented test cases for new modules
src/f10_world/world.py
src/f10_world/test/test_world_create.py
src/f10_world/examples/world_env.py
src/f09_filter/examples/filter_env.py

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).