From 5b2fdc33688e147416ae29fd10b003bba7d14fd1 Mon Sep 17 00:00:00 2001 From: cmdoret Date: Fri, 25 Oct 2024 14:45:54 +0200 Subject: [PATCH] fix: website builder --- .github/workflows/build-website.yml | 2 +- website/Dockerfile | 1 + website/script.py | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-website.yml b/.github/workflows/build-website.yml index 95ca9a9..87df7b6 100644 --- a/.github/workflows/build-website.yml +++ b/.github/workflows/build-website.yml @@ -56,7 +56,7 @@ jobs: path: website/data/ - name: Build website - run: python /app/script.py + run: python /app/script.py website/data/sampleEval.json deploy: diff --git a/website/Dockerfile b/website/Dockerfile index 105f5c9..39cb1c4 100644 --- a/website/Dockerfile +++ b/website/Dockerfile @@ -1,3 +1,4 @@ +# builder environment for the website # Use an official Python runtime as a parent image FROM python:3.12-slim diff --git a/website/script.py b/website/script.py index 1fbee27..f911b0f 100644 --- a/website/script.py +++ b/website/script.py @@ -1,12 +1,12 @@ import plotly.graph_objects as go import pandas as pd from layout import layout_with_figures -import json, re +import json, re, sys from algo_details_script import create_algo_page github_pages_root_url = "https://esl-epfl.github.io/szcore/" -path_to_eval = './data/sampleEval.json' +path_to_eval = sys.argv[1] path_to_algo_yaml = "../algorithms/" file = open(path_to_eval) @@ -47,4 +47,4 @@ file.write(complete_html) # Create second HTML file for algo details (from yaml) -create_algo_page(path_to_algo_yaml) \ No newline at end of file +create_algo_page(path_to_algo_yaml)