generated from fastai/nbdev_template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup, tweak main screen and added About page
- Loading branch information
1 parent
5445603
commit 2210b90
Showing
11 changed files
with
241 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# See https://stackoverflow.com/questions/68673221/warning-running-pip-as-the-root-user | ||
# for enhancements to Dockerfile e.g. not running as root & in venv | ||
|
||
FROM python:3.11-slim-bullseye | ||
RUN apt-get update && apt-get install -y | ||
|
||
EXPOSE 8080 | ||
|
||
RUN pip install -U pip | ||
|
||
COPY requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
# Copy into a directory of its own (so it isn't in the toplevel dir) | ||
|
||
COPY .streamlit app/.streamlit | ||
COPY data app/data | ||
COPY docs app/docs | ||
COPY src app/src | ||
|
||
WORKDIR /app | ||
|
||
# Run it! | ||
|
||
ENTRYPOINT ["streamlit", "run", "src/Emmaus_Walking.py", "--server.port=8080", "--server.address=0.0.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pdm update | ||
|
||
pdm export --o requirements.txt --without-hashes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
### Emmaus Walking App | ||
|
||
Simple [streamlit.io](https://www.streamlit.io) web app to display some of the major walking trails that I have done. | ||
|
||
Data has been captured on a number of Apple Watches. | ||
|
||
|
||
Developed by [DataBooth](https://www.databooth.com.au). |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# This file is @generated by PDM. | ||
# Please do not edit it manually. | ||
|
||
altair==4.2.2 | ||
anyio==3.6.2 | ||
appnope==0.1.3 | ||
argon2-cffi==21.3.0 | ||
argon2-cffi-bindings==21.2.0 | ||
arrow==1.2.3 | ||
asttokens==2.2.1 | ||
attrs==23.1.0 | ||
backcall==0.2.0 | ||
beautifulsoup4==4.12.2 | ||
bleach==6.0.0 | ||
blinker==1.6.2 | ||
branca==0.6.0 | ||
cachetools==5.3.0 | ||
certifi==2023.5.7 | ||
cffi==1.15.1 | ||
charset-normalizer==3.1.0 | ||
click==8.1.3 | ||
comm==0.1.3 | ||
debugpy==1.6.7 | ||
decorator==5.1.1 | ||
defusedxml==0.7.1 | ||
entrypoints==0.4 | ||
executing==1.2.0 | ||
fastjsonschema==2.16.3 | ||
folium==0.14.0 | ||
fqdn==1.5.1 | ||
gitdb==4.0.10 | ||
gitpython==3.1.31 | ||
idna==3.4 | ||
importlib-metadata==6.6.0 | ||
ipykernel==6.23.0 | ||
ipython==8.13.2 | ||
ipython-genutils==0.2.0 | ||
isoduration==20.11.0 | ||
jedi==0.18.2 | ||
jinja2==3.1.2 | ||
jsonpointer==2.3 | ||
jsonschema==4.17.3 | ||
jupyter-client==8.2.0 | ||
jupyter-core==5.3.0 | ||
jupyter-events==0.6.3 | ||
jupyter-server==2.5.0 | ||
jupyter-server-terminals==0.4.4 | ||
jupyterlab-pygments==0.2.2 | ||
markdown-it-py==2.2.0 | ||
MarkupSafe==2.1.2 | ||
matplotlib-inline==0.1.6 | ||
mdurl==0.1.2 | ||
mistune==2.0.5 | ||
nbclassic==1.0.0 | ||
nbclient==0.7.4 | ||
nbconvert==7.4.0 | ||
nbformat==5.8.0 | ||
nest-asyncio==1.5.6 | ||
notebook==6.5.4 | ||
notebook-shim==0.2.3 | ||
numpy==1.24.3 | ||
packaging==23.1 | ||
pandas==2.0.1 | ||
pandocfilters==1.5.0 | ||
parso==0.8.3 | ||
pexpect==4.8.0 | ||
pickleshare==0.7.5 | ||
Pillow==9.5.0 | ||
platformdirs==3.5.1 | ||
prometheus-client==0.16.0 | ||
prompt-toolkit==3.0.38 | ||
protobuf==3.20.3 | ||
psutil==5.9.5 | ||
ptyprocess==0.7.0 | ||
pure-eval==0.2.2 | ||
pyarrow==12.0.0 | ||
pycparser==2.21 | ||
pydeck==0.8.1b0 | ||
pygments==2.15.1 | ||
pympler==1.0.1 | ||
pyrsistent==0.19.3 | ||
python-dateutil==2.8.2 | ||
python-json-logger==2.0.7 | ||
pytz==2023.3 | ||
pyyaml==6.0 | ||
pyzmq==25.0.2 | ||
requests==2.30.0 | ||
rfc3339-validator==0.1.4 | ||
rfc3986-validator==0.1.1 | ||
rich==13.3.5 | ||
Send2Trash==1.8.2 | ||
six==1.16.0 | ||
smmap==5.0.0 | ||
sniffio==1.3.0 | ||
soupsieve==2.4.1 | ||
stack-data==0.6.2 | ||
streamlit==1.22.0 | ||
streamlit-folium==0.11.1 | ||
tenacity==8.2.2 | ||
terminado==0.17.1 | ||
tinycss2==1.2.1 | ||
toml==0.10.2 | ||
toolz==0.12.0 | ||
tornado==6.3.2 | ||
traitlets==5.9.0 | ||
typing-extensions==4.5.0 | ||
tzdata==2023.3 | ||
tzlocal==5.0 | ||
uri-template==1.2.0 | ||
urllib3==2.0.2 | ||
validators==0.20.0 | ||
watchdog==3.0.0 | ||
wcwidth==0.2.6 | ||
webcolors==1.13 | ||
webencodings==0.5.1 | ||
websocket-client==1.5.1 | ||
zipp==3.15.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from pathlib import Path | ||
|
||
import tomli as tomllib | ||
from IPython.display import Markdown, display | ||
from streamlit import cache_data, markdown | ||
|
||
|
||
@cache_data | ||
def st_read_markdown_file(markdown_file): | ||
return Path(markdown_file).read_text() | ||
|
||
|
||
def read_markdown_file(markdown_file): | ||
return Path(markdown_file).read_text() | ||
|
||
|
||
def read_render_markdown_file(markdown_file, output="jupyter"): | ||
if output == "jupyter": | ||
try: | ||
md_text = read_markdown_file(markdown_file) | ||
display(Markdown(md_text)) | ||
except Exception: | ||
print(f"Error with markdown file: {markdown_file}") | ||
return None | ||
else: | ||
try: | ||
md_text = st_read_markdown_file(markdown_file) | ||
markdown(md_text, unsafe_allow_html=True) | ||
except Exception: | ||
print(f"Error with markdown file: {markdown_file}") | ||
return None | ||
|
||
|
||
@cache_data | ||
def read_toml_file(toml_file="./src/app_config.toml"): | ||
with open(toml_file, "rb") as f: | ||
toml = tomllib.load(f) | ||
return toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from helper_functions import read_render_markdown_file | ||
|
||
read_render_markdown_file("docs/about.md", "streamlit") |