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

Closed jschalk closed 2 weeks ago

jschalk commented 2 weeks ago

Summary by Sourcery

Add functionality to build fiscal units from dataframes and provide examples and tests to validate the process.

New Features:

Enhancements:

Tests:

sourcery-ai[bot] commented 2 weeks ago

Reviewer's Guide by Sourcery

This PR implements functionality to build fiscal units from DataFrames and adds example data for testing. The implementation includes a new function to create fiscal units from various DataFrame inputs and comprehensive test cases to verify the functionality.

Class diagram for fiscal_build_from_df function

classDiagram
    class FiscalUnit {
        +String fiscal_id
        +String fiscals_dir
        +Timeline timeline
        +int current_time
        +int fund_coin
        +int respect_bit
        +int penny
        +String road_delimiter
    }
    class Timeline {
        +List hours_config
        +List months_config
        +List weekdays_config
        +String timeline_label
        +int c400_number
        +int monthday_distortion
        +int yr1_jan1_offset
    }
    class DataFrame {
        +List fiscal_id
        +List hour_label
        +List cumlative_minute
        +List month_label
        +List cumlative_day
        +List weekday_label
    }
    FiscalUnit --> Timeline
    fiscal_build_from_df --> DataFrame
    fiscal_build_from_df --> FiscalUnit
    fiscal_build_from_df : +fiscal_build_from_df(DataFrame br00000_df, DataFrame br00001_df, DataFrame br00002_df, DataFrame br00003_df, DataFrame br00004_df, DataFrame br00005_df, int x_fund_coin, int x_respect_bit, int x_penny, String x_fiscals_dir, String slash_text)

File-Level Changes

Change Details Files
Added new function to build fiscal units from DataFrames
  • Implemented fiscal_build_from_df function that takes multiple DataFrames as input
  • Created dictionaries to store hour, month, and weekday configurations
  • Added logic to build timeline configurations from DataFrame data
  • Implemented fiscal unit creation with configured parameters
src/f09_brick/brick.py
Added example data module for testing
  • Created constants for test fiscal IDs
  • Added example DataFrame generator functions for different brick formats
  • Implemented multiple test scenarios with different configurations
src/f09_brick/examples/brick_df_examples.py
Added test cases for fiscal unit building functionality
  • Created test for single fiscal ID scenario
  • Added test for multiple fiscal IDs scenario
  • Implemented detailed assertions to verify fiscal unit properties
src/f09_brick/test_fiscal_build/test_brick_fiscal_build.py
Added commented example code for database operations
  • Added example SQLAlchemy setup and configuration
  • Included sample code for DataFrame to database conversion
src/f10_world/world_tool.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).