data icon indicating copy to clipboard operation
data copied to clipboard

[Doc] Fix examples and migrate to sphinx doctest (iter/util)

Open SvenDS9 opened this issue 1 year ago • 2 comments

Similar to #901 and as discussed in #850 this migrates examples in iter/util directory to sphinx doctest format.

As sphinx is also able to check normal doctest-style examples (which will be enabled once doctest_test_doctest_blocks = "" is deleted from conf.py), it is not necessary to convert all examples into the testcode/testoutput block format. However as some tests need to be skipped conditionally, I converted them to block format.

Changes

  • Fixes some faulty examples
  • Migrates many examples in iter/util to testcode/testoutput block format
  • conditionally skip testing some examples
  • use functional form in examples

SvenDS9 avatar Mar 06 '23 21:03 SvenDS9

Using the testcode/testoutput block format the output does look slightly different but imo this it's actually an improvement grafik

SvenDS9 avatar Mar 06 '23 21:03 SvenDS9

I also noticed that many datapipes in util also handle loading so should probably be moved to load. Imho the division into load, transform and util is fine but is in contrast to the documentation, where we have 10(!) different types.

SvenDS9 avatar Mar 08 '23 09:03 SvenDS9