TuringLang / SSMProblems.jl

Common abstractions for state-space models
http://turinglang.org/SSMProblems.jl/
MIT License
2 stars 2 forks source link

Interface Testing #44

Open willtebbutt opened 1 month ago

willtebbutt commented 1 month ago

Love the package. It looks like the interface has really been nicely reduced down to a couple of core bits.

It would be great if a module could be added inside this package with some testing functionality (maybe call it InterfaceTesting or something), containing two things:

  1. a function called test_interface (possibly in a submodule) which verifies whether or not a LatentDynamics, ObservationProcess, and StateSpaceModel that I've built from them correctly implement everything that you expect. The value of this is getting quick feedback from the package that tells me immediately whether I can expect my code to run.
  2. On the flip side, it would be great if you could publish a "test fake" model which implements the interface (but nothing more), and can be used when developing downstream algorithms that are intended to work with anything which implements the interface.

See e.g. https://invenia.github.io/blog/2020/11/06/interfacetesting/ for a good intro to this kind of thing, and does a good job of explaining why this kind of thing is generally helpful.

If this is something of interest, I'd be happy to help sketch out how it might look.