edsonportosilva / OptiCommPy

Simulate optical communications systems with Python.
https://opticommpy.readthedocs.io/en/latest/index.html
GNU General Public License v3.0
110 stars 40 forks source link

Edfa sm #3

Closed adophobr closed 1 year ago

sourcery-ai[bot] commented 1 year ago

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 5.24 ⭐ 5.24 ⭐ 0.00
Method Length 147.90 😞 147.90 😞 0.00
Working memory 11.61 😞 11.61 😞 0.00
Quality 50.20% 🙂 50.20% 🙂 0.00%
Other metrics Before After Change
Lines 297 297 0
Changed files Quality Before Quality After Quality Change
optic/metrics.py 50.20% 🙂 50.20% 🙂 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
optic/metrics.py monteCarloGMI 8 ⭐ 359 ⛔ 13 😞 38.66% 😞 Try splitting into smaller methods. Extract out complex expressions
optic/metrics.py fastBERcalc 6 ⭐ 343 ⛔ 13 😞 40.90% 😞 Try splitting into smaller methods. Extract out complex expressions
optic/metrics.py monteCarloMI 7 ⭐ 234 ⛔ 10 😞 49.25% 😞 Try splitting into smaller methods. Extract out complex expressions
optic/metrics.py calcMI 1 ⭐ 156 😞 15 😞 53.42% 🙂 Try splitting into smaller methods. Extract out complex expressions
optic/metrics.py theoryBER 2 ⭐ 112 🙂 12 😞 61.77% 🙂 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!

Help us improve this quality report!