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

Closed jschalk closed 1 month ago

jschalk commented 1 month ago

Summary by Sourcery

Refactor codebase to replace 'src' and 'dst' terminology with 'otx' and 'inx' for improved clarity and consistency. Update all related test cases to align with the new naming conventions.

Enhancements:

Tests:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request implements a significant refactoring of the codebase, primarily focusing on renaming variables and functions to improve clarity and consistency. The main changes involve replacing 'src' and 'dst' with 'otx' and 'inx' respectively, throughout the codebase. This change affects multiple files and functions, including data structures, file operations, and filtering logic.

Updated class diagram for BridgeKind class

classDiagram
    class BridgeKind {
        +dict otx_to_inx
        +str unknown_word
        +str otx_road_delimiter
        +str inx_road_delimiter
        +dict explicit_label
        +str python_type
        +str face_id
        +set_all_otx_to_inx(dict x_otx_to_inx, bool raise_exception_if_invalid)
        +set_otx_to_inx(str otx_word, str inx_word)
        +_get_inx_value(str otx_word) str
        +get_create_inx(str otx_word, bool missing_add) str
        +_get_create_roadunit_inx(str otx_road) RoadUnit
        +_get_explicit_roadnode(RoadNode x_roadNode) RoadNode
        +otx_to_inx_exists(str otx_word, str inx_word) bool
        +otx_exists(str otx_word) bool
        +del_otx_to_inx(str otx_word)
        +set_explicit_label(RoadNode otx_label, RoadNode inx_label)
        +_set_new_explicit_label_to_otx_inx(RoadNode otx_label, RoadNode inx_label)
        +_get_explicit_inx_label(RoadNode otx_label) RoadNode
        +explicit_label_exists(RoadNode otx_label, RoadNode inx_label) bool
        +explicit_otx_label_exists(RoadNode otx_label) bool
        +del_explicit_label(RoadNode otx_label)
        +_unknown_word_in_otx_to_inx() bool
        +_otx_road_delimiter_in_otx_words() bool
        +_inx_road_delimiter_in_otx_words() bool
        +_otx_road_delimiter_in_inx_words() bool
        +_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
    }

Updated class diagram for BridgeUnit class

classDiagram
    class BridgeUnit {
        +str face_id
        +dict bridgekinds
        +str unknown_word
        +str otx_road_delimiter
        +str inx_road_delimiter
        +set_bridgekind(BridgeKind x_bridgekind)
        +is_valid() bool
        +set_otx_to_inx(str x_python_type, str x_otx, str x_inx)
        +_get_inx_value(str x_python_type, str x_otx) str
        +otx_to_inx_exists(str x_python_type, str x_otx, str x_inx) bool
        +del_otx_to_inx(str x_python_type, str x_otx)
        +set_explicit_label(str x_python_type, str x_otx, str x_inx)
        +_get_explicit_inx_label(str x_python_type, str x_otx) str
        +explicit_label_exists(str x_python_type, str x_otx, str x_inx) bool
        +del_explicit_label(str x_python_type, str x_otx)
        +get_dict() dict
        +get_json() str
    }

File-Level Changes

Change Details Files
Renamed 'src' to 'otx' and 'dst' to 'inx' throughout the codebase
  • Updated variable names in BridgeKind and BridgeUnit classes
  • Modified function names to reflect the new terminology
  • Updated file and directory names in file operations
  • Adjusted DataFrame column names and related operations
src/f09_filter/bridge.py
src/f09_filter/examples/example_bridges.py
src/f09_filter/test/test_bridgekind_delimiter.py
src/f09_filter/test/test_bridgekind_get_create_dst.py
src/f09_filter/test/test_filter_file.py
src/f09_filter/test/test_filter_.py
src/f09_filter/test/test_bridgekind_.py
src/f09_filter/test/test_bridgeunit_.py
src/f09_filter/test/test_bridgekind_dict.py
src/f00_instrument/pandas_tool.py
src/f09_filter/filter.py
src/f00_instrument/file.py
src/f08_brick/brick.py
Refactored data structures and functions to support the new terminology
  • Updated BridgeKind class methods to use 'otx' and 'inx'
  • Modified BridgeUnit class to reflect the changes in BridgeKind
  • Adjusted filtering functions to work with the new naming convention
  • Updated test cases to use the new terminology
src/f09_filter/bridge.py
src/f09_filter/test/test_bridgekind_.py
src/f09_filter/test/test_bridgeunit_.py
src/f09_filter/filter.py
Updated file operations to use the new terminology
  • Changed directory names from 'src' and 'dst' to 'otx' and 'inx'
  • Updated file reading and writing functions to use the new names
  • Modified CSV-related functions to work with the new naming convention
src/f00_instrument/file.py
src/f00_instrument/pandas_tool.py
src/f09_filter/filter.py
src/f08_brick/brick.py
Expanded and updated sorting priority for column headers
  • Added new columns to the sorting priority list
  • Updated tests to reflect the changes in sorting priority
  • Modified functions that use sorting priority to accommodate the changes
src/f00_instrument/pandas_tool.py
src/f04_gift/test_atom/test_atom_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).