From 5c22ccd4553bc1a7e813cd0420208bcacbb66ac2 Mon Sep 17 00:00:00 2001 From: vjterpstra Date: Tue, 11 Jan 2022 17:20:04 -0500 Subject: [PATCH] Release v0.1.1.0 --- CHANGELOG.md | 5 +++- dse_do_dashboard/do_dash_app.py | 7 +++-- .../main_pages/prepare_data_page_edit.py | 2 +- dse_do_dashboard/version.py | 2 +- requirements.txt | 4 +-- setup.py | 2 +- test/fruit_distribution/fruit_dash_app.py | 28 +++++++++---------- test/pharma/pharma_dash_app.py | 28 +++++++++---------- .../scnfo/scnfoscenariodbtables.py | 2 +- 9 files changed, 43 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7921f14..bd92926 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased]## [0.1.1.0b0] +## [Unreleased]## [0.1.1.1b0] + +## [0.1.1.0] - 2022-01-11 ### Changed - Version bump-up to 0.1.1.0 due to many new features - DashApp, DoDashApp `debug` property renamed to `dash_debug` +- HomePageEdit and PrepareDataEdit are default main pages ### Added - HomePage: Scenario duplicate, rename, delete - DoDashApp.db_echo flag for DB connection debugging diff --git a/dse_do_dashboard/do_dash_app.py b/dse_do_dashboard/do_dash_app.py index a54e767..57a8bfe 100644 --- a/dse_do_dashboard/do_dash_app.py +++ b/dse_do_dashboard/do_dash_app.py @@ -4,6 +4,9 @@ from typing import Dict, List, Optional import pandas as pd + +from dse_do_dashboard.main_pages.home_page_edit import HomePageEdit +from dse_do_dashboard.main_pages.prepare_data_page_edit import PrepareDataPageEdit from dse_do_utils import DataManager from dse_do_utils.scenariodbmanager import ScenarioDbManager @@ -138,8 +141,8 @@ def create_main_pages(self) -> List[MainPage]: Can be overridden to replace by subclasses (not typical). """ main_pages = [ - HomePage(self), - PrepareDataPage(self), + HomePageEdit(self), + PrepareDataPageEdit(self), RunModelPage(self), ExploreSolutionPage(self), VisualizationTabsPage(self) diff --git a/dse_do_dashboard/main_pages/prepare_data_page_edit.py b/dse_do_dashboard/main_pages/prepare_data_page_edit.py index 1fcdd8a..5821931 100644 --- a/dse_do_dashboard/main_pages/prepare_data_page_edit.py +++ b/dse_do_dashboard/main_pages/prepare_data_page_edit.py @@ -27,7 +27,7 @@ class PrepareDataPageEdit(PrepareDataPage): def __init__(self, dash_app): self.data_table_id = 'input_data_table' super().__init__(dash_app, - page_name='Prepare Data(*)', + page_name='Prepare Data', page_id='prepare-data', url='prepare-data', ) diff --git a/dse_do_dashboard/version.py b/dse_do_dashboard/version.py index 3dd7901..8528c3d 100644 --- a/dse_do_dashboard/version.py +++ b/dse_do_dashboard/version.py @@ -9,4 +9,4 @@ See https://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package """ -__version__ = "0.1.0.0b6" +__version__ = "0.1.1.0" diff --git a/requirements.txt b/requirements.txt index d514693..a465453 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,12 +6,12 @@ dash_bootstrap_components dash_pivottable dash_daq sqlalchemy==1.3.23 # 1.3.23 is version in CPD 4.0.2. Also ibm-db-sa doesn't yet fully support 1.4 -dse-do-utils==0.5.3.1 +dse-do-utils==0.5.4.0 pandas==1.2.4 docplex -openpyxl # May not be necessary, only for Excel parts of the dse-do-utils? +openpyxl # For scenario import and export to .xlsx # When using DB2/DB2WH ibm-db diff --git a/setup.py b/setup.py index 7b7bae7..af522a0 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ url="https://github.com/IBM/dse-do-dashboard", packages=setuptools.find_packages(), install_requires=[ - 'dse-do-utils>=0.5.3.1', + 'dse-do-utils>=0.5.4.0', 'dash>=2.0.0', 'flask_caching', 'dash_bootstrap_components', diff --git a/test/fruit_distribution/fruit_dash_app.py b/test/fruit_distribution/fruit_dash_app.py index 2cc0c45..e300a4f 100644 --- a/test/fruit_distribution/fruit_dash_app.py +++ b/test/fruit_distribution/fruit_dash_app.py @@ -66,20 +66,20 @@ def __init__(self, db_credentials: Dict, schema: str = None, db_echo: bool = Fal port=port, dash_debug=dash_debug, host_env=host_env) - def create_main_pages(self) -> List[MainPage]: - """Creates the ordered list of main pages for the DO app. - Can be overridden to replace by subclasses (not typical). - """ - main_pages = [ - # HomePage(self), - HomePageEdit(self), - # PrepareDataPage(self), - PrepareDataPageEdit(self), - RunModelPage(self), - ExploreSolutionPage(self), - VisualizationTabsPage(self) - ] - return main_pages + # def create_main_pages(self) -> List[MainPage]: + # """Creates the ordered list of main pages for the DO app. + # Can be overridden to replace by subclasses (not typical). + # """ + # main_pages = [ + # # HomePage(self), + # HomePageEdit(self), + # # PrepareDataPage(self), + # PrepareDataPageEdit(self), + # RunModelPage(self), + # ExploreSolutionPage(self), + # VisualizationTabsPage(self) + # ] + # return main_pages # def shutdown(self): # from flask import request diff --git a/test/pharma/pharma_dash_app.py b/test/pharma/pharma_dash_app.py index de317c0..58ec3db 100644 --- a/test/pharma/pharma_dash_app.py +++ b/test/pharma/pharma_dash_app.py @@ -76,20 +76,20 @@ def __init__(self, db_credentials: Dict, schema: str = None, db_echo: bool = Fal plotly_manager_class=plotly_manager_class, port=port, dash_debug=dash_debug, host_env=host_env) - def create_main_pages(self) -> List[MainPage]: - """Creates the ordered list of main pages for the DO app. - Can be overridden to replace by subclasses (not typical). - """ - main_pages = [ - # HomePage(self), - HomePageEdit(self), - # PrepareDataPage(self), - PrepareDataPageEdit(self), - RunModelPage(self), - ExploreSolutionPage(self), - VisualizationTabsPage(self) - ] - return main_pages + # def create_main_pages(self) -> List[MainPage]: + # """Creates the ordered list of main pages for the DO app. + # Can be overridden to replace by subclasses (not typical). + # """ + # main_pages = [ + # # HomePage(self), + # HomePageEdit(self), + # # PrepareDataPage(self), + # PrepareDataPageEdit(self), + # RunModelPage(self), + # ExploreSolutionPage(self), + # VisualizationTabsPage(self) + # ] + # return main_pages def get_pivot_table_configs(self) -> Dict[str, PivotTableConfig]: input_pivots: List[PivotTableConfig] = [ diff --git a/test/pharma/supply_chain/scnfo/scnfoscenariodbtables.py b/test/pharma/supply_chain/scnfo/scnfoscenariodbtables.py index b1ba08a..eb239f4 100644 --- a/test/pharma/supply_chain/scnfo/scnfoscenariodbtables.py +++ b/test/pharma/supply_chain/scnfo/scnfoscenariodbtables.py @@ -528,7 +528,7 @@ def __init__(self, db_table_name: str = 'business_kpi', extended_columns_metadat columns_metadata.extend(extended_columns_metadata) super().__init__(db_table_name, columns_metadata) -class ScnfoScenarioDbManager(ScenarioDbManagerUpdate): +class ScnfoScenarioDbManager(ScenarioDbManager): def __init__(self, input_db_tables: Dict[str, ScenarioDbTable]=None, output_db_tables: Dict[str, ScenarioDbTable]=None, credentials=None, schema: str = None, echo=False, multi_scenario: bool = True): if input_db_tables is None: