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

Closed jschalk closed 3 weeks ago

jschalk commented 3 weeks ago

Summary by Sourcery

Enhance the brick configuration by adding build order and column order for arguments, improving the organization and processing sequence. Introduce new tests to verify the structure and existence of brick tables and related functions.

Enhancements:

Tests:

sourcery-ai[bot] commented 3 weeks ago

Reviewer's Guide by Sourcery

This pull request implements documentation and build order functionality for brick configuration. The changes include adding column ordering information, build order specifications, and SQLAlchemy model definitions for brick tables.

ER diagram for updated brick configuration

erDiagram
    BRICK_CONFIG {
        string face_id
        int eon_id
        string fiscal_id
        string owner_id
        string acct_id
        string group_id
        string parent_road
        string label
        string road
        string base
        string need
        string pick
        string team_id
        string awardee_id
        string healer_id
        int time_id
        float addin
        float begin
        float close
        float denom
        float gogo_want
        float stop_want
        string base_item_active_requisite
        float credit_belief
        float debtit_belief
        float credit_vote
        float debtit_vote
        float credor_respect
        float debtor_respect
        float fopen
        float fnigh
        float fund_pool
        float give_force
        float mass
        int max_tree_traverse
        float nigh
        float open
        float divisor
        int pledge
        int problem_bool
        int purview_time_id
        float take_force
        float tally
        float fund_coin
        float penny
        float respect_bit
        int current_time
        float amount
        string month_label
        string hour_label
        int cumlative_minute
        int cumlative_day
        string weekday_label
        int weekday_order
        string otx_road_delimiter
        string inx_road_delimiter
        string unknown_word
        string otx_word
        string inx_word
        string otx_label
        string inx_label
        string road_delimiter
        int c400_number
        int yr1_jan1_offset
        float quota
        int monthday_distortion
        string timeline_label
    }
    BRICK_CONFIG ||--o{ BRICK_TABLE : contains
    BRICK_TABLE {
        string face_id
        int eon_id
        string fiscal_id
        string owner_id
        string acct_id
        string group_id
        string parent_road
        string label
        string road
        string base
        string need
        string pick
        string team_id
        string awardee_id
        string healer_id
        int time_id
        float addin
        float begin
        float close
        float denom
        float gogo_want
        float stop_want
        string base_item_active_requisite
        float credit_belief
        float debtit_belief
        float credit_vote
        float debtit_vote
        float credor_respect
        float debtor_respect
        float fopen
        float fnigh
        float fund_pool
        float give_force
        float mass
        int max_tree_traverse
        float nigh
        float open
        float divisor
        int pledge
        int problem_bool
        int purview_time_id
        float take_force
        float tally
        float fund_coin
        float penny
        float respect_bit
        int current_time
        float amount
        string month_label
        string hour_label
        int cumlative_minute
        int cumlative_day
        string weekday_label
        int weekday_order
        string otx_road_delimiter
        string inx_road_delimiter
        string unknown_word
        string otx_word
        string inx_word
        string otx_label
        string inx_label
        string road_delimiter
        int c400_number
        int yr1_jan1_offset
        float quota
        int monthday_distortion
        string timeline_label
    }

Class diagram for SQLAlchemy models

classDiagram
    class Base {
        <<abstract>>
    }
    class br00000Table {
        String face_id
        Integer eon_id
        Integer c400_number
        Integer current_time
        String fiscal_id
        Float fund_coin
        Integer monthday_distortion
        Float penny
        Float respect_bit
        String road_delimiter
        String timeline_label
        Integer yr1_jan1_offset
    }
    class br00001Table {
        String face_id
        Integer eon_id
        String acct_id
        String fiscal_id
        String owner_id
        Float quota
        Integer time_id
    }
    class br00002Table {
        String face_id
        Integer eon_id
        String acct_id
        Float amount
        String fiscal_id
        String owner_id
        Integer time_id
    }
    class br00003Table {
        String face_id
        Integer eon_id
        Integer cumlative_minute
        String fiscal_id
        String hour_label
    }
    class br00004Table {
        String face_id
        Integer eon_id
        Integer cumlative_day
        String fiscal_id
        String month_label
    }
    class br00005Table {
        String face_id
        Integer eon_id
        Integer weekday_order
        String fiscal_id
        String weekday_label
    }
    Base <|-- br00000Table
    Base <|-- br00001Table
    Base <|-- br00002Table
    Base <|-- br00003Table
    Base <|-- br00004Table
    Base <|-- br00005Table
    note for br00000Table "Represents fiscal unit with timeline attributes"
    note for br00001Table "Represents fiscal purview episode"
    note for br00002Table "Represents fiscal cashbook"
    note for br00003Table "Represents fiscal timeline hour"
    note for br00004Table "Represents fiscal timeline month"
    note for br00005Table "Represents fiscal timeline weekday"

File-Level Changes

Change Details Files
Added build order and column ordering to brick configuration
  • Added build_order field to each brick configuration
  • Added column_order field to required and optional arguments
  • Renamed c400_config to c400_number for consistency
src/f09_brick/brick_config.json
Created SQLAlchemy models for brick tables
  • Defined Base class inheriting from DeclarativeBase
  • Created table classes for each brick type (br00000 through br00041)
  • Added column definitions with appropriate SQLAlchemy types
  • Implemented primary key constraints
src/f09_brick/brick_models.py
Refactored brick configuration and testing code
  • Moved brick element sorting and SQLite type functions from pandas_tool to brick_config
  • Updated tests to reflect new configuration structure
  • Added comprehensive tests for brick models
src/f09_brick/test_brick_config/test_brick_config_.py
src/f09_brick/test_brick_config/test_pandas_tool.py
src/f09_brick/test_brick_format/test_brick_models.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).