From 2d324e9a7e3c6d6dd950d4e2158a64b17269dc5f Mon Sep 17 00:00:00 2001 From: Oisin Date: Fri, 11 Oct 2024 07:45:37 +0100 Subject: [PATCH] Renamed dashboard scripts to dashboard, to distinguish with playwright webscraper scripts --- .dockerignore | 1 - .github/workflows/unittest-dev.yml | 2 +- .github/workflows/unittest-main-pr.yml | 2 +- .github/workflows/unittest-main-push.yml | 2 +- .gitignore | 1 - Dockerfile | 2 +- aws/linux_docker_setup.sh | 2 +- {scripts => dashboard}/BokehApp/bokeh_line_dash.py | 0 {scripts => dashboard}/BokehApp/bokeh_line_data.py | 0 {scripts => dashboard}/BokehApp/bokeh_line_plot.py | 0 {scripts => dashboard}/BokehApp/bokeh_map_dash.py | 0 {scripts => dashboard}/BokehApp/bokeh_map_data.py | 0 {scripts => dashboard}/BokehApp/bokeh_map_plot.py | 0 .../PreProcessData/gen_counties_data.py | 0 .../PreProcessData/gen_master_data.py | 0 .../PreProcessData/gen_preaggregate_data.py | 0 .../PreProcessData/gen_stations_data.py | 0 {scripts => dashboard}/SeaBornPlots/map_plot.py | 0 {scripts => dashboard}/SeaBornPlots/time_plot.py | 0 {scripts => dashboard}/arch/01_download_gis_data.py | 0 {scripts => dashboard}/arch/url_data_download.py | 0 {scripts => dashboard}/bokeh_dash_app.py | 0 {scripts => dashboard}/cons.py | 0 {scripts => dashboard}/prg_preprocess_data.py | 0 {scripts => dashboard}/unittests/gen_unittest_data.py | 2 +- .../unittests/utilities/test_time_data.py | 2 +- {scripts => dashboard}/utilities/gen_boto3_excel.py | 0 {scripts => dashboard}/utilities/run_cmd.py | 0 {scripts => dashboard}/utilities/time_data.py | 0 {scripts => dashboard}/utilities/timeit.py | 0 exeBokehApp.bat | 2 +- exeBokehApp.sh | 2 +- exePreProcessData.bat | 2 +- exeUnittests.bat | 2 +- exeUnittests.sh | 2 +- notebooks/AppDevelopment.ipynb | 4 ++-- notebooks/IrishClimateApp.ipynb | 10 +++++----- 37 files changed, 19 insertions(+), 21 deletions(-) rename {scripts => dashboard}/BokehApp/bokeh_line_dash.py (100%) rename {scripts => dashboard}/BokehApp/bokeh_line_data.py (100%) rename {scripts => dashboard}/BokehApp/bokeh_line_plot.py (100%) rename {scripts => dashboard}/BokehApp/bokeh_map_dash.py (100%) rename {scripts => dashboard}/BokehApp/bokeh_map_data.py (100%) rename {scripts => dashboard}/BokehApp/bokeh_map_plot.py (100%) rename {scripts => dashboard}/PreProcessData/gen_counties_data.py (100%) rename {scripts => dashboard}/PreProcessData/gen_master_data.py (100%) rename {scripts => dashboard}/PreProcessData/gen_preaggregate_data.py (100%) rename {scripts => dashboard}/PreProcessData/gen_stations_data.py (100%) rename {scripts => dashboard}/SeaBornPlots/map_plot.py (100%) rename {scripts => dashboard}/SeaBornPlots/time_plot.py (100%) rename {scripts => dashboard}/arch/01_download_gis_data.py (100%) rename {scripts => dashboard}/arch/url_data_download.py (100%) rename {scripts => dashboard}/bokeh_dash_app.py (100%) rename {scripts => dashboard}/cons.py (100%) rename {scripts => dashboard}/prg_preprocess_data.py (100%) rename {scripts => dashboard}/unittests/gen_unittest_data.py (96%) rename {scripts => dashboard}/unittests/utilities/test_time_data.py (95%) rename {scripts => dashboard}/utilities/gen_boto3_excel.py (100%) rename {scripts => dashboard}/utilities/run_cmd.py (100%) rename {scripts => dashboard}/utilities/time_data.py (100%) rename {scripts => dashboard}/utilities/timeit.py (100%) diff --git a/.dockerignore b/.dockerignore index 8d736fd..a07577b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,4 @@ data/Met_Eireann/arch -scripts/aws_rootkey.py *__pycache__ *.ipynb_checkpoints *.xlsx diff --git a/.github/workflows/unittest-dev.yml b/.github/workflows/unittest-dev.yml index ce82f78..b5c4587 100644 --- a/.github/workflows/unittest-dev.yml +++ b/.github/workflows/unittest-dev.yml @@ -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 diff --git a/.github/workflows/unittest-main-pr.yml b/.github/workflows/unittest-main-pr.yml index 1ffe460..2ed208b 100644 --- a/.github/workflows/unittest-main-pr.yml +++ b/.github/workflows/unittest-main-pr.yml @@ -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 diff --git a/.github/workflows/unittest-main-push.yml b/.github/workflows/unittest-main-push.yml index 03327ff..3f0d65c 100644 --- a/.github/workflows/unittest-main-push.yml +++ b/.github/workflows/unittest-main-push.yml @@ -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 diff --git a/.gitignore b/.gitignore index ac73952..efb4b99 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # ignore sub repos data/Met_Eireann/arch -scripts/aws_rootkey.py *__pycache__ *.ipynb_checkpoints *.xlsx diff --git a/Dockerfile b/Dockerfile index 5fc246b..5902b95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file +CMD ["bokeh", "serve","dashboard/bokeh_dash_app.py"] \ No newline at end of file diff --git a/aws/linux_docker_setup.sh b/aws/linux_docker_setup.sh index af8ccd1..8488bbe 100644 --- a/aws/linux_docker_setup.sh +++ b/aws/linux_docker_setup.sh @@ -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 --# diff --git a/scripts/BokehApp/bokeh_line_dash.py b/dashboard/BokehApp/bokeh_line_dash.py similarity index 100% rename from scripts/BokehApp/bokeh_line_dash.py rename to dashboard/BokehApp/bokeh_line_dash.py diff --git a/scripts/BokehApp/bokeh_line_data.py b/dashboard/BokehApp/bokeh_line_data.py similarity index 100% rename from scripts/BokehApp/bokeh_line_data.py rename to dashboard/BokehApp/bokeh_line_data.py diff --git a/scripts/BokehApp/bokeh_line_plot.py b/dashboard/BokehApp/bokeh_line_plot.py similarity index 100% rename from scripts/BokehApp/bokeh_line_plot.py rename to dashboard/BokehApp/bokeh_line_plot.py diff --git a/scripts/BokehApp/bokeh_map_dash.py b/dashboard/BokehApp/bokeh_map_dash.py similarity index 100% rename from scripts/BokehApp/bokeh_map_dash.py rename to dashboard/BokehApp/bokeh_map_dash.py diff --git a/scripts/BokehApp/bokeh_map_data.py b/dashboard/BokehApp/bokeh_map_data.py similarity index 100% rename from scripts/BokehApp/bokeh_map_data.py rename to dashboard/BokehApp/bokeh_map_data.py diff --git a/scripts/BokehApp/bokeh_map_plot.py b/dashboard/BokehApp/bokeh_map_plot.py similarity index 100% rename from scripts/BokehApp/bokeh_map_plot.py rename to dashboard/BokehApp/bokeh_map_plot.py diff --git a/scripts/PreProcessData/gen_counties_data.py b/dashboard/PreProcessData/gen_counties_data.py similarity index 100% rename from scripts/PreProcessData/gen_counties_data.py rename to dashboard/PreProcessData/gen_counties_data.py diff --git a/scripts/PreProcessData/gen_master_data.py b/dashboard/PreProcessData/gen_master_data.py similarity index 100% rename from scripts/PreProcessData/gen_master_data.py rename to dashboard/PreProcessData/gen_master_data.py diff --git a/scripts/PreProcessData/gen_preaggregate_data.py b/dashboard/PreProcessData/gen_preaggregate_data.py similarity index 100% rename from scripts/PreProcessData/gen_preaggregate_data.py rename to dashboard/PreProcessData/gen_preaggregate_data.py diff --git a/scripts/PreProcessData/gen_stations_data.py b/dashboard/PreProcessData/gen_stations_data.py similarity index 100% rename from scripts/PreProcessData/gen_stations_data.py rename to dashboard/PreProcessData/gen_stations_data.py diff --git a/scripts/SeaBornPlots/map_plot.py b/dashboard/SeaBornPlots/map_plot.py similarity index 100% rename from scripts/SeaBornPlots/map_plot.py rename to dashboard/SeaBornPlots/map_plot.py diff --git a/scripts/SeaBornPlots/time_plot.py b/dashboard/SeaBornPlots/time_plot.py similarity index 100% rename from scripts/SeaBornPlots/time_plot.py rename to dashboard/SeaBornPlots/time_plot.py diff --git a/scripts/arch/01_download_gis_data.py b/dashboard/arch/01_download_gis_data.py similarity index 100% rename from scripts/arch/01_download_gis_data.py rename to dashboard/arch/01_download_gis_data.py diff --git a/scripts/arch/url_data_download.py b/dashboard/arch/url_data_download.py similarity index 100% rename from scripts/arch/url_data_download.py rename to dashboard/arch/url_data_download.py diff --git a/scripts/bokeh_dash_app.py b/dashboard/bokeh_dash_app.py similarity index 100% rename from scripts/bokeh_dash_app.py rename to dashboard/bokeh_dash_app.py diff --git a/scripts/cons.py b/dashboard/cons.py similarity index 100% rename from scripts/cons.py rename to dashboard/cons.py diff --git a/scripts/prg_preprocess_data.py b/dashboard/prg_preprocess_data.py similarity index 100% rename from scripts/prg_preprocess_data.py rename to dashboard/prg_preprocess_data.py diff --git a/scripts/unittests/gen_unittest_data.py b/dashboard/unittests/gen_unittest_data.py similarity index 96% rename from scripts/unittests/gen_unittest_data.py rename to dashboard/unittests/gen_unittest_data.py index b4c61d9..230bec5 100644 --- a/scripts/unittests/gen_unittest_data.py +++ b/dashboard/unittests/gen_unittest_data.py @@ -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 diff --git a/scripts/unittests/utilities/test_time_data.py b/dashboard/unittests/utilities/test_time_data.py similarity index 95% rename from scripts/unittests/utilities/test_time_data.py rename to dashboard/unittests/utilities/test_time_data.py index 192bfe0..aa22423 100644 --- a/scripts/unittests/utilities/test_time_data.py +++ b/dashboard/unittests/utilities/test_time_data.py @@ -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 diff --git a/scripts/utilities/gen_boto3_excel.py b/dashboard/utilities/gen_boto3_excel.py similarity index 100% rename from scripts/utilities/gen_boto3_excel.py rename to dashboard/utilities/gen_boto3_excel.py diff --git a/scripts/utilities/run_cmd.py b/dashboard/utilities/run_cmd.py similarity index 100% rename from scripts/utilities/run_cmd.py rename to dashboard/utilities/run_cmd.py diff --git a/scripts/utilities/time_data.py b/dashboard/utilities/time_data.py similarity index 100% rename from scripts/utilities/time_data.py rename to dashboard/utilities/time_data.py diff --git a/scripts/utilities/timeit.py b/dashboard/utilities/timeit.py similarity index 100% rename from scripts/utilities/timeit.py rename to dashboard/utilities/timeit.py diff --git a/exeBokehApp.bat b/exeBokehApp.bat index 02ee245..95cc587 100644 --- a/exeBokehApp.bat +++ b/exeBokehApp.bat @@ -1 +1 @@ -call bokeh serve scripts\bokeh_dash_app.py \ No newline at end of file +call bokeh serve dashboard\bokeh_dash_app.py \ No newline at end of file diff --git a/exeBokehApp.sh b/exeBokehApp.sh index 5ea7ffc..dbbecad 100644 --- a/exeBokehApp.sh +++ b/exeBokehApp.sh @@ -1 +1 @@ -bokeh serve scripts/bokeh_dash_app.py \ No newline at end of file +bokeh serve dashboard/bokeh_dash_app.py \ No newline at end of file diff --git a/exePreProcessData.bat b/exePreProcessData.bat index 9a2d7ec..6a117e0 100644 --- a/exePreProcessData.bat +++ b/exePreProcessData.bat @@ -1 +1 @@ -call python scripts\prg_preprocess_data.py \ No newline at end of file +call python dashboard\prg_preprocess_data.py \ No newline at end of file diff --git a/exeUnittests.bat b/exeUnittests.bat index a610cd9..bfb2507 100644 --- a/exeUnittests.bat +++ b/exeUnittests.bat @@ -1 +1 @@ -call python -m unittest discover scripts\unittests\utilities \ No newline at end of file +call python -m unittest discover dashboard\unittests\utilities \ No newline at end of file diff --git a/exeUnittests.sh b/exeUnittests.sh index e8fbc3e..22b40bb 100644 --- a/exeUnittests.sh +++ b/exeUnittests.sh @@ -1 +1 @@ -python3 -m unittest discover scripts/unittests/utilities \ No newline at end of file +python3 -m unittest discover dashboard/unittests/utilities \ No newline at end of file diff --git a/notebooks/AppDevelopment.ipynb b/notebooks/AppDevelopment.ipynb index eb832fa..f4aa6bc 100644 --- a/notebooks/AppDevelopment.ipynb +++ b/notebooks/AppDevelopment.ipynb @@ -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)" ] }, { diff --git a/notebooks/IrishClimateApp.ipynb b/notebooks/IrishClimateApp.ipynb index ed1f979..e1d8558 100644 --- a/notebooks/IrishClimateApp.ipynb +++ b/notebooks/IrishClimateApp.ipynb @@ -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" ] }, @@ -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)" ] },