Skip to content

Commit

Permalink
Merge pull request #20 from oislen/dev
Browse files Browse the repository at this point in the history
#12 Dashboard / Playwright Directory Separation
  • Loading branch information
oislen authored Oct 11, 2024
2 parents bf446fe + 2d324e9 commit 047cf7a
Show file tree
Hide file tree
Showing 37 changed files with 19 additions and 21 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
data/Met_Eireann/arch
scripts/aws_rootkey.py
*__pycache__
*.ipynb_checkpoints
*.xlsx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with unittest
run: |
python -m unittest discover ./scripts/unittests/utilities
python -m unittest discover ./dashboard/unittests/utilities
2 changes: 1 addition & 1 deletion .github/workflows/unittest-main-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with unittest
run: |
python -m unittest discover ./scripts/unittests/utilities
python -m unittest discover ./dashboard/unittests/utilities
2 changes: 1 addition & 1 deletion .github/workflows/unittest-main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with unittest
run: |
python -m unittest discover ./scripts/unittests/utilities
python -m unittest discover ./dashboard/unittests/utilities
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# ignore sub repos
data/Met_Eireann/arch
scripts/aws_rootkey.py
*__pycache__
*.ipynb_checkpoints
*.xlsx
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ ENV PATH="/opt/venv/bin:$PATH"
RUN /opt/venv/bin/python3 -m pip install -v -r /home/ubuntu/IrishClimateDashboard/requirements.txt

WORKDIR /home/${user}/IrishClimateDashboard
CMD ["bokeh", "serve","scripts/bokeh_dash_app.py"]
CMD ["bokeh", "serve","dashboard/bokeh_dash_app.py"]
2 changes: 1 addition & 1 deletion aws/linux_docker_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ cd /home/ubuntu/IrishClimateDashboard
sudo yum install -y python3 python3-pip
python3 -m pip install -v -r /home/ubuntu/IrishClimateDashboard/requirements.txt
# run bokeh app
bokeh serve /home/ubuntu/IrishClimateDashboard/scripts/bokeh_dash_app.py --allow-websocket-origin=*.*.*.*:5006
bokeh serve /home/ubuntu/IrishClimateDashboard/dashboard/bokeh_dash_app.py --allow-websocket-origin=*.*.*.*:5006
# http://34.243.42.137:5006/bokeh_dash_app

#-- Pull and Run Docker Contianer --#
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pandas as pd
from datetime import datetime, timedelta

sys.path.append(os.path.join(os.getcwd(), "scripts"))
sys.path.append(os.path.join(os.getcwd(), "dashboard"))

import cons

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import unittest
import numpy as np

sys.path.append(os.path.join(os.getcwd(), "scripts"))
sys.path.append(os.path.join(os.getcwd(), "dashboard"))

import cons
from unittests.gen_unittest_data import gen_unittest_data
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion exeBokehApp.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
call bokeh serve scripts\bokeh_dash_app.py
call bokeh serve dashboard\bokeh_dash_app.py
2 changes: 1 addition & 1 deletion exeBokehApp.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bokeh serve scripts/bokeh_dash_app.py
bokeh serve dashboard/bokeh_dash_app.py
2 changes: 1 addition & 1 deletion exePreProcessData.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
call python scripts\prg_preprocess_data.py
call python dashboard\prg_preprocess_data.py
2 changes: 1 addition & 1 deletion exeUnittests.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
call python -m unittest discover scripts\unittests\utilities
call python -m unittest discover dashboard\unittests\utilities
2 changes: 1 addition & 1 deletion exeUnittests.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python3 -m unittest discover scripts/unittests/utilities
python3 -m unittest discover dashboard/unittests/utilities
4 changes: 2 additions & 2 deletions notebooks/AppDevelopment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"source": [
"# add relevant paths\n",
"ica_dir = os.path.dirname(os.getcwd())\n",
"scripts_dir = os.path.join(ica_dir, \"scripts\")\n",
"dashboard_dir = os.path.join(ica_dir, \"dashboard\")\n",
"sys.path.append(ica_dir)\n",
"sys.path.append(scripts_dir)"
"sys.path.append(dashboard_dir)"
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions notebooks/IrishClimateApp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"import platform\n",
"# add relevant paths\n",
"ica_dir = os.path.dirname(os.getcwd())\n",
"scripts_dir = os.path.join(ica_dir, \"scripts\")\n",
"dashboard_dir = os.path.join(ica_dir, \"dashboard\")\n",
"sys.path.append(ica_dir)\n",
"sys.path.append(scripts_dir)\n",
"import scripts.cons as cons\n",
"from scripts.utilities.run_cmd import run_cmd\n",
"sys.path.append(dashboard_dir)\n",
"import dashboard.cons as cons\n",
"from dashboard.utilities.run_cmd import run_cmd\n",
"from IPython.display import IFrame"
]
},
Expand All @@ -39,7 +39,7 @@
"# determine operating system and relevant execution command\n",
"cmd = cons.bat_execBokehApp if platform.system() == 'Windows' else cons.sh_execBokehApp\n",
"# set the surrent working directory\n",
"cwd = os.path.join(os.path.dirname(os.getcwd()), 'scripts')\n",
"cwd = os.path.join(os.path.dirname(os.getcwd()), 'dashboard')\n",
"run_cmd(cmd, cwd)"
]
},
Expand Down

0 comments on commit 047cf7a

Please sign in to comment.