-
Notifications
You must be signed in to change notification settings - Fork 66
fix: rf license warnings and docs (FXC-4427) #3062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b6a0d3a to
49b316f
Compare
49b316f to
f1b6312
Compare
|
So once the docs PR is merged from the merge queue will rebase this and maybe @dmarek-flex you can help review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
16 files reviewed, 1 comment
8c1d59f to
8e6f3bb
Compare
|
@greptile review again |
8e6f3bb to
a31e79f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9 files reviewed, 2 comments
dmarek-flex
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
a31e79f to
db19209
Compare
db19209 to
087a7e3
Compare
Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changes
Summary
|
Greptile Overview
Greptile Summary
This PR consolidates and improves RF license warnings across the codebase. The changes remove redundant per-class warning validators in favor of centralized warnings in
Simulation._validate_rf_component_warnings(), update warning messages to be clearer and remove emojis (following style guidelines), and optimize thelog_oncemechanism to check for duplicates before message composition.Key changes:
_warn_rf_licenseroot validator fromMicrowaveBaseModel,TerminalComponentModeler, andTerminalComponentModelerDataTerminalComponentModelerto base classAbstractComponentModelerto reduce duplicationLogger._log()to checklog_oncecache before composing messagesPotential issues:
test_RF_license_suppression()may fail since it expects warnings when instantiatingMicrowaveModeSpec()directly, but the validator that emitted these warnings was removedlog_onceoptimization changes behavior: duplicate messages are no longer captured in the message stack, which could affect tests that check captured warningsConfidence Score: 3/5
_warn_rf_licensevalidator fromMicrowaveBaseModelwill likely breaktest_RF_license_suppression()which expects warnings when instantiating RF classes directly. Thelog_onceoptimization also changes message capture behavior. These issues need verification before merge.Important Files Changed
File Analysis
_warn_rf_licenseroot validator entirely;_default_without_license_warningmethod remains but warning mechanism removed from base classlog_oncecheck before message composition to prevent duplicate message processing - good optimizationSequence Diagram
sequenceDiagram participant User participant MicrowaveClass participant MicrowaveBaseModel participant Logger participant Simulation Note over User,Simulation: Before PR (removed validators) User->>MicrowaveClass: Instantiate (e.g., MicrowaveModeSpec()) MicrowaveClass->>MicrowaveBaseModel: __init__() MicrowaveBaseModel->>MicrowaveBaseModel: _warn_rf_license() [REMOVED] MicrowaveBaseModel-->>Logger: log.warning() [NO LONGER CALLED] Note over User,Simulation: After PR (centralized warnings) User->>Simulation: Create Simulation with RF components Simulation->>Simulation: _validate_rf_component_warnings() Simulation->>Logger: log.warning() with new message Note over User,Simulation: Factory method (unchanged) User->>MicrowaveClass: _default_without_license_warning() MicrowaveClass->>MicrowaveBaseModel: Temporarily set suppress flag MicrowaveBaseModel->>MicrowaveClass: __init__() (no warning) MicrowaveBaseModel->>MicrowaveBaseModel: Restore suppress flagContext used (3)
dashboard- Do not use markdown formatting in exception or warning messages; use single quotes to highlight vari... (source)dashboard- Make log messages and warnings informative by including relevant context and enclosing variable name... (source)dashboard- Keep docstrings and comments synchronized with code changes to ensure they are always accurate and n... (source)