Closed weibullguy closed 2 months ago
This pull request refactors the component type GTK3 panels for improved readability. The main changes involve moving global variables outside the class definitions and assigning them to class variables on initialization. This refactoring affects multiple files related to different component types such as semiconductors, connections, relays, resistors, integrated circuits, switches, inductors, and meters.
Change | Details | Files |
---|---|---|
Moved global variables outside class definitions |
|
src/ramstk/views/gtk3/design_electric/components/semiconductor.py src/ramstk/views/gtk3/design_electric/components/connection.py src/ramstk/views/gtk3/design_electric/components/relay.py src/ramstk/views/gtk3/design_electric/components/resistor.py src/ramstk/views/gtk3/design_electric/components/integrated_circuit.py src/ramstk/views/gtk3/design_electric/components/switch.py src/ramstk/views/gtk3/design_electric/components/inductor.py src/ramstk/views/gtk3/design_electric/components/meter.py |
Refactored initialization of attribute widget maps |
|
src/ramstk/views/gtk3/design_electric/components/semiconductor.py src/ramstk/views/gtk3/design_electric/components/connection.py src/ramstk/views/gtk3/design_electric/components/relay.py src/ramstk/views/gtk3/design_electric/components/resistor.py src/ramstk/views/gtk3/design_electric/components/integrated_circuit.py src/ramstk/views/gtk3/design_electric/components/switch.py src/ramstk/views/gtk3/design_electric/components/inductor.py src/ramstk/views/gtk3/design_electric/components/meter.py src/ramstk/views/gtk3/design_electric/components/miscellaneous.py |
Refactored dormancy calculations |
|
src/ramstk/analyses/dormancy.py tests/analyses/test_dormancy.py |
Updated pre-commit configuration |
|
.pre-commit-config.yaml |
Does this PR introduce a breaking change?
Describe the purpose of this pull request.
To refactor the component type GTK3 panels for readability.
Describe how this was implemented.
Added global variables outside the class with dict and list values that are assigned to class variables on initiation.
Describe any particular area(s) reviewers should focus on.
None
Pull Request Checklist
Code Style
Static Checks
Tests
Chores
Summary by Sourcery
Refactor GTK3 panel components by externalizing dictionaries and lists for component attributes, enhancing code readability and maintainability. Simplify attribute widget map initialization in components. Improve dormancy analysis by using dictionaries for hazard rate multipliers and add corresponding unit tests. Update pre-commit configuration for Ruff linter.
Enhancements:
Tests:
Chores: