Catalyst.jl icon indicating copy to clipboard operation
Catalyst.jl copied to clipboard

add doc tests

Open isaacsas opened this issue 3 years ago • 5 comments

We have lots of code examples throughout the docs now, so it would be good to set up tests to make sure they actually keep running and working rather than having to manually test them by hand.

isaacsas avatar Aug 10 '21 22:08 isaacsas

Seems we've been burned on this a few times already now...

Is there an automatic-ish way of doing this, or would one just copy the code that's in the docs into a test file (and whenever stuff are added/changed in docs change this)?

TorkelE avatar Aug 11 '21 09:08 TorkelE

I think there is a way to label documentation strings as a doctest and then when the docs are being built it tries running the code.

isaacsas avatar Aug 11 '21 15:08 isaacsas

I have started working on this, but there are some issues over at https://github.com/JuliaDocs/Documenter.jl/issues which probably need to be sorted out before it would be possible to make sensible doctests. Hopefully, it won't be too long.

TorkelE avatar Aug 19 '21 09:08 TorkelE

Given that we changed our doc approach, is this superseded?

TorkelE avatar Jan 19 '23 20:01 TorkelE

I think it is still worth keeping this open, this would more be about testing the docstrings, which I don't think we can really do at the moment the way we'd want.

isaacsas avatar Jan 19 '23 20:01 isaacsas