Examples can be executed as docstests which can help with testing the code to ensure reliability and reproducibility. To expedite this process I am adding the package xdoctest and adding its usage to the readme. I've rewritten the dbscan.py examples to work with this test framework and it now passes the tests:
I now leave the rest to @Caochris to complete the rest of the examples
[x] dbscan.py
[x] ot.py
[x] permuation.py
[x] visualization.py
A few notes on doctests:
while it is possible to test on datafame outputs if they are of a certain length they can be difficult to test from the whitespace produced. try using `df.head(1)' to reduce the output to just the first result of the dataframe or just use the expected dataframe dimensions with 'df.shape()'
xdoctest already imports packages based the script so call functions to tests natively in the example
to read files from the top level directory you can use file syntax ie "./input_files/ot_results.csv"
Examples can be executed as docstests which can help with testing the code to ensure reliability and reproducibility. To expedite this process I am adding the package xdoctest and adding its usage to the readme. I've rewritten the
dbscan.py
examples to work with this test framework and it now passes the tests:I now leave the rest to @Caochris to complete the rest of the examples
A few notes on doctests:
xdoctest
already imports packages based the script so call functions to tests natively in the example"./input_files/ot_results.csv"