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 ultranest sampler #246

Merged
merged 9 commits into from
Jul 28, 2022
Merged

Add ultranest sampler #246

merged 9 commits into from
Jul 28, 2022

Conversation

JoranAngevaare
Copy link
Owner

@JoranAngevaare JoranAngevaare commented Jul 28, 2022

Probably would have started out with this package instead of pymultinest as the main sampling method if I would have known about it earlier.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jul 28, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 4.23 ⭐ 4.03 ⭐ -0.20 👍
Method Length 74.30 🙂 78.67 🙂 4.37 👎
Working memory 10.60 😞 11.12 😞 0.52 👎
Quality 66.23% 🙂 65.11% 🙂 -1.12% 👎
Other metrics Before After Change
Lines 408 466 58
Changed files Quality Before Quality After Quality Change
dddm/context.py 65.76% 🙂 65.76% 🙂 0.00%
dddm/samplers/init.py % % %
dddm/samplers/multi_detectors.py 67.23% 🙂 63.95% 🙂 -3.28% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
dddm/context.py Context.get_sampler_for_detector 10 🙂 246 ⛔ 20 ⛔ 33.49% 😞 Try splitting into smaller methods. Extract out complex expressions
dddm/samplers/multi_detectors.py CombinedMultinest.__init__ 1 ⭐ 168 😞 19 ⛔ 48.50% 😞 Try splitting into smaller methods. Extract out complex expressions
dddm/samplers/multi_detectors.py CombinedNestle.__init__ 1 ⭐ 168 😞 19 ⛔ 48.50% 😞 Try splitting into smaller methods. Extract out complex expressions
dddm/samplers/multi_detectors.py CombinedUltraNest.__init__ 1 ⭐ 168 😞 19 ⛔ 48.50% 😞 Try splitting into smaller methods. Extract out complex expressions
dddm/context.py Context._check_sampler_args 3 ⭐ 113 🙂 15 😞 56.40% 🙂 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!

@coveralls
Copy link

coveralls commented Jul 28, 2022

Pull Request Test Coverage Report for Build 2752921419

  • 46 of 46 (100.0%) changed or added relevant lines in 3 files are covered.
  • 20 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-51.6%) to 42.913%

Files with Coverage Reduction New Missed Lines %
dddm/recoil_rates/detector_spectrum.py 20 58.33%
Totals Coverage Status
Change from base Build 2752855767: -51.6%
Covered Lines: 990
Relevant Lines: 2307

💛 - Coveralls

@JoranAngevaare JoranAngevaare merged commit 8263ab3 into master Jul 28, 2022
@JoranAngevaare JoranAngevaare deleted the ultranest branch July 28, 2022 10:15
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.

2 participants