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

feat: add ability to create cross-reference matrices #1098

Closed
wants to merge 57 commits into from

Conversation

weibullguy
Copy link
Collaborator

@weibullguy weibullguy commented Jun 23, 2022

Does this PR introduce a breaking change?

  • Yes
  • No

Describe the purpose of this pull request.

To allow the creation of cross-references between modules. This will allow visual display of the relationship between two RAMSTK workflow modules.

Describe how this was implemented.

  1. Created ramtk_matrix program database table.
  2. Created matrix db record model.
  3. Created matrix db table model.
  4. Created RAMSTK matrix widget.
  5. Created V&V Task/Requirement panel and added to view.

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

None

Provide any other pertinent information.

Closes #52

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 Jun 23, 2022
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 24, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.61 ⭐ 1.50 ⭐ -0.11 👍
Method Length 106.16 🙂 104.34 🙂 -1.82 👍
Working memory 6.45 🙂 6.39 🙂 -0.06 👍
Quality 73.58% 🙂 74.07% 🙂 0.49% 👍
Other metrics Before After Change
Lines 16127 16263 136
Changed files Quality Before Quality After Quality Change
src/ramstk/models/dbrecords/programdb_revision_record.py 83.57% ⭐ 83.57% ⭐ 0.00%
src/ramstk/models/dbtables/basetable.py 77.88% ⭐ 77.05% ⭐ -0.83% 👎
src/ramstk/models/dbtables/programdb_validation_table.py 76.71% ⭐ 76.32% ⭐ -0.39% 👎
src/ramstk/views/gtk3/allocation/panel.py 73.64% 🙂 73.87% 🙂 0.23% 👍
src/ramstk/views/gtk3/books/modulebook.py 86.28% ⭐ 86.28% ⭐ 0.00%
src/ramstk/views/gtk3/books/workbook.py 84.92% ⭐ 82.92% ⭐ -2.00% 👎
src/ramstk/views/gtk3/design_electric/panel.py 63.21% 🙂 63.21% 🙂 0.00%
src/ramstk/views/gtk3/design_electric/components/capacitor.py 72.00% 🙂 72.53% 🙂 0.53% 👍
src/ramstk/views/gtk3/design_electric/components/connection.py 73.78% 🙂 74.00% 🙂 0.22% 👍
src/ramstk/views/gtk3/design_electric/components/inductor.py 74.50% 🙂 74.98% 🙂 0.48% 👍
src/ramstk/views/gtk3/design_electric/components/integrated_circuit.py 70.06% 🙂 70.42% 🙂 0.36% 👍
src/ramstk/views/gtk3/design_electric/components/meter.py 75.01% ⭐ 75.50% ⭐ 0.49% 👍
src/ramstk/views/gtk3/design_electric/components/miscellaneous.py 76.65% ⭐ 76.77% ⭐ 0.12% 👍
src/ramstk/views/gtk3/design_electric/components/relay.py 74.82% 🙂 75.14% ⭐ 0.32% 👍
src/ramstk/views/gtk3/design_electric/components/resistor.py 79.84% ⭐ 80.10% ⭐ 0.26% 👍
src/ramstk/views/gtk3/design_electric/components/semiconductor.py 76.71% ⭐ 76.87% ⭐ 0.16% 👍
src/ramstk/views/gtk3/design_electric/components/switch.py 72.32% 🙂 72.75% 🙂 0.43% 👍
src/ramstk/views/gtk3/hardware/panel.py 67.05% 🙂 67.14% 🙂 0.09% 👍
src/ramstk/views/gtk3/milhdbk217f/panel.py 85.65% ⭐ 85.95% ⭐ 0.30% 👍
src/ramstk/views/gtk3/milhdbk217f/components/capacitor.py 67.87% 🙂 68.48% 🙂 0.61% 👍
src/ramstk/views/gtk3/milhdbk217f/components/connection.py 67.87% 🙂 68.48% 🙂 0.61% 👍
src/ramstk/views/gtk3/milhdbk217f/components/inductor.py 76.86% ⭐ 77.09% ⭐ 0.23% 👍
src/ramstk/views/gtk3/preferences/panel.py 71.32% 🙂 71.46% 🙂 0.14% 👍
src/ramstk/views/gtk3/reliability/panel.py 64.49% 🙂 64.76% 🙂 0.27% 👍
src/ramstk/views/gtk3/requirement/panel.py 61.80% 🙂 61.82% 🙂 0.02% 👍
src/ramstk/views/gtk3/similar_item/panel.py 79.90% ⭐ 79.92% ⭐ 0.02% 👍
src/ramstk/views/gtk3/validation/__init__.py % % %
src/ramstk/views/gtk3/validation/panel.py 69.86% 🙂 70.95% 🙂 1.09% 👍
src/ramstk/views/gtk3/validation/view.py 84.64% ⭐ 85.44% ⭐ 0.80% 👍
src/ramstk/views/gtk3/widgets/button.py 82.74% ⭐ 82.74% ⭐ 0.00%
src/ramstk/views/gtk3/widgets/combo.py 80.62% ⭐ 80.62% ⭐ 0.00%
src/ramstk/views/gtk3/widgets/entry.py 88.72% ⭐ 88.92% ⭐ 0.20% 👍
src/ramstk/views/gtk3/widgets/label.py 81.72% ⭐ 79.94% ⭐ -1.78% 👎
src/ramstk/views/gtk3/widgets/treeview.py 72.85% 🙂 75.41% ⭐ 2.56% 👍
src/ramstk/views/gtk3/widgets/widget.py 85.93% ⭐ 85.93% ⭐ 0.00%
tests/views/gtk3/widgets/test_combo.py 88.20% ⭐ 88.20% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
src/ramstk/views/gtk3/design_electric/components/integrated_circuit.py ICDesignElectricInputPanel.__init__ 0 ⭐ 649 ⛔ 22 ⛔ 36.49% 😞 Try splitting into smaller methods. Extract out complex expressions
src/ramstk/views/gtk3/reliability/panel.py ReliabilityResultsPanel.__init__ 0 ⭐ 506 ⛔ 21 ⛔ 37.34% 😞 Try splitting into smaller methods. Extract out complex expressions
src/ramstk/views/gtk3/hardware/panel.py HardwareGeneralDataPanel.__init__ 0 ⭐ 514 ⛔ 18 ⛔ 39.31% 😞 Try splitting into smaller methods. Extract out complex expressions
src/ramstk/views/gtk3/reliability/panel.py ReliabilityInputPanel.__init__ 0 ⭐ 457 ⛔ 17 ⛔ 40.50% 😞 Try splitting into smaller methods. Extract out complex expressions
src/ramstk/views/gtk3/preferences/panel.py GeneralPreferencesPanel.__init__ 0 ⭐ 450 ⛔ 17 ⛔ 40.56% 😞 Try splitting into smaller methods. 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!

