Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Anselmoo
Copy link
Owner

@Anselmoo Anselmoo commented Nov 11, 2022

All PR-Submissions:


  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open
    Pull Requests for the same
    update/change?

New ✨✨ Feature-Submissions:


  • Does your submission pass tests?
  • Have you lint your code locally prior to submission? Fixed:
  • This PR is for a new feature, not a bug fix. [Feature]: Refactor code #487

Changes to ⚙️ Core-Features:


  • Have you added an explanation of what your changes do and why you'd like
    us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

@github-actions github-actions bot added the python Pull requests that update Python code label Nov 11, 2022
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 11, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 6.99 ⭐ 6.57 ⭐ -0.42 👍
Method Length 69.54 🙂 65.62 🙂 -3.92 👍
Working memory 8.13 🙂 8.04 🙂 -0.09 👍
Quality 68.46% 🙂 69.74% 🙂 1.28% 👍
Other metrics Before After Change
Lines 3722 3813 91
Changed files Quality Before Quality After Quality Change
spectrafit/models.py 57.62% 🙂 59.31% 🙂 1.69% 👍
spectrafit/report.py 51.73% 🙂 61.15% 🙂 9.42% 👍
spectrafit/spectrafit.py 65.96% 🙂 65.95% 🙂 -0.01% 👎
spectrafit/tools.py 79.23% ⭐ 77.79% ⭐ -1.44% 👎
spectrafit/plugins/converter.py 72.83% 🙂 71.94% 🙂 -0.89% 👎
spectrafit/plugins/notebook.py 76.12% ⭐ 76.12% ⭐ 0.00%
spectrafit/plugins/test/test_converter.py 87.44% ⭐ 87.44% ⭐ 0.00%
spectrafit/test/test_tools.py 86.66% ⭐ 86.66% ⭐ 0.00%
spectrafit/utilities/transformer.py 78.52% ⭐ 78.52% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
spectrafit/report.py fit_report_as_dict 50 ⛔ 520 ⛔ 14 😞 13.35% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
spectrafit/models.py calculated_model 20 😞 320 ⛔ 17 ⛔ 24.72% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
spectrafit/models.py SolverModels.solve_global_fitting 15 🙂 314 ⛔ 19 ⛔ 27.10% 😞 Try splitting into smaller methods. Extract out complex expressions
spectrafit/models.py SolverModels.solve_local_fitting 15 🙂 250 ⛔ 18 ⛔ 30.36% 😞 Try splitting into smaller methods. Extract out complex expressions
spectrafit/plugins/notebook.py __init__ 3 ⭐ 358 ⛔ 43 ⛔ 32.44% 😞 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!

@Anselmoo Anselmoo added this to the Refactoring Code milestone Nov 11, 2022
@sonarqubecloud
Copy link

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 Nov 11, 2022

Codecov Report

Merging #489 (5bc79e3) into main (7be628e) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #489      +/-   ##
==========================================
+ Coverage   98.79%   98.81%   +0.02%     
==========================================
  Files          27       27              
  Lines        2392     2426      +34     
==========================================
+ Hits         2363     2397      +34     
  Misses         29       29              
Impacted Files Coverage Δ
spectrafit/plugins/notebook.py 98.42% <ø> (ø)
spectrafit/plugins/test/test_converter.py 100.00% <ø> (ø)
spectrafit/models.py 100.00% <100.00%> (ø)
spectrafit/plugins/converter.py 100.00% <100.00%> (ø)
spectrafit/report.py 94.06% <100.00%> (+0.77%) ⬆️
spectrafit/spectrafit.py 96.74% <100.00%> (+0.04%) ⬆️
spectrafit/test/test_tools.py 100.00% <100.00%> (ø)
spectrafit/tools.py 98.25% <100.00%> (+0.03%) ⬆️
spectrafit/utilities/transformer.py 70.59% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Anselmoo Anselmoo merged commit a3c167d into main Nov 11, 2022
@Anselmoo Anselmoo deleted the Anselmoo/issue487 branch November 11, 2022 17:54
@Anselmoo Anselmoo added the enhancement New feature or request label Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant