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: move ramstk_rpn to sub-package #1002

Merged
merged 3 commits into from
Feb 23, 2022

Conversation

weibullguy
Copy link
Collaborator

@weibullguy weibullguy commented Feb 23, 2022

Does this PR introduce a breaking change?

  • Yes
  • No

Describe the purpose of this pull request.

To move the common database tables to sub-packages under commondb.

Describe how this was implemented.

Created sub-package for rasmtk_rpn. Moved ramstk_rpn.py to sub-package as record.py. Created table.py. Updated ramstk_rpn test suite.

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

None

Provide any other pertinent information.

Partially implements #846

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.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 23, 2022

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 1.50%.

Quality metrics Before After Change
Complexity 0.84 ⭐ 0.94 ⭐ 0.10 👎
Method Length 54.54 ⭐ 61.09 🙂 6.55 👎
Working memory 5.18 ⭐ 5.35 ⭐ 0.17 👎
Quality 81.80% 80.30% -1.50% 👎
Other metrics Before After Change
Lines 988 913 -75
Changed files Quality Before Quality After Quality Change
src/ramstk/models/init.py % % %
src/ramstk/models/commondb/init.py % % %
src/ramstk/models/commondb/database.py 80.31% ⭐ 80.30% ⭐ -0.01% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
src/ramstk/models/commondb/database.py RAMSTKCommonDB.do_load_site_info 1 ⭐ 360 ⛔ 7 🙂 57.30% 🙂 Try splitting into smaller methods
src/ramstk/models/commondb/database.py RAMSTKCommonDB.do_load_site_variables 0 ⭐ 164 😞 6 ⭐ 70.59% 🙂 Try splitting into smaller methods

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!

@github-actions github-actions bot added the type: refactor Issue or PR dealing with refactoring of RAMSTK code. label Feb 23, 2022
@weibullguy weibullguy self-assigned this Feb 23, 2022
@github-actions github-actions bot added the status: inprogress Issue or PR is open, milestoned, and assigned. label Feb 23, 2022
@weibullguy weibullguy added the priority: normal Issue or PR is normal priority. label Feb 23, 2022
@sonarcloud
Copy link

sonarcloud bot commented Feb 23, 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

@codecov
Copy link

codecov bot commented Feb 23, 2022

Codecov Report

Merging #1002 (dcc54b7) into master (2c88488) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1002      +/-   ##
==========================================
+ Coverage   94.89%   94.90%   +0.01%     
==========================================
  Files         176      178       +2     
  Lines        5286     5299      +13     
  Branches      504      505       +1     
==========================================
+ Hits         5016     5029      +13     
  Misses        235      235              
  Partials       35       35              
Flag Coverage Δ
3.6 94.90% <100.00%> (+0.01%) ⬆️
3.7 94.90% <100.00%> (+0.01%) ⬆️
3.8 94.90% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
src/ramstk/models/__init__.py 100.00% <ø> (ø)
src/ramstk/models/commondb/__init__.py 100.00% <ø> (ø)
src/ramstk/models/commondb/database.py 100.00% <ø> (ø)
src/ramstk/models/commondb/rpn/__init__.py 100.00% <100.00%> (ø)
src/ramstk/models/commondb/rpn/record.py 100.00% <100.00%> (ø)
src/ramstk/models/commondb/rpn/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 2c88488...dcc54b7. Read the comment docs.

@weibullguy weibullguy merged commit 22a6c7f into master Feb 23, 2022
@trafico-bot trafico-bot bot added the endgame: merged Pull Request has been merged successfully label Feb 23, 2022
@weibullguy weibullguy deleted the refactor/move_ramstkrpn_subpackage branch February 23, 2022 15:03
@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.

1 participant