cosimoNigro / agnpy

Modelling jetted Active Galactic Nuclei radiative processes with python
https://agnpy.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
47 stars 32 forks source link

Table of relative line intensities (Sourcery refactored) #60

Closed sourcery-ai[bot] closed 3 years ago

sourcery-ai[bot] commented 3 years ago

Pull Request #59 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/cosimoNigro/agnpy pull/59/head
    git merge --ff-only FETCH_HEAD
    git push

NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

βœ…  Merging this PR will increase code quality in the affected files by 0.56%.

Quality metrics Before After Change
Complexity 2.63 ⭐ 2.06 ⭐ -0.57 πŸ‘
Method Length 66.46 πŸ™‚ 68.18 πŸ™‚ 1.72 πŸ‘Ž
Working memory 13.10 😞 13.31 😞 0.21 πŸ‘Ž
Quality 64.39% πŸ™‚ 64.95% πŸ™‚ 0.56% πŸ‘
Other metrics Before After Change
Lines 410 408 -2
Changed files Quality Before Quality After Quality Change
agnpy/targets/targets.py 64.39% πŸ™‚ 64.95% πŸ™‚ 0.56% πŸ‘

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

File Function Complexity Length Working Memory Quality Recommendation
agnpy/targets/targets.py SSDisk.__init__ 9 πŸ™‚ 208 β›” 14 😞 42.42% 😞 Try splitting into smaller methods. Extract out complex expressions
agnpy/targets/targets.py SSDisk.u 1 ⭐ 148 😞 16 β›” 53.14% πŸ™‚ Try splitting into smaller methods. Extract out complex expressions
agnpy/targets/targets.py RingDustTorus.__init__ 2 ⭐ 92 πŸ™‚ 22 β›” 54.76% πŸ™‚ Extract out complex expressions
agnpy/targets/targets.py SphericalShellBLR.u 1 ⭐ 136 😞 14 😞 56.85% πŸ™‚ Try splitting into smaller methods. Extract out complex expressions
agnpy/targets/targets.py SSDisk.sed_flux 0 ⭐ 132 😞 14 😞 58.32% πŸ™‚ Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

codecov[bot] commented 3 years ago

Codecov Report

Merging #60 (755af8c) into master (04786cc) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #60   +/-   ##
=======================================
  Coverage   94.17%   94.17%           
=======================================
  Files          30       30           
  Lines        1718     1718           
=======================================
  Hits         1618     1618           
  Misses        100      100           
Flag Coverage Ξ”
unittests 94.17% <100.00%> (ΓΈ)

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

Impacted Files Coverage Ξ”
agnpy/targets/targets.py 79.66% <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 04786cc...755af8c. Read the comment docs.