@codecov
Copy link

codecov bot commented Jun 24, 2022

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03 🎉

Comparison is base (8156bb1) 96.11% compared to head (18e4688) 96.15%.

❗ Current head 18e4688 differs from pull request most recent head 071c01b. Consider uploading reports for the commit 071c01b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1098      +/-   ##
==========================================
+ Coverage   96.11%   96.15%   +0.03%     
==========================================
  Files         157      157              
  Lines        5644     5645       +1     
  Branches      513      626     +113     
==========================================
+ Hits         5425     5428       +3     
+ Misses        197      195       -2     
  Partials       22       22              
Flag Coverage Δ
3.10 96.15% <100.00%> (+0.03%) ⬆️
3.8 96.15% <100.00%> (+0.03%) ⬆️
3.9 96.15% <100.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
...mstk/models/dbrecords/programdb_revision_record.py 100.00% <100.00%> (ø)
src/ramstk/models/dbtables/basetable.py 100.00% <100.00%> (+1.45%) ⬆️
...mstk/models/dbtables/programdb_validation_table.py 100.00% <100.00%> (ø)
src/ramstk/configuration.py 89.83% <0.00%> (ø)
src/ramstk/models/db/basedatabase.py 88.65% <0.00%> (ø)
src/ramstk/models/db/common_database.py 100.00% <0.00%> (ø)
src/ramstk/analyses/statistics/normal.py 80.00% <0.00%> (ø)
src/ramstk/analyses/statistics/weibull.py 80.00% <0.00%> (ø)
src/ramstk/analyses/statistics/lognormal.py 80.00% <0.00%> (ø)
src/ramstk/analyses/statistics/exponential.py 83.33% <0.00%> (ø)
... and 30 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@weibullguy weibullguy self-assigned this Jul 1, 2022
@github-actions github-actions bot added the status: inprogress Issue or PR is open, milestoned, and assigned. label Jul 1, 2022
@sonarcloud
Copy link

sonarcloud bot commented Aug 2, 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 10 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Nov 16, 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 9 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Jan 23, 2023

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 9 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Mar 3, 2023

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 11 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@weibullguy weibullguy added endgame: wontfix Issue or PR is closed and will NOT be fixed. 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 18, 2023
@weibullguy weibullguy closed this Mar 18, 2023
@weibullguy weibullguy deleted the feat/issue-52 branch March 18, 2023 15:26
@trafico-bot trafico-bot bot removed the status: closed Pull Request is complete and integrated or closed for anther reason. label Mar 18, 2023
@github-actions github-actions bot added the status: closed Pull Request is complete and integrated or closed for anther reason. label Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump: minor Issue or PR documents a new feature requiring a minor version bump. endgame: wontfix Issue or PR is closed and will NOT be fixed. status: closed Pull Request is complete and integrated or closed for anther reason. type: feature Issue or PR adds or requests new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

V&V Tasks Not Associated With Requirement
1 participant