danielward27 / flowjax

https://danielward27.github.io/flowjax/
MIT License
82 stars 10 forks source link

Doctest fails #155

Open danielward27 opened 4 months ago

danielward27 commented 4 months ago

Sphinx doctest fails for a couple reasons. When running doctest

  1. Sphinx seems to stringify types which is incompatible with equinox (cannot use stringified abstract annotations).
  2. We set typing.GENERATING_DOCUMENTATION = True in conf.py to avoid expanding ArrayLike in the documentation (jaxtyping imports it as an Array instead). This change in imports lead to errors on isinstance checks.

Ideally doctest would be ran separately, outside a document generating context. At some point I might make the change to MKDocs, in which case another solution will need to be found for testing documentation anyway.