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

Closed jschalk closed 1 week ago

jschalk commented 1 week ago

Summary by Sourcery

Refactor the codebase to replace 'obj_class' with 'jaar_type' and 'filterunit' with 'pidginunit' across various modules and test cases, enhancing consistency and clarity in the code.

Enhancements:

Tests:

sourcery-ai[bot] commented 1 week ago

Reviewer's Guide by Sourcery

This pull request implements a major refactoring to rename the "filter" concept to "pidgin" throughout the codebase. The change includes renaming files, classes, functions, and variables while preserving the core functionality. The refactoring also includes some improvements to the data model by renaming "obj_class" to "jaar_type" for better clarity.

Class diagram for renamed classes and methods

classDiagram
    class PidginUnit {
        +TimeLinePoint eon_id
        +OwnerID face_id
        +dict[str, BridgeUnit] bridgeunits
        +set_bridgeunit(BridgeUnit x_bridgeunit)
        +get_bridgeunit(str x_jaar_type) BridgeUnit
        +is_valid() bool
        +set_otx_to_inx(str x_jaar_type, str x_otx, str x_inx)
        +_get_inx_value(str x_jaar_type, str x_otx) str
        +otx_to_inx_exists(str x_jaar_type, str x_otx, str x_inx) bool
        +del_otx_to_inx(str x_jaar_type, str x_otx)
        +set_explicit_label(str x_jaar_type, str x_otx, str x_inx)
        +_get_explicit_inx_label(str x_jaar_type, str x_otx) str
        +explicit_label_exists(str x_jaar_type, str x_otx, str x_inx) bool
        +del_explicit_label(str x_jaar_type, str x_otx)
        +get_dict() dict
        +get_json() str
    }

    class BridgeUnit {
        +str otx_road_delimiter
        +str inx_road_delimiter
        +dict explicit_label
        +str jaar_type
        +OwnerID face_id
        +set_all_otx_to_inx()
        +get_create_inx(str otx_word, bool missing_add) str
        +_get_inx_value(str otx_word) str
        +set_explicit_label(RoadNode otx_label, RoadNode inx_label)
        +_set_new_explicit_label_to_otx_inx(otx_label, inx_label)
        +_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
    }

    PidginUnit --> BridgeUnit
    note for PidginUnit "Renamed from FilterUnit"
    note for BridgeUnit "Renamed attribute obj_class to jaar_type"

File-Level Changes

Change Details Files
Rename 'filter' concept to 'pidgin' throughout the codebase
  • Rename FilterUnit class to PidginUnit
  • Rename filter_config.json to pidgin_config.json
  • Rename filter-related functions and variables to use 'pidgin' terminology
  • Update test files to use new 'pidgin' naming
  • Move files from f08_filter directory to f08_pidgin
src/f08_filter/*
src/f08_pidgin/*
src/f09_brick/brick_config.json
src/f10_world/world.py
Rename 'obj_class' to 'jaar_type' for improved clarity
  • Update all references from obj_class to jaar_type in configuration files
  • Rename functions and variables using obj_class to use jaar_type
  • Update test assertions to use new jaar_type terminology
src/f04_gift/atom_config.json
src/f07_fiscal/fiscal_config.json
src/f09_brick/brick_models.py
Refactor file handling functions for better naming consistency
  • Rename get_all_filenames to get_dir_filenames
  • Add matchs parameter to get_dir_filenames for filtering by filename
  • Update all references to use new function name
src/f00_instrument/file.py
src/f00_instrument/test/test_file.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).