Skip to content

Commit

Permalink
Merge pull request #17 from pythonhealthdatascience/dev
Browse files Browse the repository at this point in the history
LICENSE page
  • Loading branch information
TomMonks authored Apr 20, 2024
2 parents c551db7 + 3f088f7 commit 0e281a0
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 6 deletions.
4 changes: 2 additions & 2 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
- plotly=5.15.0
- python=3.10.13
- scipy=1.10.1
- simpy=4.0.1
- simpy=4.1.1
- pip:
- streamlit==1.31.1
- streamlit==1.33.0
- streamlit-bokeh-events==0.1.2
42 changes: 42 additions & 0 deletions pages/5_License.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import streamlit as st
import urllib.request as request

LICENSE_FILE = (
"https://raw.githubusercontent.com/pythonhealthdatascience/"
+ "stars-streamlit-example/dev/LICENSE"
)

LICENSE_PAGE_TXT = (
"https://raw.githubusercontent.com/pythonhealthdatascience/"
+ "stars-streamlit-example/dev/txt/license_page.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")

# show license header and badge
#st.markdown(read_file_contents(LICENSE_PAGE_TXT))
st.markdown("# License")

# show MIT license.
license_txt = read_file_contents(LICENSE_FILE)
st.code(license_txt, language="markdown", line_numbers=False)
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ matplotlib>=3.7.1
numpy==1.25.0
pandas==2.0.2
scipy==1.10.1
simpy==4.0.1
streamlit==1.31.1
simpy==4.1.1
streamlit==1.33.0
streamlit-bokeh-events==0.1.2
14 changes: 12 additions & 2 deletions txt/acknowledgement.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@

# About

This work is produced using entirely free and open software in python.
This work is produced using entirely Free and Open Source Software in python.

This model is independent research supported by the National Institute for Health Research Applied Research Collaboration South West Peninsula. The views expressed in this publication are those of the author(s) and not necessarily those of the National Institute for Health Research or the Department of Health and Social Care.

## Author ORCIDs

[![ORCID: Harper](https://img.shields.io/badge/ORCID-0000--0001--5274--5037-brightgreen)](https://orcid.org/0000-0001-5274-5037)
[![ORCID: Monks](https://img.shields.io/badge/ORCID-0000--0003--2631--4481-brightgreen)](https://orcid.org/0000-0003-2631-4481)

## Links

> GitHub: https://github.com/pythonhealthdatascience/stars-streamlit-example
> Citable archive: https://zenodo.org/records/10935920
> Detailed model documentation can be found here: https://pythonhealthdatascience.github.io/stars-simpy-example-docs
## Modelling and Simulation Software
Expand Down
3 changes: 3 additions & 0 deletions txt/licence_page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

0 comments on commit 0e281a0

Please sign in to comment.