sjvrijn / mf2

Collection of Multi-Fidelity benchmark functions
https://mf2.readthedocs.io/
GNU General Public License v3.0
25 stars 7 forks source link

Add AdjustableMultiFidelityFunction class #48

Closed sjvrijn closed 2 years ago

sjvrijn commented 2 years ago
sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.27%.

Quality metrics Before After Change
Complexity 1.31 ⭐ 1.10 ⭐ -0.21 👍
Method Length 33.73 ⭐ 34.78 ⭐ 1.05 👎
Working memory 6.46 🙂 6.71 🙂 0.25 👎
Quality 83.24% 82.97% -0.27% 👎
Other metrics Before After Change
Lines 325 369 44
Changed files Quality Before Quality After Quality Change
mf2/multi_fidelity_function.py 78.35% ⭐ 80.27% ⭐ 1.92% 👍
mf2/adjustable/branin.py 81.81% ⭐ 80.82% ⭐ -0.99% 👎
mf2/adjustable/hartmann.py 87.40% ⭐ 86.17% ⭐ -1.23% 👎
mf2/adjustable/paciorek.py 90.72% ⭐ 88.78% ⭐ -1.94% 👎
mf2/adjustable/trid.py 87.50% ⭐ 85.42% ⭐ -2.08% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
mf2/multi_fidelity_function.py MultiFidelityFunction.__init__ 5 ⭐ 101 🙂 11 😞 62.01% 🙂 Extract out complex expressions
mf2/adjustable/branin.py adjustable_branin_lf 0 ⭐ 52 ⭐ 11 😞 74.27% 🙂 Extract out complex expressions
mf2/multi_fidelity_function.py AdjustableMultiFidelityFunction.__init__ 1 ⭐ 48 ⭐ 10 😞 75.81% ⭐ Extract out complex expressions
mf2/multi_fidelity_function.py AdjustableMultiFidelityFunction.__repr__ 0 ⭐ 23 ⭐ 10 😞 80.90% ⭐ 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!