JuliaGaussianProcesses/ApproximateGPs.jl

File Structure

Closed this issue · 3 comments

There are a number of file / code structure things that I think we need to address.

I'm keen to follow our KernelFunctions test style in this package, because it makes it easy to predict roughly where stuff is tested, and to avoid near-circular dependencies in testing.

Specific things I think we need to change:

  1. I can't see a particuarly good reason to have the elbo-related code separate from the sparse_variational code, and it makes testing a bit of a headache, because you wind up having to instantiate SparseVariationalApproximations more times than would be ideal.
  2. I would like the consistency tests be located with the code that they're testing ie. inside test/sparse_variational.jl, so that it's easy to see whats' going on.

Therefore I propose to

  1. add KernelFunctions test style guide to test/runtests.jl
  2. move code from src/elbo.jl into src/sparse_variational.jl, and remove src/elbo.jl
  3. move tests from test/elbo.jl into test/sparse_variational.jl and remove test/elbo.jl
  4. move tests from test/equivalences.jl inside test/sparse_variational.jl.

@rossviljoen does this seem reasonable to you? Were there particular ways to structure things in this way that I'm missing?

That seems eminently reasonable! I think the only reason I put equivalences in a different file was because I thought it might be too heavy to run all the time - but that's a nonissue so it makes sense to put them all in the same place

I'll do this in a PR along with #66

Edit: Never mind, better to do them separately

Closed by #78