Skip to content
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

refactor: remove pubsub "fail_XX_YY" messages #1013

Merged
merged 4 commits into from
Feb 26, 2022
Merged

Conversation

weibullguy
Copy link
Collaborator

@weibullguy weibullguy commented Feb 26, 2022

Does this PR introduce a breaking change?

  • Yes
  • No

Describe the purpose of this pull request.

To deal with the "fail_XX_YY" messages being sent. The original issue wanted to clean up the naming of the payload, but investigation found these messages were redundant and should just be removed.

Describe how this was implemented.

Removed all the "fail_XX_YY" messages. Where XX was insert, delete, select, etc. Replaced with "do_log_debug" messages.

Messages such as "fail_calculate_YY" remain and need to be handled by a message dialog for the user. The message dialog should also handle the "do_log_debug" messages since the user should be notified when one of these events occurs, but it doesn't necessarily need to be logged.

Describe any particular area(s) reviewers should focus on.

None

Provide any other pertinent information.

Closes #333

Pull Request Checklist

  • Code Style

    • Code is following code style guidelines.
  • Static Checks

    • Failing static checks are only applicable to code outside the scope of
      this PR.
  • Tests

    • At least one test for all newly created functions/methods?
  • Chores

    • Issue(s) have been raised for problem areas outside the scope of
      this PR. These problem areas have been decorated with an ISSUE: # comment.

@github-actions github-actions bot added bump: minor Issue or PR documents a new feature requiring a minor version bump. type: feature Issue or PR adds or requests new functionality. labels Feb 26, 2022
@weibullguy weibullguy self-assigned this Feb 26, 2022
@weibullguy weibullguy removed the bump: minor Issue or PR documents a new feature requiring a minor version bump. label Feb 26, 2022
@github-actions github-actions bot added bump: minor Issue or PR documents a new feature requiring a minor version bump. status: inprogress Issue or PR is open, milestoned, and assigned. labels Feb 26, 2022
@weibullguy weibullguy added priority: normal Issue or PR is normal priority. type: refactor Issue or PR dealing with refactoring of RAMSTK code. and removed bump: minor Issue or PR documents a new feature requiring a minor version bump. type: feature Issue or PR adds or requests new functionality. labels Feb 26, 2022
@codecov
Copy link

codecov bot commented Feb 26, 2022

Codecov Report

Merging #1013 (0a6ddcf) into master (86845ad) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1013      +/-   ##
==========================================
- Coverage   94.94%   94.91%   -0.03%     
==========================================
  Files         185      185              
  Lines        5339     5272      -67     
  Branches      509      508       -1     
==========================================
- Hits         5069     5004      -65     
+ Misses        235      233       -2     
  Partials       35       35              
Flag Coverage Δ
3.6 94.91% <100.00%> (-0.03%) ⬇️
3.7 94.91% <100.00%> (-0.03%) ⬇️
3.8 94.91% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../ramstk/models/programdb/design_electric/record.py 100.00% <ø> (ø)
src/ramstk/logger.py 100.00% <100.00%> (+2.38%) ⬆️
src/ramstk/models/basemodel.py 100.00% <100.00%> (ø)
src/ramstk/models/programdb/similar_item/table.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37bfe40...0a6ddcf. Read the comment docs.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 26, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.42%.

Quality metrics Before After Change
Complexity 1.46 ⭐ 1.40 ⭐ -0.06 👍
Method Length 78.46 🙂 73.07 🙂 -5.39 👍
Working memory 5.17 ⭐ 5.63 ⭐ 0.46 👎
Quality 78.72% 79.14% 0.42% 👍
Other metrics Before After Change
Lines 5450 5234 -216
Changed files Quality Before Quality After Quality Change
src/ramstk/logger.py 79.68% ⭐ 91.59% ⭐ 11.91% 👍
src/ramstk/models/basemodel.py 75.20% ⭐ 74.75% 🙂 -0.45% 👎
src/ramstk/models/programdb/design_electric/record.py 75.96% ⭐ 74.64% 🙂 -1.32% 👎
src/ramstk/models/programdb/similar_item/table.py 75.29% ⭐ 74.70% 🙂 -0.59% 👎
src/ramstk/views/gtk3/fmea/panel.py 78.44% ⭐ 78.44% ⭐ 0.00%
src/ramstk/views/gtk3/widgets/panel.py 80.25% ⭐ 79.80% ⭐ -0.45% 👎
tests/conftest.py 79.89% ⭐ 80.24% ⭐ 0.35% 👍
tests/test_logger.py 80.25% ⭐ 83.61% ⭐ 3.36% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
src/ramstk/models/basemodel.py RAMSTKBaseTable.do_set_attributes.do_set_attributes_all.do_update 6 ⭐ 139 😞 10 😞 58.19% 🙂 Try splitting into smaller methods. Extract out complex expressions
src/ramstk/models/basemodel.py RAMSTKBaseTable.do_select_all 10 🙂 163 😞 7 🙂 58.51% 🙂 Try splitting into smaller methods
src/ramstk/views/gtk3/fmea/panel.py FMEATreePanel.__init__ 0 ⭐ 1339 ⛔ 6 ⭐ 58.82% 🙂 Try splitting into smaller methods
src/ramstk/models/programdb/similar_item/table.py RAMSTKSimilarItemTable.do_roll_up_change_descriptions._do_calculate_user_defined 0 ⭐ 239 ⛔ 6 ⭐ 64.95% 🙂 Try splitting into smaller methods
src/ramstk/views/gtk3/widgets/panel.py RAMSTKFixedPanel.on_changed_combo 2 ⭐ 85 🙂 12 😞 65.49% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@sonarcloud
Copy link

sonarcloud bot commented Feb 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@weibullguy weibullguy merged commit 549bcd1 into master Feb 26, 2022
@trafico-bot trafico-bot bot added the endgame: merged Pull Request has been merged successfully label Feb 26, 2022
@weibullguy weibullguy deleted the feature/issue-333 branch February 26, 2022 19:21
@weibullguy weibullguy added status: closed Pull Request is complete and integrated or closed for anther reason. and removed status: inprogress Issue or PR is open, milestoned, and assigned. labels Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
endgame: merged Pull Request has been merged successfully priority: normal Issue or PR is normal priority. status: closed Pull Request is complete and integrated or closed for anther reason. type: refactor Issue or PR dealing with refactoring of RAMSTK code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update fail messages to pass error_message
1 participant