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

Skip to content

Conversation

@Anselmoo
Copy link
Owner

@Anselmoo Anselmoo commented Dec 17, 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:


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?

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 17, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.63 ⭐ 3.58 ⭐ -0.05 👍
Method Length 56.44 ⭐ 56.80 ⭐ 0.36 👎
Working memory 6.16 ⭐ 6.17 ⭐ 0.01 👎
Quality 78.63% 78.75% 0.12% 👍
Other metrics Before After Change
Lines 1720 1843 123
Changed files Quality Before Quality After Quality Change
spectrafit/report.py 65.94% 🙂 65.94% 🙂 0.00%
spectrafit/tools.py 77.77% ⭐ 77.76% ⭐ -0.01% 👎
spectrafit/plugins/test/test_converter.py 87.44% ⭐ 88.17% ⭐ 0.73% 👍
spectrafit/plugins/test/test_notebook.py 85.82% ⭐ 85.85% ⭐ 0.03% 👍
spectrafit/test/test_tools.py 86.66% ⭐ 86.26% ⭐ -0.40% 👎

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 33 ⛔ 345 ⛔ 14 😞 20.13% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
spectrafit/report.py _extracted_gof_from_results 19 😞 213 ⛔ 12 😞 36.66% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
spectrafit/tools.py PostProcessing.make_residual_fit 4 ⭐ 152 😞 11 😞 56.83% 🙂 Try splitting into smaller methods. Extract out complex expressions
spectrafit/tools.py PreProcessing.__call__ 6 ⭐ 145 😞 6 ⭐ 66.61% 🙂 Try splitting into smaller methods
spectrafit/tools.py PostProcessing.rename_columns 3 ⭐ 77 🙂 11 😞 67.41% 🙂 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!

@github-actions github-actions bot added maintenance Maintenance & Security pre-commit python Pull requests that update Python code labels Dec 17, 2022
@Anselmoo Anselmoo added this to the Refactoring Code milestone Dec 17, 2022
@codecov
Copy link

codecov bot commented Dec 17, 2022

Codecov Report

Merging #521 (a27df9c) into main (f5e3c34) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #521      +/-   ##
==========================================
+ Coverage   99.44%   99.44%   +0.01%     
==========================================
  Files          28       28              
  Lines        2468     2476       +8     
==========================================
+ Hits         2454     2462       +8     
  Misses         14       14              
Impacted Files Coverage Δ
spectrafit/plugins/test/test_converter.py 100.00% <100.00%> (ø)
spectrafit/plugins/test/test_notebook.py 100.00% <100.00%> (ø)
spectrafit/report.py 96.12% <100.00%> (ø)
spectrafit/test/test_tools.py 100.00% <100.00%> (ø)
spectrafit/tools.py 100.00% <100.00%> (ø)

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

@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

@Anselmoo Anselmoo merged commit d771682 into main Dec 17, 2022
@Anselmoo Anselmoo deleted the Anselmoo/issue401 branch December 17, 2022 16:01
@Anselmoo Anselmoo added the testing Improve testing & coverage label Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Maintenance & Security pre-commit python Pull requests that update Python code testing Improve testing & coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Using tmp files and pytest fixtures

1 participant