From 89a4a7dad91be22fe617e0b42cffa1b08395eb82 Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki Date: Thu, 22 Jul 2021 12:11:18 +0300 Subject: Add docstring Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * Add docstring to the function, useful for generating automated developer documentation. We also surround the guard functions with some notification comments, to mark possible future places where change might be done. --- gn3/computations/slink.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gn3/computations/slink.py b/gn3/computations/slink.py index 704a0f4..dc71815 100644 --- a/gn3/computations/slink.py +++ b/gn3/computations/slink.py @@ -20,6 +20,13 @@ def raise_valueerror_if_lists_empty(lists): raise ValueError("List/Tuple should NOT be empty!") def nearest(lists, i, j): + """Computes some form of distance. +This is 'copied' over from genenetwork1, from https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/heatmap/slink.py#L42-L64. + +This description should be updated once the form/type of 'distance' identified.""" + + #### Guard Functions: Should we do this a different way? #### raise_valueerror_if_data_is_not_lists_or_tuples(lists) raise_valueerror_if_lists_empty(lists) + #### END: Guard Functions #### return None -- cgit v1.2.3