From fcee9cd150d434a3c9177c3f5e8a855c2efdb884 Mon Sep 17 00:00:00 2001
From: Tue Herlau <tuhe@dtu.dk>
Date: Sun, 6 Aug 2023 00:54:07 +0200
Subject: [PATCH] Viewing of remote results

---
 src/unitgrade/utils.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/unitgrade/utils.py b/src/unitgrade/utils.py
index bdc8645..75a7e10 100644
--- a/src/unitgrade/utils.py
+++ b/src/unitgrade/utils.py
@@ -339,6 +339,7 @@ def checkout_remote_results(remote_url, manifest):
     mf = [m.strip().split(" ")[-1] for m in manifest.strip().splitlines()]
     a = 23
     html = None
+    url = None
     for hash in reversed(mf):
         if hash_string(hash) in remote:
             url = f"{remote_url}/{os.path.dirname( remote[hash_string(hash)] )}/{hash}/index.html"
@@ -356,7 +357,7 @@ def checkout_remote_results(remote_url, manifest):
 
         # print( df.to_string(index=False) )
         # df.as
-        result = dict(html=html, df=df, score=float( df.iloc[2].to_list()[-1] ))
+        result = dict(html=html, df=df, score=float( df.iloc[2].to_list()[-1] ), url=url)
     else:
         result=dict(html=html)
 
-- 
GitLab