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

Add EBL models #55

Merged
merged 6 commits into from Nov 22, 2020
Merged

Add EBL models #55

merged 6 commits into from Nov 22, 2020

Conversation

cosimoNigro
Copy link
Owner

This PR request adds to the Absorption sub-module the absorption from three different EBL models.

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 22, 2020

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 1.17 ⭐ 1.13 ⭐ -0.04 👍
Method Length 98.50 🙂 91.37 🙂 -7.13 👍
Working memory 13.26 😞 13.05 😞 -0.21 👍
Quality 60.96% 🙂 62.13% 🙂 1.17% 👍
Other metrics Before After Change
Lines 528 593 65
Changed files Quality Before Quality After Quality Change
agnpy/absorption/absorption.py 61.90% 🙂 64.96% 🙂 3.06% 👍
agnpy/tests/test_absorption.py 64.57% 🙂 64.25% 🙂 -0.32% 👎
agnpy/tests/utils.py 53.14% 🙂 52.14% 🙂 -1.00% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
agnpy/tests/utils.py make_comparison_plot 5 ⭐ 309 ⛔ 24 ⛔ 33.80% 😞 Try splitting into smaller methods. Extract out complex expressions
agnpy/absorption/absorption.py Absorption.opacity_disk 3 ⭐ 231 ⛔ 19 ⛔ 41.72% 😞 Try splitting into smaller methods. Extract out complex expressions
agnpy/absorption/absorption.py tau_disk_finke_2016 0 ⭐ 171 😞 18 ⛔ 49.98% 😞 Try splitting into smaller methods. Extract out complex expressions
agnpy/absorption/absorption.py Absorption.opacity_shell_blr 0 ⭐ 147 😞 13 😞 58.04% 🙂 Try splitting into smaller methods. Extract out complex expressions
agnpy/tests/test_absorption.py TestAbsorption.test_absorption_disk_reference_tau 0 ⭐ 173 😞 11 😞 58.76% 🙂 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!

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

@cosimoNigro cosimoNigro mentioned this pull request Nov 22, 2020
@codecov
Copy link

codecov bot commented Nov 22, 2020

Codecov Report

Merging #55 (513a8a4) into master (3652786) will increase coverage by 0.11%.
The diff coverage is 97.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
+ Coverage   93.99%   94.11%   +0.11%     
==========================================
  Files          30       30              
  Lines        1681     1715      +34     
==========================================
+ Hits         1580     1614      +34     
  Misses        101      101              
Flag Coverage Δ
unittests 94.11% <97.77%> (+0.11%) ⬆️

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

Impacted Files Coverage Δ
agnpy/absorption/absorption.py 99.25% <96.55%> (-0.75%) ⬇️
agnpy/tests/test_absorption.py 100.00% <100.00%> (ø)
agnpy/tests/utils.py 100.00% <100.00%> (+1.72%) ⬆️

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 3652786...513a8a4. Read the comment docs.

@cosimoNigro cosimoNigro merged commit 535e20a into master Nov 22, 2020
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.

None yet

1 participant