Skip to content

Conversation

Sallie00
Copy link

Summary

This PR addresses and resolves open issue #245 by unifying the previously separate ColNames class and mapping_dictionary into a single, consistent data structure. A new VariableInfo dataclass has been introduced (with SI/IP unit support), and a Variables class now holds all variable metadata. All references to mapping_dictionary and hard-coded string column names have been replaced with the new Variables/VariableInfo structure for improved readability and maintainability.

Changes

  • Created a new VariableInfo dataclass to store column metadata (col_name, name, unit, range, color, and SI/IP overrides).
  • Added a new Variables class to hold all VariableInfo instances (formerly ColNames).
  • Removed the mapping_dictionary entirely and updated all code that relied on it to use VariableInfo methods instead (e.g. get_name(), get_unit(), get_range()).
  • Replaced hard-coded string column names with Variables.<VAR>.col_name across dropdowns, charts, and data processing.
  • Added the helper VariableInfo.from_col_name(col_name) to retrieve variables by column name.
  • Ensured immutability and clear naming of variables in Variables (uppercase constants).

Copy link

coderabbitai bot commented Sep 29, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sallie00 Sallie00 marked this pull request as ready for review September 29, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant