jeff-regier / Celeste.jl

Scalable inference for a generative model of astronomical images
MIT License
183 stars 28 forks source link

Grab bag of organization and test cleanups #725

Closed kbarbary closed 6 years ago

kbarbary commented 6 years ago

This PR looks big but it makes no algorithmic changes. It is only code organization and test clean ups. (The files with big diffs are either moving code around or reindentation). The most notable feature is that tests now use @testset uniformly and all extraneous print output has been removed or made optional via logging levels. This means that the test output is now actually readable. Example:

$ runtests.jl sdssio sep wcs
Test Summary: | Pass  Total
sdssio        |   10     10
Test Summary: | Pass  Total
sep           |    5      5
Test Summary: | Pass  Total
wcs           |    5      5

Timing info:
                test_sdssio.jl:    3.02 seconds
                   test_sep.jl:    1.09 seconds
                   test_wcs.jl:    8.16 seconds
                    Total time:   12.27 seconds

Being able to read the test output made it possible to notice several deprecation warnings which I've fixed.

Detailed summary of changes:

codecov[bot] commented 6 years ago

Codecov Report

Merging #725 into master will increase coverage by 0.61%. The diff coverage is 88.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #725      +/-   ##
==========================================
+ Coverage   80.88%   81.49%   +0.61%     
==========================================
  Files          37       38       +1     
  Lines        3965     3934      -31     
==========================================
- Hits         3207     3206       -1     
+ Misses        758      728      -30
Impacted Files Coverage Δ
src/mcmc/mcmc_misc.jl 33.89% <ø> (ø) :arrow_up:
src/deterministic_vi/elbo_args.jl 100% <ø> (ø) :arrow_up:
src/mcmc/mcmc_infer.jl 47.32% <ø> (ø) :arrow_up:
src/model/fsm_util.jl 100% <ø> (ø) :arrow_up:
src/model/log_prob.jl 90.57% <ø> (ø) :arrow_up:
src/DeterministicVI.jl 92.3% <ø> (ø) :arrow_up:
src/partition.jl 100% <100%> (ø)
src/GalsimBenchmark.jl 100% <100%> (ø) :arrow_up:
src/mcmc/slicesample.jl 73% <100%> (ø) :arrow_up:
src/detection.jl 100% <100%> (ø)
... and 11 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 215be92...756f3df. Read the comment docs.

jeff-regier commented 6 years ago

Excellent. These all seem like nice improvements.