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

Refactor utils #96

Merged
merged 25 commits into from
Jul 19, 2021
Merged

Refactor utils #96

merged 25 commits into from
Jul 19, 2021

Conversation

mj-will
Copy link
Owner

@mj-will mj-will commented Jul 19, 2021

nessai.utils was getting rather long so I decided to refactor it into a submodule whilst writing the missing tests.

In this PR:

  • Refactor nessai.utils
  • Add tests
  • Tweak determine_rescaled_bounds and detect_edges. The default behaviour remains the same but some edge cases now work as expected.

@mj-will mj-will added the tests Improvements or additions to the test suite label Jul 19, 2021
@mj-will mj-will added this to the v0.3.1 milestone Jul 19, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2021

Codecov Report

Merging #96 (169ceca) into main (a56fdbf) will increase coverage by 2.19%.
The diff coverage is 99.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
+ Coverage   92.11%   94.30%   +2.19%     
==========================================
  Files          29       39      +10     
  Lines        3475     3513      +38     
==========================================
+ Hits         3201     3313     +112     
+ Misses        274      200      -74     
Flag Coverage Δ
unittests 94.30% <99.34%> (+2.19%) ⬆️

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

Impacted Files Coverage Δ
nessai/reparameterisations.py 89.96% <ø> (ø)
nessai/flowsampler.py 38.88% <50.00%> (ø)
nessai/flowmodel.py 93.28% <100.00%> (ø)
nessai/utils/__init__.py 100.00% <100.00%> (ø)
nessai/utils/distance.py 100.00% <100.00%> (ø)
nessai/utils/distributions.py 100.00% <100.00%> (ø)
nessai/utils/hist.py 100.00% <100.00%> (ø)
nessai/utils/indices.py 100.00% <100.00%> (ø)
nessai/utils/io.py 100.00% <100.00%> (ø)
nessai/utils/logging.py 100.00% <100.00%> (ø)
... and 15 more

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 a56fdbf...169ceca. Read the comment docs.

@mj-will mj-will merged commit 5a9a8a3 into main Jul 19, 2021
@mj-will mj-will deleted the refactor-utils branch July 19, 2021 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Improvements or additions to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants