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

Deprivatise tests #25

Merged
merged 3 commits into from
Sep 22, 2021
Merged

Deprivatise tests #25

merged 3 commits into from
Sep 22, 2021

Conversation

A-CGray
Copy link
Owner

@A-CGray A-CGray commented Sep 22, 2021

Since element unit test functions are called from outside the element class during unit tests, they shouldn't be private functions

@codeclimate
Copy link

codeclimate bot commented Sep 22, 2021

Code Climate has analyzed commit 736b7ca and detected 0 issues on this pull request.

View more on Code Climate.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 22, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.61 ⭐ 1.61 ⭐ 0.00
Method Length 46.05 ⭐ 46.10 ⭐ 0.05 👎
Working memory 8.01 🙂 8.01 🙂 0.00
Quality 75.57% 75.56% -0.01% 👎
Other metrics Before After Change
Lines 945 945 0
Changed files Quality Before Quality After Quality Change
FEMpy/Element.py 77.75% ⭐ 77.75% ⭐ 0.00%
FEMpy/Lagrange1dElement.py 89.05% ⭐ 89.05% ⭐ 0.00%
FEMpy/QuadElement.py 73.52% 🙂 73.52% 🙂 0.00%
FEMpy/SerendipityQuad.py 64.52% 🙂 64.52% 🙂 0.00%
tests/testElements.py 88.02% ⭐ 88.02% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
FEMpy/QuadElement.py QuadElement.integrateTraction 6 ⭐ 118 🙂 15 😞 52.82% 🙂 Extract out complex expressions
FEMpy/Element.py Element.getStiffnessMat 4 ⭐ 106 🙂 13 😞 59.01% 🙂 Extract out complex expressions
FEMpy/Element.py Element.getMassMat 4 ⭐ 106 🙂 13 😞 59.01% 🙂 Extract out complex expressions
FEMpy/SerendipityQuad.py serendipityShapeFuncDerivs 0 ⭐ 286 ⛔ 7 🙂 60.32% 🙂 Try splitting into smaller methods
FEMpy/Element.py Element.integrateBodyForce 3 ⭐ 93 🙂 13 😞 61.78% 🙂 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 Sep 22, 2021

Codecov Report

Merging #25 (52e9484) into main (8df276f) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 52e9484 differs from pull request most recent head 736b7ca. Consider uploading reports for the commit 736b7ca to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main      #25   +/-   ##
=======================================
  Coverage   49.57%   49.57%           
=======================================
  Files          18       18           
  Lines         714      714           
=======================================
  Hits          354      354           
  Misses        360      360           
Impacted Files Coverage Δ
FEMpy/Element.py 44.44% <100.00%> (ø)
FEMpy/Lagrange1dElement.py 90.90% <100.00%> (ø)
FEMpy/QuadElement.py 59.18% <100.00%> (ø)
FEMpy/SerendipityQuad.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 8df276f...736b7ca. Read the comment docs.

@A-CGray A-CGray merged commit 7c925ab into main Sep 22, 2021
@A-CGray A-CGray deleted the deprivatiseTests branch September 22, 2021 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant