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

Closed jschalk closed 3 weeks ago

jschalk commented 3 weeks ago

Summary by Sourcery

Refactor configuration files to replace 'python_type' with 'obj_class' and unify CRUD operation handling with 'allowed_crud'. Add validation functions for configuration integrity and update tests to cover these changes.

Enhancements:

Documentation:

Tests:

sourcery-ai[bot] commented 3 weeks ago

Reviewer's Guide by Sourcery

This PR implements significant changes to the codebase's configuration and filtering system, primarily focusing on renaming and restructuring components while adding new functionality. The changes include renaming "bridgekind" to "bridgeunit", adding fiscal configuration support, and implementing brick format validation.

ER diagram for brick configuration changes

erDiagram
    BUD_ACCT_MEMBERSHIP {
        string allowed_crud
        string brick_type
        AcctID acct_id
        FiscalID fiscal_id
        GroupID group_id
        TimeLinePoint time_id
    }

    BUD_ACCTUNIT {
        string allowed_crud
        string brick_type
        AcctID acct_id
        FiscalID fiscal_id
        TimeLinePoint time_id
    }

    FISCAL_CASHBOOK {
        string allowed_crud
        string brick_type
        AcctID acct_id
        FiscalID fiscal_id
        string owner_id
        TimeLinePoint time_id
        string timestamp
    }

    FISCAL_PURVIEW_EPISODE {
        string allowed_crud
        string brick_type
        AcctID acct_id
        FiscalID fiscal_id
        string owner_id
        TimeLinePoint time_id
        string timestamp
    }

    FISCAL_TIMELINE_HOUR {
        string allowed_crud
        string brick_type
        string cumlative_minute
        FiscalID fiscal_id
        string hour_label
        TimeLinePoint time_id
    }

    FISCAL_TIMELINE_MONTH {
        string allowed_crud
        string brick_type
        string cumlative_day
        FiscalID fiscal_id
        string month_label
        TimeLinePoint time_id
    }

    FISCAL_TIMELINE_WEEKDAY {
        string allowed_crud
        string brick_type
        FiscalID fiscal_id
        TimeLinePoint time_id
        string weekday_label
        string weekday_order
    }

    FISCALUNIT {
        string allowed_crud
        string brick_type
        FiscalID fiscal_id
        TimeLinePoint time_id
    }

    BUD_ACCT_MEMBERSHIP ||--o{ BUD_ACCTUNIT : contains
    FISCAL_CASHBOOK ||--o{ FISCAL_PURVIEW_EPISODE : contains
    FISCAL_TIMELINE_HOUR ||--o{ FISCAL_TIMELINE_MONTH : contains
    FISCAL_TIMELINE_WEEKDAY ||--o{ FISCALUNIT : contains

Updated class diagram for BridgeUnit and FilterUnit

classDiagram
    class BridgeUnit {
        +dict otx_to_inx
        +str unknown_word
        +str otx_road_delimiter
        +str inx_road_delimiter
        +dict explicit_label
        +str obj_class
        +OwnerID face_id
        +set_all_otx_to_inx()
        +get_create_inx()
        +set_explicit_label()
        +is_valid()
        +get_dict()
        +get_json()
    }

    class FilterUnit {
        +TimeLinePoint time_id
        +OwnerID face_id
        +dict bridgeunits
        +str unknown_word
        +str otx_road_delimiter
        +str inx_road_delimiter
        +set_bridgeunit()
        +get_bridgeunit()
        +is_valid()
        +set_otx_to_inx()
        +get_dict()
        +get_json()
    }

    BridgeUnit <|-- FilterUnit
    note for BridgeUnit "Renamed from BridgeKind to BridgeUnit"

File-Level Changes

Change Details Files
Renamed BridgeKind class to BridgeUnit and updated all related references
  • Renamed class BridgeKind to BridgeUnit
  • Updated all method and variable references from bridgekind to bridgeunit
  • Renamed test files and test cases to reflect the new naming
  • Updated function parameters and return types
src/f09_filter/filter.py
src/f09_filter/test/test_bridgeunit_.py
src/f09_filter/test/test_bridgeunit_delimiter.py
src/f09_filter/test/test_bridgeunit_dict.py
Added fiscal configuration system
  • Created new fiscal configuration JSON file
  • Added fiscal configuration tests
  • Implemented fiscal configuration validation
  • Added fiscal-specific string constants and helper functions
src/f07_fiscal/fiscal_config.json
src/f07_fiscal/fiscal_config.py
src/f07_fiscal/test_fiscal_config/test_fiscal_config_.py
Updated brick configuration format and validation
  • Added brick number validation
  • Implemented brick format validation
  • Updated brick format JSON files with new structure
  • Added tests for brick format validation
src/f08_brick/brick_config.json
src/f08_brick/test_brick_config/test_brick_config_.py
src/f08_brick/brick_formats/*.json
Renamed python_type to obj_class throughout the codebase
  • Updated configuration files to use obj_class instead of python_type
  • Renamed related functions and variables
  • Updated tests to reflect the new naming
src/f04_gift/atom_config.py
src/f04_gift/test_atom/test_atom_config.py
src/f09_filter/filter.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).