From c14d5740082772bdcbf1e0980c32e24c6a684d00 Mon Sep 17 00:00:00 2001 From: iantei Date: Tue, 12 Mar 2024 13:12:15 -0700 Subject: [PATCH 01/12] Update the new document specifying working with public dashboard. --- .../Working_with_public_dashboard.md | 158 ++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 docs/dev/publicdashboard/Working_with_public_dashboard.md diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md new file mode 100644 index 0000000..46aea47 --- /dev/null +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -0,0 +1,158 @@ +# Note on execution of public dashboard to launch the notebook +First execute `mapping_dictionaries.ipynb` before launching any other notebooks. + +# Test Scenario for Public Dashboard changes: +1. Front end testing + - Make sure the dropdown menu have valid list of metrics. + - Make sure the default charts are loaded at the first instance of loading the website. + - Make sure all the charts are being launched or the error table is displayed. +2. Test with loading and unloading different program/study dataset. + - Load different datasets, run the scripts to execute the notebooks to make sure the charts are being generate properly. Ensure to unload the datasets, and re-load the new dataset. + - Also check with empty MongoDB. +3. After the code has been merged, validate the changes on the Staging. + - Generate a snapshot of the charts from the staging website. + - Request for the dataset for staging-program. + - Validate the changes for both the charts and the Front end aspect. + +# Different docker-compose yml files? +We have two docker-compose yml files, one specifically to aid in running in development mode. Another to run in production - alike mode. + +1. About the `docker-compose.dev.yml` file: + - This is useful in case, you want to launch the Jupyter notebook and execute the code block and explore output of each code blocks. + ``` +services: + notebook-server: + environment: + - DB_HOST=db + - WEB_SERVER_HOST=0.0.0.0 + - CRON_MODE= + - STUDY_CONFIG=stage-program +``` + +To launch docker-compose.dev.yml: +``` +docker-compose -f docker-compose.dev.yml up +``` + +2. About the `docker-compose.yml` file: + - This is useful in case, you want to execute the scripts to run all the required notebooks, without making any changes in the existing notebooks. + - Note: We use cron jobs to execute the different notebooks in a scheduled way daily to generate the charts. + ``` +services: + notebook-server: + environment: + - DB_HOST=db + - WEB_SERVER_HOST=0.0.0.0 + - CRON_MODE=TRUE + - STUDY_CONFIG=stage-program +``` + +To launch docker-compose.yml: +``` +docker-compose -f docker-compose.yml up +``` + + Key difference amongst these two docker-compose file is the `CRON_MODE=TRUE` in case of `docker-compose.yml` while its disabled for `docker-compose.dev.yml`. + +# Changes required in docker-compose.dev.yml and/or docker-compose.yml to load different dataset + +The default `docker-compose.yml` looks like: +``` +services: + notebook-server: + environment: + - DB_HOST=db + - WEB_SERVER_HOST=0.0.0.0 + - CRON_MODE=TRUE + - STUDY_CONFIG=stage-program +``` +This will load the dataset saved in the MongoDB as `Stage_database`. + +What if we want to load a different dataset than staging, and test for a different program/study. +Let us consider the example below: +``` +services: + notebook-server: + environment: + - DB_HOST=mongodb://db/openpath_prod_usaid_laos_ev + - WEB_SERVER_HOST=0.0.0.0 + - CRON_MODE=TRUE + - STUDY_CONFIG=usaid-laos-ev +``` +1. For testing different config: Change the STUDY_CONFIG, as + `STUDY_CONFIG=` + Example: `STUDY_CONFIG=stage-program` +1. Similarly, change the `DB_HOST=` +Example: `DB_HOST=mongodb://db/openpath_prod_usaid_laos_ev` +to load the dataset `openpath_prod_usaid_laos_ev` which has been loaded into the MongoDB. + +# Execution of different public dashboard notebooks automatically (without launching Jupyter notebook) +--- + +``` +$ docker-compose -f docker-compose.yml build +$ docker-compose -f docker-compose.yml up +$ docker ps +$ docker exec -it em-public-dashboard-notebook-server-1 /bin/bash +$ root@06f07def2c0e:/usr/src/app# source setup/activate.sh +$ (emission) root@06f07def2c0e:/usr/src/app# cd saved-notebooks +``` + +Execution of notebooks +``` +$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/update_mappings.py mapping_dictionaries.ipynb +$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py generic_metrics.ipynb default +$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py generic_metrics_sensed.ipynb default +$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py generic_timeseries.ipynb default +$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py mode_specific_metrics.ipynb default +$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py mode_specific_timeseries.ipynb default +$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py energy_calculations.ipynb default +``` +The above script will generate all the charts from all the notebooks. Execute one notebook script at a time. + +Then go to http://localhost:3274/ + +- If you want to test for specific configuration (program/study): +For example, if you want to test for usaid-laos-ev: + http://localhost:3274/?study_config=usaid-laos-ev +and test. + +Note: Make sure the Year and Month parameter for the executing notebook is not None. If it's set to None, it will not generate the charts. + +# Launch and explore the database +``` +$ docker-compose -f docker-compose.yml up +$ docker ps +$ docker exec -it em-public-dashboard-db-1 mongo +$ show dbs +$ use +$ show collections +``` + +Most useful collection: `Stage_analysis_timeseries` + +Better way to explore and modify database: +- Through the Server code + +``` +$ docker-compose -f docker-compose.yml up +$ docker ps +$ docker exec -it em-public-dashboard-notebook-server-1 /bin/bash +$ cd emission +``` + +Use scripts and relevant usecases available here to access/update the database. + +# Testing with staging +- Load the snapshot of the dataset into MongoDB. +You may want to use `reset_snapshot_to_ts.py` to reset the timestamp of the dataset to a particular date/time. +- Execute different required notebooks as mentioned above. +- Load the http://localhost:3274/ +- Access the staging website and validate changes against: https://openpath-stage.nrel.gov/public/ + +Test the dropdown of metrics using different `study_config` as show below for `ebikegj` +https://openpath-stage.nrel.gov/public/?study_config=ebikegj + +# Existing issue with browser caching the old chart data +- While testing the changes, it's a good idea to clear up the cache and reload the webpage to make sure the latest charts are loaded. +- Always better to validate the changes via. the timestamp under the charts and the timestamp of generation of charts. \ No newline at end of file From 9a85c62b3c342b6a5fe864df01dd7abd12da9275 Mon Sep 17 00:00:00 2001 From: iantei Date: Wed, 13 Mar 2024 19:27:14 -0700 Subject: [PATCH 02/12] Update the re-loading dataset instruction in new line. --- docs/dev/publicdashboard/Working_with_public_dashboard.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md index 46aea47..90887d6 100644 --- a/docs/dev/publicdashboard/Working_with_public_dashboard.md +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -7,7 +7,8 @@ First execute `mapping_dictionaries.ipynb` before launching any other notebooks. - Make sure the default charts are loaded at the first instance of loading the website. - Make sure all the charts are being launched or the error table is displayed. 2. Test with loading and unloading different program/study dataset. - - Load different datasets, run the scripts to execute the notebooks to make sure the charts are being generate properly. Ensure to unload the datasets, and re-load the new dataset. + - Load different datasets, run the scripts to execute the notebooks to make sure the charts are being generate properly. + - Between datasets, drop the old dataset and load the new dataset. - Also check with empty MongoDB. 3. After the code has been merged, validate the changes on the Staging. - Generate a snapshot of the charts from the staging website. From 3909eb2ac1abeeed0f853b4c40ce0e98b2c061f4 Mon Sep 17 00:00:00 2001 From: iantei Date: Tue, 19 Mar 2024 10:45:44 -0700 Subject: [PATCH 03/12] 1. Removed charts which could be obsolete in future. Added reference to crontab folder from em-public dashboard. 2. Added note to update once issue #1048 is checked in. 3. Removed instructions to use mongodb directly. --- .../Working_with_public_dashboard.md | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md index 90887d6..9176dd2 100644 --- a/docs/dev/publicdashboard/Working_with_public_dashboard.md +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -70,7 +70,8 @@ services: This will load the dataset saved in the MongoDB as `Stage_database`. What if we want to load a different dataset than staging, and test for a different program/study. -Let us consider the example below: +Let us consider the example below: +(Note: This might need to updated once https://github.com/e-mission/e-mission-docs/issues/1048 issue is checked-in.) ``` services: notebook-server: @@ -103,13 +104,8 @@ Execution of notebooks ``` $ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/update_mappings.py mapping_dictionaries.ipynb $ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py generic_metrics.ipynb default -$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py generic_metrics_sensed.ipynb default -$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py generic_timeseries.ipynb default -$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py mode_specific_metrics.ipynb default -$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py mode_specific_timeseries.ipynb default -$ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py energy_calculations.ipynb default ``` -The above script will generate all the charts from all the notebooks. Execute one notebook script at a time. +Refer to additional charts from https://github.com/e-mission/em-public-dashboard/blob/main/viz_scripts/docker/crontab Then go to http://localhost:3274/ @@ -121,18 +117,7 @@ and test. Note: Make sure the Year and Month parameter for the executing notebook is not None. If it's set to None, it will not generate the charts. # Launch and explore the database -``` -$ docker-compose -f docker-compose.yml up -$ docker ps -$ docker exec -it em-public-dashboard-db-1 mongo -$ show dbs -$ use -$ show collections -``` - -Most useful collection: `Stage_analysis_timeseries` -Better way to explore and modify database: - Through the Server code ``` From c9e83f9ecb23fae121861f27596615c9a6a72a4c Mon Sep 17 00:00:00 2001 From: iantei Date: Tue, 19 Mar 2024 10:50:56 -0700 Subject: [PATCH 04/12] Update from charts to notebooks to reference from crontab. --- docs/dev/publicdashboard/Working_with_public_dashboard.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md index 9176dd2..f022e1a 100644 --- a/docs/dev/publicdashboard/Working_with_public_dashboard.md +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -71,7 +71,7 @@ This will load the dataset saved in the MongoDB as `Stage_database`. What if we want to load a different dataset than staging, and test for a different program/study. Let us consider the example below: -(Note: This might need to updated once https://github.com/e-mission/e-mission-docs/issues/1048 issue is checked-in.) +- (Note: This might need to updated once https://github.com/e-mission/e-mission-docs/issues/1048 issue is checked-in.) ``` services: notebook-server: @@ -105,7 +105,7 @@ Execution of notebooks $ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/update_mappings.py mapping_dictionaries.ipynb $ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py generic_metrics.ipynb default ``` -Refer to additional charts from https://github.com/e-mission/em-public-dashboard/blob/main/viz_scripts/docker/crontab +Refer to additional notebooks from https://github.com/e-mission/em-public-dashboard/blob/main/viz_scripts/docker/crontab Then go to http://localhost:3274/ From 4942907b32c15250aeea287fdb3b568eda5b9181 Mon Sep 17 00:00:00 2001 From: iantei Date: Sun, 24 Mar 2024 11:23:42 -0700 Subject: [PATCH 05/12] Removed instruction block referring to the loading of different dataset with changes in docker-compose file. --- .../Working_with_public_dashboard.md | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md index f022e1a..ca21789 100644 --- a/docs/dev/publicdashboard/Working_with_public_dashboard.md +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -55,39 +55,6 @@ docker-compose -f docker-compose.yml up Key difference amongst these two docker-compose file is the `CRON_MODE=TRUE` in case of `docker-compose.yml` while its disabled for `docker-compose.dev.yml`. -# Changes required in docker-compose.dev.yml and/or docker-compose.yml to load different dataset - -The default `docker-compose.yml` looks like: -``` -services: - notebook-server: - environment: - - DB_HOST=db - - WEB_SERVER_HOST=0.0.0.0 - - CRON_MODE=TRUE - - STUDY_CONFIG=stage-program -``` -This will load the dataset saved in the MongoDB as `Stage_database`. - -What if we want to load a different dataset than staging, and test for a different program/study. -Let us consider the example below: -- (Note: This might need to updated once https://github.com/e-mission/e-mission-docs/issues/1048 issue is checked-in.) -``` -services: - notebook-server: - environment: - - DB_HOST=mongodb://db/openpath_prod_usaid_laos_ev - - WEB_SERVER_HOST=0.0.0.0 - - CRON_MODE=TRUE - - STUDY_CONFIG=usaid-laos-ev -``` -1. For testing different config: Change the STUDY_CONFIG, as - `STUDY_CONFIG=` - Example: `STUDY_CONFIG=stage-program` -1. Similarly, change the `DB_HOST=` -Example: `DB_HOST=mongodb://db/openpath_prod_usaid_laos_ev` -to load the dataset `openpath_prod_usaid_laos_ev` which has been loaded into the MongoDB. - # Execution of different public dashboard notebooks automatically (without launching Jupyter notebook) --- From 731478d202eb10f26701ede8965eb67f6b80ebee Mon Sep 17 00:00:00 2001 From: iantei Date: Mon, 25 Mar 2024 10:10:54 -0700 Subject: [PATCH 06/12] Showcase how to change the values for DB_HOST and STUDY_CONFIG. --- .../Working_with_public_dashboard.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md index ca21789..81a9d61 100644 --- a/docs/dev/publicdashboard/Working_with_public_dashboard.md +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -55,6 +55,26 @@ docker-compose -f docker-compose.yml up Key difference amongst these two docker-compose file is the `CRON_MODE=TRUE` in case of `docker-compose.yml` while its disabled for `docker-compose.dev.yml`. + # Changes required in docker-compose.dev.yml and/or docker-compose.yml to load different dataset + +The default `docker-compose.yml` with DB_HOST=db will load the dataset in MongoDB stored as `Stage_database`. + +What if we want to load a different dataset than staging, and test for a different program/study? +Let us consider the example below: +- (Note: This might need to updated once https://github.com/e-mission/e-mission-docs/issues/1048 issue is checked-in.) +``` +services: + notebook-server: + environment: + - DB_HOST=mongodb://db/openpath_prod_usaid_laos_ev + - .... + - STUDY_CONFIG=usaid-laos-ev +``` +1. For testing different config: Change the STUDY_CONFIG, as `STUDY_CONFIG=`. + Example: `STUDY_CONFIG=usaid-laos-ev` for the `usaid-laos-ev` study. List of other configs for study/program are accessible from: https://github.com/e-mission/nrel-openpath-deploy-configs/tree/main/configs +1. Similarly, change the `DB_HOST=`. +Example: `DB_HOST=mongodb://db/openpath_prod_usaid_laos_ev` to load the dataset `openpath_prod_usaid_laos_ev` which has been loaded into the MongoDB. + # Execution of different public dashboard notebooks automatically (without launching Jupyter notebook) --- From 6ba33c2eecf64aa6d92eba1c4d29bf9d3ce708ff Mon Sep 17 00:00:00 2001 From: iantei Date: Tue, 9 Apr 2024 23:39:07 -0700 Subject: [PATCH 07/12] Fix for the in case, text. --- docs/dev/publicdashboard/Working_with_public_dashboard.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md index 81a9d61..dec08da 100644 --- a/docs/dev/publicdashboard/Working_with_public_dashboard.md +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -19,7 +19,7 @@ First execute `mapping_dictionaries.ipynb` before launching any other notebooks. We have two docker-compose yml files, one specifically to aid in running in development mode. Another to run in production - alike mode. 1. About the `docker-compose.dev.yml` file: - - This is useful in case, you want to launch the Jupyter notebook and execute the code block and explore output of each code blocks. + - This is useful if you want to launch the Jupyter notebook and execute the code block and explore output of each code blocks. ``` services: notebook-server: @@ -36,7 +36,7 @@ docker-compose -f docker-compose.dev.yml up ``` 2. About the `docker-compose.yml` file: - - This is useful in case, you want to execute the scripts to run all the required notebooks, without making any changes in the existing notebooks. + - This is useful if you want to execute the scripts to run all the required notebooks, without making any changes in the existing notebooks. - Note: We use cron jobs to execute the different notebooks in a scheduled way daily to generate the charts. ``` services: From 39d58e10175b73fd0853aeb4bd0713e1eacc96a6 Mon Sep 17 00:00:00 2001 From: iantei Date: Tue, 9 Apr 2024 23:39:39 -0700 Subject: [PATCH 08/12] Change Staging to staging. --- docs/dev/publicdashboard/Working_with_public_dashboard.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md index dec08da..80639d0 100644 --- a/docs/dev/publicdashboard/Working_with_public_dashboard.md +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -10,7 +10,7 @@ First execute `mapping_dictionaries.ipynb` before launching any other notebooks. - Load different datasets, run the scripts to execute the notebooks to make sure the charts are being generate properly. - Between datasets, drop the old dataset and load the new dataset. - Also check with empty MongoDB. -3. After the code has been merged, validate the changes on the Staging. +3. After the code has been merged, validate the changes on the staging. - Generate a snapshot of the charts from the staging website. - Request for the dataset for staging-program. - Validate the changes for both the charts and the Front end aspect. From 00789a8dddd0904dbe62846a79dde28affc5a241 Mon Sep 17 00:00:00 2001 From: iantei Date: Tue, 9 Apr 2024 23:46:13 -0700 Subject: [PATCH 09/12] Show difference btween docker-compose and docker-compose.dev with the code below the description. --- .../Working_with_public_dashboard.md | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md index 80639d0..d92c2f1 100644 --- a/docs/dev/publicdashboard/Working_with_public_dashboard.md +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -20,15 +20,6 @@ We have two docker-compose yml files, one specifically to aid in running in deve 1. About the `docker-compose.dev.yml` file: - This is useful if you want to launch the Jupyter notebook and execute the code block and explore output of each code blocks. - ``` -services: - notebook-server: - environment: - - DB_HOST=db - - WEB_SERVER_HOST=0.0.0.0 - - CRON_MODE= - - STUDY_CONFIG=stage-program -``` To launch docker-compose.dev.yml: ``` @@ -38,23 +29,34 @@ docker-compose -f docker-compose.dev.yml up 2. About the `docker-compose.yml` file: - This is useful if you want to execute the scripts to run all the required notebooks, without making any changes in the existing notebooks. - Note: We use cron jobs to execute the different notebooks in a scheduled way daily to generate the charts. + +To launch docker-compose.yml: +``` +docker-compose -f docker-compose.yml up +``` + + Key difference amongst these two docker-compose file is the `CRON_MODE=TRUE` in case of `docker-compose.yml` while its disabled for `docker-compose.dev.yml`. + + - `docker-compose.yml`: ``` services: notebook-server: environment: - - DB_HOST=db - - WEB_SERVER_HOST=0.0.0.0 - - CRON_MODE=TRUE - - STUDY_CONFIG=stage-program + - .... + - CRON_MODE= + - .... ``` -To launch docker-compose.yml: +- `docker-compose.dev.yml` ``` -docker-compose -f docker-compose.yml up +services: + notebook-server: + environment: + - .... + - CRON_MODE=TRUE + - .... ``` - Key difference amongst these two docker-compose file is the `CRON_MODE=TRUE` in case of `docker-compose.yml` while its disabled for `docker-compose.dev.yml`. - # Changes required in docker-compose.dev.yml and/or docker-compose.yml to load different dataset The default `docker-compose.yml` with DB_HOST=db will load the dataset in MongoDB stored as `Stage_database`. From ae6dbfc7e96b056a33f38c0e0b8c1a2aaf81f742 Mon Sep 17 00:00:00 2001 From: iantei Date: Wed, 10 Apr 2024 18:29:20 -0700 Subject: [PATCH 10/12] Update the Year and Month text to the top setup instruction block. --- docs/dev/publicdashboard/Working_with_public_dashboard.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md index d92c2f1..639eade 100644 --- a/docs/dev/publicdashboard/Working_with_public_dashboard.md +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -1,5 +1,6 @@ # Note on execution of public dashboard to launch the notebook -First execute `mapping_dictionaries.ipynb` before launching any other notebooks. +- First execute `mapping_dictionaries.ipynb` before launching any other notebooks. +- Make sure the `Year` and `Month` parameter for the executing notebook is not `None` while executing the `generate_plots.py` script. If it's set to None, it will not generate the charts. # Test Scenario for Public Dashboard changes: 1. Front end testing @@ -103,8 +104,6 @@ For example, if you want to test for usaid-laos-ev: http://localhost:3274/?study_config=usaid-laos-ev and test. -Note: Make sure the Year and Month parameter for the executing notebook is not None. If it's set to None, it will not generate the charts. - # Launch and explore the database - Through the Server code From 1a01b3da3ab33ea35aba6818ff661fd427b6d7e9 Mon Sep 17 00:00:00 2001 From: iantei Date: Wed, 10 Apr 2024 18:35:44 -0700 Subject: [PATCH 11/12] Changed the instruction for validating Year and Month right before execution of generate_plots.py script --- docs/dev/publicdashboard/Working_with_public_dashboard.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md index 639eade..ed4e36b 100644 --- a/docs/dev/publicdashboard/Working_with_public_dashboard.md +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -1,6 +1,5 @@ # Note on execution of public dashboard to launch the notebook - First execute `mapping_dictionaries.ipynb` before launching any other notebooks. -- Make sure the `Year` and `Month` parameter for the executing notebook is not `None` while executing the `generate_plots.py` script. If it's set to None, it will not generate the charts. # Test Scenario for Public Dashboard changes: 1. Front end testing @@ -89,7 +88,7 @@ $ docker exec -it em-public-dashboard-notebook-server-1 /bin/bash $ root@06f07def2c0e:/usr/src/app# source setup/activate.sh $ (emission) root@06f07def2c0e:/usr/src/app# cd saved-notebooks ``` - +- Note: Make sure the `Year` and `Month` parameter for the executing notebook is not `None` while executing the `generate_plots.py` script. If it's set to None, it will not generate the charts. Execution of notebooks ``` $ (emission) root@06f07def2c0e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/update_mappings.py mapping_dictionaries.ipynb From b9b3e524b2be28c65fae2d877b5b7badef0e4ec9 Mon Sep 17 00:00:00 2001 From: iantei Date: Wed, 17 Apr 2024 12:25:36 -0700 Subject: [PATCH 12/12] Change from staging to staging environment. --- docs/dev/publicdashboard/Working_with_public_dashboard.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev/publicdashboard/Working_with_public_dashboard.md b/docs/dev/publicdashboard/Working_with_public_dashboard.md index ed4e36b..34eb972 100644 --- a/docs/dev/publicdashboard/Working_with_public_dashboard.md +++ b/docs/dev/publicdashboard/Working_with_public_dashboard.md @@ -10,7 +10,7 @@ - Load different datasets, run the scripts to execute the notebooks to make sure the charts are being generate properly. - Between datasets, drop the old dataset and load the new dataset. - Also check with empty MongoDB. -3. After the code has been merged, validate the changes on the staging. +3. After the code has been merged, validate the changes on the staging environment. - Generate a snapshot of the charts from the staging website. - Request for the dataset for staging-program. - Validate the changes for both the charts and the Front end aspect.