data
data copied to clipboard
[Doc] Fix examples and migrate to sphinx doctest (iter/util)
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
Using the testcode/testoutput block format the output does look slightly different but imo this it's actually an improvement
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.