From 9482c8f6eddf17df076100b515ce15c7ac4e6ed8 Mon Sep 17 00:00:00 2001 From: TomMonks Date: Mon, 22 Apr 2024 15:11:30 +0100 Subject: [PATCH] CHANGE: setup change page for app --- CHANGES.md | 2 + ...360\237\227\222\357\270\217_Change_Log.py" | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index e6f0b7f..379facb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,5 @@ +# Change Log + ## v3.0.0 22nd April 2024 diff --git "a/pages/7_\360\237\227\222\357\270\217_Change_Log.py" "b/pages/7_\360\237\227\222\357\270\217_Change_Log.py" index e69de29..2fe69f8 100644 --- "a/pages/7_\360\237\227\222\357\270\217_Change_Log.py" +++ "b/pages/7_\360\237\227\222\357\270\217_Change_Log.py" @@ -0,0 +1,38 @@ +''' +Change log page + +A list of changes to each version of the app +''' + +import streamlit as st +import urllib.request as request + +FILE = ( + "https://raw.githubusercontent.com/pythonhealthdatascience/" + + "stars-streamlit-example/main/CHANGES.md" +) + + +def read_file_contents(path): + """ + Download the content of a file from the GitHub Repo and return as a utf-8 string + + Notes: + ------- + adapted from 'https://github.com/streamlit/demo-self-driving' + + Parameters: + ---------- + path: str + e.g. file_name.md + + Returns: + -------- + utf-8 str + + """ + response = request.urlopen(path) + return response.read().decode("utf-8") + + +st.markdown(read_file_contents(FILE))