From 9e941e73758d93e3e4dd96fe268b1c45bf851842 Mon Sep 17 00:00:00 2001 From: Francesco Benincasa Date: Tue, 13 Dec 2022 01:47:49 +0100 Subject: [PATCH 1/5] Added __version__ in __init__.py and removed debug flag --- __init__.py | 1 + data_handler.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 __init__.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..38c8204 --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +__version__ = 0.3.0 diff --git a/data_handler.py b/data_handler.py index da3b67a..0d1cdd7 100644 --- a/data_handler.py +++ b/data_handler.py @@ -32,7 +32,7 @@ from utils import get_colorscale DIR_PATH = os.path.dirname(os.path.realpath(__file__)) -DEBUG = True # False +DEBUG = False COLORS = ['#ffffff', '#a1ede3', '#5ce3ba', '#fcd775', '#da7230', '#9e6226', '#714921', '#392511', '#1d1309'] -- GitLab From 8d8002d60d97b6d734c8c597522720b23efca8f6 Mon Sep 17 00:00:00 2001 From: Francesco Date: Wed, 14 Dec 2022 00:52:22 +0100 Subject: [PATCH 2/5] Updated CSS with /daily_dashboard prefix for assets, fixed issue in nc_checker for variable name, moved dates to production ones, and remove fullscreen feature --- assets/sidebar.css | 6 +++--- bin/nc_checker.py | 2 +- conf/dates.json | 2 +- dash_server.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/sidebar.css b/assets/sidebar.css index f12becb..839d9db 100644 --- a/assets/sidebar.css +++ b/assets/sidebar.css @@ -209,7 +209,7 @@ /* Info button on the sidebar bottom */ .sidebar-bottom #info-button { - background-image: url("assets/images/Icon_Info.png"); + background-image: url("/daily_dashboard/assets/images/Icon_Info.png"); background-position: center; width: 52px !important; height: 52px !important; @@ -217,7 +217,7 @@ /* Download button on the sidebar bottom */ .sidebar-bottom #download-button { - background-image: url("assets/images/Icon_Download.png"); + background-image: url("/daily_dashboard/assets/images/Icon_Download.png"); background-position: 1rem; background-color: #2B383E; padding-left: 2rem; @@ -272,7 +272,7 @@ span>#was-apply { */ .sidebar-bottom .card-text>.download-section { - background-image: url("assets/images/download.svg"); + background-image: url("/daily_dashboard/assets/images/download.svg"); background-repeat: no-repeat; background-position: 0.5rem; background-color: lightgrey; diff --git a/bin/nc_checker.py b/bin/nc_checker.py index 43c0ebd..1858952 100755 --- a/bin/nc_checker.py +++ b/bin/nc_checker.py @@ -176,7 +176,7 @@ class NCChecker(object): if varname not in NO_CHECK_VARS: var = self.nc_file.variables[varname] mvalname = hasattr(var, 'missing_value') and 'missing_value' or '_FillValue' - VALID_RANGES[varname]['mvalname'] = mvalname + VALID_RANGES[varname.lower()]['mvalname'] = mvalname if self.var_proc(varname) != 0: self.nc_file.close() diff --git a/conf/dates.json b/conf/dates.json index a1a3b83..8fb17c4 120000 --- a/conf/dates.json +++ b/conf/dates.json @@ -1 +1 @@ -dates_dev.json \ No newline at end of file +dates_prod.json \ No newline at end of file diff --git a/dash_server.py b/dash_server.py index 44f082e..6e781eb 100755 --- a/dash_server.py +++ b/dash_server.py @@ -41,7 +41,7 @@ import socket HOSTNAME = socket.gethostbyname_ex(socket.gethostname())[0] -if HOSTNAME in ('bscesdust03.bsc.es', 'pre-sds-was'): +if HOSTNAME in ('bscesdust03.bsc.es', 'dust'): pathname = '/daily_dashboard/' else: pathname = '/dashboard/' @@ -143,7 +143,7 @@ app.layout = html.Div( tab_forecast(), tab_evaluation(), tab_observations(), - go_fullscreen(pathname), + # go_fullscreen(pathname), ]), ], className="content", -- GitLab From d3b0acea994747c8b201e8c1e7115d2127650a97 Mon Sep 17 00:00:00 2001 From: Francesco Date: Wed, 14 Dec 2022 00:53:40 +0100 Subject: [PATCH 3/5] Added NOA geojsons directory --- assets/geojsons/NOA | 1 + 1 file changed, 1 insertion(+) create mode 120000 assets/geojsons/NOA diff --git a/assets/geojsons/NOA b/assets/geojsons/NOA new file mode 120000 index 0000000..77890a4 --- /dev/null +++ b/assets/geojsons/NOA @@ -0,0 +1 @@ +/data/products/NOA \ No newline at end of file -- GitLab From f9c1ede2ab7d0ae2d00f20337b18ea13674149f4 Mon Sep 17 00:00:00 2001 From: Francesco Date: Wed, 14 Dec 2022 01:27:35 +0100 Subject: [PATCH 4/5] Added daily_dashboard to js --- js/create_model_loop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/create_model_loop.js b/js/create_model_loop.js index 6bf71af..18dd536 100644 --- a/js/create_model_loop.js +++ b/js/create_model_loop.js @@ -1,6 +1,6 @@ const { Cluster } = require('puppeteer-cluster'); const util = require('util'); -const url = 'http://127.0.0.1:9000/dashboard/' +const url = 'http://127.0.0.1:9000/daily_dashboard/' //const uniqueId = Date.now().toString(36) + Math.random().toString(36).substring(2); // const imageTemplate = '/data/daily_dashboard/comparison/'; // + uniqueId + '_image'; const modelDict = {'od550_dust':'AOD', -- GitLab From 12752a7b6364eecc3a494e5b7dd2180721ec3f73 Mon Sep 17 00:00:00 2001 From: Francesco Benincasa Date: Sat, 17 Dec 2022 23:19:30 +0000 Subject: [PATCH 5/5] Added real full AEMET hostname "dust.hqads.aemet.es" to dash_server.py --- dash_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash_server.py b/dash_server.py index 6e781eb..ef20b05 100755 --- a/dash_server.py +++ b/dash_server.py @@ -41,7 +41,7 @@ import socket HOSTNAME = socket.gethostbyname_ex(socket.gethostname())[0] -if HOSTNAME in ('bscesdust03.bsc.es', 'dust'): +if HOSTNAME in ('bscesdust03.bsc.es', 'dust.hqads.aemet.es'): pathname = '/daily_dashboard/' else: pathname = '/dashboard/' -- GitLab