Source code for dse_do_utils.plotlymanager

-# from typing import List, Dict, Tuple, Optional
+# Copyright IBM All Rights Reserved.
+# SPDX-License-Identifier: Apache-2.0
+
+# from typing import List, Dict, Tuple, Optional
 from dse_do_utils.datamanager import DataManager
 
-from IPython.display import display, HTML
-import plotly
-import plotly.graph_objs as go
+# import plotly
+# import plotly.graph_objs as go
 
-def _show(self):
-    """Work-around for showing a Plotly go.Figure in JupyterLab in CPD 3.5
-    Usage:
-        1. `import plotlymanager`. This will run this code and add the custom method `_show()` to `go.Figure`
-        2. Create a go.Figure fig in the normal Plotly way. Then in the last line of the cell, instead of `fig.show()`, do a:
-        3. `fig._show()`
-    """
-    html = plotly.io.to_html(self)
-    display(HTML(html))
-go.Figure._show = _show
+# def _show(self):
+#     """Work-around for showing a Plotly go.Figure in JupyterLab in CPD 3.5
+#     Usage:
+#         1. `import plotlymanager`. This will run this code and add the custom method `_show()` to `go.Figure`
+#         2. Create a go.Figure fig in the normal Plotly way. Then in the last line of the cell, instead of `fig.show()`, do a:
+#         3. `fig._show()`
+#     """
+#     from IPython.display import display, HTML  # Need to import dynamically. Otherwise problems running locally in pure Python (i.e. without Jupyter)
+#     html = plotly.io.to_html(self)
+#     display(HTML(html))
+# go.Figure._show = _show
 
 
 
[docs]class PlotlyManager(): @@ -71,14 +74,16 @@

Source code for dse_do_utils.plotlymanager

         self.dm = dm
 
 
[docs] def get_plotly_fig_m(self, id): - """On the instance `self`, call the method named by id['index'] + """DEPRECATED. Not used in dse_do_dashboard package. + On the instance `self`, call the method named by id['index'] For use with pattern-matching callbacks. Assumes the id['index'] is the name of a method of this class and returns a fig. Used in dse_do_dashboard Plotly-Dash dashboards """ return getattr(self, id['index'])()
[docs] def get_dash_tab_layout_m(self, page_id): - """On the instance `self`, call the method named by get_tab_layout_{page_id}. + """DEPRECATED. Not used in dse_do_dashboard package. + On the instance `self`, call the method named by get_tab_layout_{page_id}. Used in dse_do_dashboard Plotly-Dash dashboards """ return getattr(self, f"get_tab_layout_{page_id}")()
@@ -113,7 +118,7 @@

Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/scenariodbmanager.html b/docs/doc_build/html/_modules/dse_do_utils/scenariodbmanager.html index d789f6c..e7f290b 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/scenariodbmanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/scenariodbmanager.html @@ -6,7 +6,7 @@ - dse_do_utils.scenariodbmanager — DSE DO Utils 0.5.2.0 documentation + dse_do_utils.scenariodbmanager — DSE DO Utils 0.5.3.0 documentation @@ -31,7 +31,7 @@

    Navigation

  • modules |
  • - + @@ -52,13 +52,19 @@

    Source code for dse_do_utils.scenariodbmanager

    # ScenarioDbManager # ----------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------- -# Change notes +# Change notes: +# VT 2021-12-27: +# - FK checks in SQLite. Avoids the hack in a separate Jupyter cell. +# - Transactions +# - Removed `ScenarioDbTable.camel_case_to_snake_case(db_table_name)` from ScenarioDbTable constructor +# - Cleanup and documentation # VT 2021-12-22: # - Cached read of scenarios table # VT 2021-12-01: # - Cleanup, small documentation and typing hints # - Make 'multi_scenario' the default option # ----------------------------------------------------------------------------------- +from abc import ABC import sqlalchemy import pandas as pd @@ -73,28 +79,17 @@

    Source code for dse_do_utils.scenariodbmanager

    Outputs = Dict[str, pd.DataFrame] -# from sqlalchemy import event -# from sqlalchemy.engine import Engine -# from sqlite3 import Connection as SQLite3Connection -# -# @event.listens_for(Engine, "connect") -# def _set_sqlite_pragma(dbapi_connection, connection_record): -# if isinstance(dbapi_connection, SQLite3Connection): -# cursor = dbapi_connection.cursor() -# cursor.execute("PRAGMA foreign_keys=ON;") -# cursor.close() - - -

    [docs]class ScenarioDbTable(): +
    [docs]class ScenarioDbTable(ABC): """Abstract class. Subclass to be able to define table schema definition, i.e. column name, data types, primary and foreign keys. Only columns that are specified and included in the DB insert. """ def __init__(self, db_table_name: str, columns_metadata: List[sqlalchemy.Column] = [], constraints_metadata=[]): """ - Note: Currently, the db_table_name applies a camel_case_to_snake_case conversion. Mixed case is giving problems in the schema. - However, supplying a mixed-case is not working well and is causing DB FK errors. + Warning: Do not use mixed case names for the db_table_name. + Supplying a mixed-case is not working well and is causing DB FK errors. Therefore, for now, ensure db_table_name is all lower-case. + Currently, the code does NOT prevent from using mixed-case. It just generates a warning. Also, will check db_table_name against some reserved words, i.e. ['order'] @@ -102,19 +97,18 @@

    Source code for dse_do_utils.scenariodbmanager

    :param columns_metadata: :param constraints_metadata: """ - self.db_table_name = ScenarioDbTable.camel_case_to_snake_case( - db_table_name) # To make sure it is a proper DB table name. Also allows us to use the scenario table name. + self.db_table_name = db_table_name + # ScenarioDbTable.camel_case_to_snake_case(db_table_name) # To make sure it is a proper DB table name. Also allows us to use the scenario table name. self.columns_metadata = columns_metadata self.constraints_metadata = constraints_metadata self.dtype = None if not db_table_name.islower() and not db_table_name.isupper(): ## I.e. is mixed_case print(f"Warning: using mixed case in the db_table_name {db_table_name} may cause unexpected DB errors. Use lower-case only.") - reserved_table_names = ['order'] # TODO: add more reserved words for table names + reserved_table_names = ['order', 'parameter'] # TODO: add more reserved words for table names if db_table_name in reserved_table_names: print(f"Warning: the db_table_name '{db_table_name}' is a reserved word. Do not use as table name.") -

    [docs] def get_db_table_name(self) -> str: return self.db_table_name
    @@ -148,7 +142,8 @@

    Source code for dse_do_utils.scenariodbmanager

    # Create a new ForeignKeyConstraint by adding the `scenario_name` columns.insert(0, 'scenario_name') refcolumns.insert(0, f"{table_name}.scenario_name") - return ForeignKeyConstraint(columns, refcolumns)

    + # TODO: `deferrable=True` doesn't seem to have an effect. Also, deferrable is illegal in DB2!? + return ForeignKeyConstraint(columns, refcolumns) #, deferrable=True
    [docs] @staticmethod def camel_case_to_snake_case(name: str) -> str: @@ -160,19 +155,23 @@

    Source code for dse_do_utils.scenariodbmanager

    df.columns = [ScenarioDbTable.camel_case_to_snake_case(x) for x in df.columns] return df

    -
    [docs] def insert_table_in_db_bulk(self, df: pd.DataFrame, mgr): +
    [docs] def insert_table_in_db_bulk(self, df: pd.DataFrame, mgr, connection=None): """Insert a DataFrame in the DB using 'bulk' insert, i.e. with one SQL insert. (Instead of row-by-row.) Args: df (pd.DataFrame) mgr (ScenarioDbManager) + connection: if not None, being run within a transaction """ table_name = self.get_db_table_name() columns = self.get_df_column_names() try: - # TODO: does it make sense to specify the dtype if we have a proper schema? - df[columns].to_sql(table_name, schema=mgr.schema, con=mgr.engine, if_exists='append', dtype=None, + if connection is None: + df[columns].to_sql(table_name, schema=mgr.schema, con=mgr.engine, if_exists='append', dtype=None, index=False) + else: + df[columns].to_sql(table_name, schema=mgr.schema, con=connection, if_exists='append', dtype=None, + index=False) except exc.IntegrityError as e: print("++++++++++++Integrity Error+++++++++++++") print(f"DataFrame insert/append of table '{table_name}'") @@ -201,12 +200,19 @@

    Source code for dse_do_utils.scenariodbmanager

    #########################################################################

    [docs]class AutoScenarioDbTable(ScenarioDbTable): """Designed to automatically generate the table definition based on the DataFrame. + + Main difference with the 'regular' ScenarioDbTable definition: + * At 'create_schema`, the table will NOT be created. Instead, + * At 'insert_table_in_db_bulk' SQLAlchemy will automatically create a TABLE based on the DataFrame. + Advantages: - No need to define a custom ScenarioDbTable class per table - Automatically all columns are inserted Disadvantages: - No primary and foreign key relations. Thus no checks. - Missing relationships means Cognos cannot automatically extract a data model + + TODO: find out what will happen if the DataFrame structure changes and we're doing a new insert """ def __init__(self, db_table_name: str): """Need to provide a name for the DB table. @@ -216,11 +222,12 @@

    Source code for dse_do_utils.scenariodbmanager

    [docs] def create_table_metadata(self, metadata, multi_scenario: bool = False): return None

    -
    [docs] def insert_table_in_db_bulk(self, df, mgr): +
    [docs] def insert_table_in_db_bulk(self, df, mgr, connection=None): """ Args: df (pd.DataFrame) mgr (ScenarioDbManager) + connection: if not None, being run within a transaction """ table_name = self.get_db_table_name() if self.dtype is None: @@ -230,46 +237,98 @@

    Source code for dse_do_utils.scenariodbmanager

    try: # Note that this can use the 'replace', so the table will be dropped automatically and the defintion auto created # So no need to drop the table explicitly (?) - df.to_sql(table_name, schema=mgr.schema, con=mgr.engine, if_exists='replace', dtype=dtype, index=False) + if connection is None: + df.to_sql(table_name, schema=mgr.schema, con=mgr.engine, if_exists='replace', dtype=dtype, index=False) + else: + df.to_sql(table_name, schema=mgr.schema, con=connection, if_exists='replace', dtype=dtype, index=False) except exc.IntegrityError as e: print("++++++++++++Integrity Error+++++++++++++") print(f"DataFrame insert/append of table '{table_name}'") print(e)

    + ######################################################################### # ScenarioDbManager ######################################################################### - -
    [docs]class ScenarioDbManager(): """ - TODO: - * Allow insert of tables in inputs/outputs that do not have ScenarioDbTable definitions, like in the original ScenarioDbManager - These to be inserted after the others. No need for a + TODO: documentation! """ - def __init__(self, input_db_tables: Dict[str, ScenarioDbTable], output_db_tables: Dict[str, ScenarioDbTable], - credentials=None, schema: str = None, echo: bool = False, multi_scenario: bool = True): + def __init__(self, input_db_tables: OrderedDict[str, ScenarioDbTable], output_db_tables: OrderedDict[str, ScenarioDbTable], + credentials=None, schema: str = None, echo: bool = False, multi_scenario: bool = True, + enable_transactions: bool = True, enable_sqlite_fk: bool = True): + """Create a ScenarioDbManager. + + :param input_db_tables: OrderedDict[str, ScenarioDbTable] of name and sub-class of ScenarioDbTable. Need to be in correct order. + :param output_db_tables: OrderedDict[str, ScenarioDbTable] of name and sub-class of ScenarioDbTable. Need to be in correct order. + :param credentials: DB credentials + :param schema: schema name + :param echo: if True, SQLAlchemy will produce a lot of debugging output + :param multi_scenario: If true, adds SCENARIO table and PK + :param enable_transactions: If true, uses transactions + :param enable_sqlite_fk: If True, enables FK constraint checks in SQLite + """ self.schema = schema - self.input_db_tables = input_db_tables + self.multi_scenario = multi_scenario # If true, will add a primary key 'scenario_name' to each table + self.enable_transactions = enable_transactions + self.enable_sqlite_fk = enable_sqlite_fk + self.echo = echo + self.input_db_tables = self._add_scenario_db_table(input_db_tables) self.output_db_tables = output_db_tables self.db_tables = OrderedDict(list(input_db_tables.items()) + list(output_db_tables.items())) # {**input_db_tables, **output_db_tables} # For compatibility reasons - self.engine = self.create_database_engine(credentials, schema, echo) - self.echo = echo + + self.engine = self._create_database_engine(credentials, schema, echo) self.metadata = sqlalchemy.MetaData() - self.multi_scenario = multi_scenario # If true, will add a primary key 'scenario_name' to each table - self.initialize_db_tables_metadata() # Needs to be done after self.metadata, self.multi_scenario has been set - self.read_scenario_table_from_db_callback = None # For Flask caching in Dash Enterprise + self._initialize_db_tables_metadata() # Needs to be done after self.metadata, self.multi_scenario has been set + self.read_scenario_table_from_db_callback = None # For Flask caching + self.read_scenarios_table_from_db_callback = None # For Flask caching + + ############################################################################################ + # Initialization. Called from constructor. + ############################################################################################ + + def _add_scenario_db_table(self, input_db_tables: OrderedDict[str, ScenarioDbTable]) -> OrderedDict[str, ScenarioDbTable]: + """Adds a Scenario table as the first in the OrderedDict (if it doesn't already exist). + Called from constructor.""" + if self.multi_scenario: + if 'Scenario' not in input_db_tables.keys(): + input_db_tables.update({'Scenario': ScenarioTable()}) + input_db_tables.move_to_end('Scenario', last=False) + else: + if list(input_db_tables.keys()).index('Scenario') > 0: + print("Warning: the `Scenario` table should be the first in the input tables") + return input_db_tables -
    [docs] def create_database_engine(self, credentials=None, schema: str = None, echo: bool = False): + def _create_database_engine(self, credentials=None, schema: str = None, echo: bool = False): + """Creates a SQLAlchemy engine at initialization. + If no credentials, creates an in-memory SQLite DB. Which can be used for schema validation of the data. + """ if credentials is not None: - engine = self.create_db2_engine(credentials, schema, echo) + engine = self._create_db2_engine(credentials, schema, echo) else: - engine = self.create_sqllite_engine(echo) - return engine
    - -
    [docs] def create_sqllite_engine(self, echo: bool): - return sqlalchemy.create_engine('sqlite:///:memory:', echo=echo)
    + engine = self._create_sqllite_engine(echo) + return engine + + def _create_sqllite_engine(self, echo: bool): + if self.enable_sqlite_fk: + ScenarioDbManager._enable_sqlite_foreign_key_checks() + return sqlalchemy.create_engine('sqlite:///:memory:', echo=echo) + + @staticmethod + def _enable_sqlite_foreign_key_checks(): + """Enables the FK constraint validation in SQLite.""" + print("Enable SQLite FK checks") + from sqlalchemy import event + from sqlalchemy.engine import Engine + from sqlite3 import Connection as SQLite3Connection + + @event.listens_for(Engine, "connect") + def _set_sqlite_pragma(dbapi_connection, connection_record): + if isinstance(dbapi_connection, SQLite3Connection): + cursor = dbapi_connection.cursor() + cursor.execute("PRAGMA foreign_keys=ON;") + cursor.close() # def get_db2_connection_string(self, credentials, schema: str): # """Create a DB2 connection string. @@ -300,7 +359,7 @@

    Source code for dse_do_utils.scenariodbmanager

    # ) # return connection_string -

    [docs] def get_db2_connection_string(self, credentials, schema: str): + def _get_db2_connection_string(self, credentials, schema: str): """Create a DB2 connection string. Needs a work-around for DB2 on cloud.ibm.com. @@ -321,7 +380,7 @@

    Source code for dse_do_utils.scenariodbmanager

    Notes: * The schema doesn't work properly in DB2 Lite version on cloud.ibm.com. Schema names work properly - with paid versions where you can have multiple schemas + with paid versions where you can have multiple schemas, i.e. the 'Standard' version. * SQLAlchemy expects a certain way the SSL is encoded in the connection string. This method adapts based on different ways the SSL is defined in the credentials """ @@ -370,67 +429,223 @@

    Source code for dse_do_utils.scenariodbmanager

    ) # SAVE FOR FUTURE LOGGER MESSAGES... #print("Connection String : " + connection_string) - return connection_string

    + return connection_string -
    [docs] def create_db2_engine(self, credentials, schema: str, echo: bool = False): + def _create_db2_engine(self, credentials, schema: str, echo: bool = False): """Create a DB2 engine instance. Connection string logic in `get_db2_connection_string` """ - connection_string = self.get_db2_connection_string(credentials, schema) - return sqlalchemy.create_engine(connection_string, echo=echo)
    + connection_string = self._get_db2_connection_string(credentials, schema) + return sqlalchemy.create_engine(connection_string, echo=echo) -
    [docs] def initialize_db_tables_metadata(self): + def _initialize_db_tables_metadata(self): """To be called from constructor, after engine is 'created'/connected, after self.metadata, self.multi_scenario have been set. This will add the `scenario_name` to the db_table configurations. This also allows non-bulk inserts into an existing DB (i.e. without running 'create_schema')""" for scenario_table_name, db_table in self.db_tables.items(): db_table.table_metadata = db_table.create_table_metadata(self.metadata, - self.multi_scenario) # Stores the table schema in the self.metadata
    + self.multi_scenario) # Stores the table schema in the self.metadata + + ############################################################################################ + # Create schema + ############################################################################################ +
    [docs] def create_schema(self): + """Drops all tables and re-creates the schema in the DB.""" + if self.enable_transactions: + print("Create schema within a transaction") + with self.engine.begin() as connection: + self._create_schema_transaction(connection=connection) + else: + self._create_schema_transaction()
    + + def _create_schema_transaction(self, connection=None): + """(Re)creates a schema, optionally using a transaction + Drops all tables and re-creates the schema in the DB.""" + # if self.schema is None: + # self.drop_all_tables_transaction(connection=connection) + # else: + # self.drop_schema_transaction(self.schema) + # DROP SCHEMA isn't working properly, so back to dropping all tables + self._drop_all_tables_transaction(connection=connection) + if connection is None: + self.metadata.create_all(self.engine, checkfirst=True) + else: + self.metadata.create_all(connection, checkfirst=True)
    [docs] def drop_all_tables(self): - """Drops all tables as defined in db_tables (if exists)""" - for scenario_table_name, db_table in self.db_tables.items(): + """Drops all tables in the current schema.""" + if self.enable_transactions: + with self.engine.begin() as connection: + self._drop_all_tables_transaction(connection=connection) + else: + self._drop_all_tables_transaction()
    + + def _drop_all_tables_transaction(self, connection=None): + """Drops all tables as defined in db_tables (if exists) + TODO: loop over tables as they exist in the DB. + This will make sure that however the schema definition has changed, all tables will be cleared. + Problem. The following code will loop over all existing tables: + + inspector = sqlalchemy.inspect(self.engine) + for db_table_name in inspector.get_table_names(schema=self.schema): + + However, the order is alphabetically, which causes FK constraint violation + Weirdly, this happens in SQLite, not in DB2! With or without transactions + """ + for scenario_table_name, db_table in reversed(self.db_tables.items()): db_table_name = db_table.db_table_name sql = f"DROP TABLE IF EXISTS {db_table_name}" # print(f"Dropping table {db_table_name}") - r = self.engine.execute(sql)
    - -
    [docs] def create_schema(self): - """Drops all tables and re-creates the schema in the DB.""" - self.drop_all_tables() - self.metadata.create_all(self.engine, checkfirst=True)
    + if connection is None: + r = self.engine.execute(sql) + else: + r = connection.execute(sql) + + def _drop_schema_transaction(self, schema: str, connection=None): + """NOT USED. Not working in DB2 Cloud. + Drops schema, and all the objects defined within that schema. + See: https://www.ibm.com/docs/en/db2/11.5?topic=procedure-admin-drop-schema-drop-schema + However, this doesn't work on DB2 cloud. + TODO: find out if and how we can get this to work. + """ + # sql = f"DROP SCHEMA {schema} CASCADE" # Not allowed in DB2! + sql = f"CALL SYSPROC.ADMIN_DROP_SCHEMA('{schema}', NULL, 'ERRORSCHEMA', 'ERRORTABLE')" + # sql = f"CALL SYSPROC.ADMIN_DROP_SCHEMA('{schema}', NULL, NULL, NULL)" + if connection is None: + r = self.engine.execute(sql) + else: + r = connection.execute(sql) + ##################################################################################### + # DEPRECATED(?): `insert_scenarios_in_db` and `insert_scenarios_in_db_transaction` + #####################################################################################
    [docs] def insert_scenarios_in_db(self, inputs={}, outputs={}, bulk: bool = True): + """DEPRECATED. If we need it back, requires re-evaluation and bulk support.""" + if self.enable_transactions: + print("Inserting all tables within a transaction") + with self.engine.begin() as connection: + self._insert_scenarios_in_db_transaction(inputs=inputs, outputs=outputs, bulk=bulk, connection=connection) + else: + self._insert_scenarios_in_db_transaction(inputs=inputs, outputs=outputs, bulk=bulk)
    + + def _insert_scenarios_in_db_transaction(self, inputs={}, outputs={}, bulk: bool = True, connection=None): + """DEPRECATED(?) + """ + num_caught_exceptions=0 for table_name, df in inputs.items(): - self.insert_table_in_db(table_name, df, bulk) + num_caught_exceptions += self._insert_table_in_db_by_row(table_name, df, connection=connection) for table_name, df in outputs.items(): - self.insert_table_in_db(table_name, df, bulk)
    + num_caught_exceptions += self._insert_table_in_db_by_row(table_name, df, connection=connection) + # Throw exception if any exceptions caught in 'non-bulk' mode + # This will cause a rollback when using a transaction + if num_caught_exceptions > 0: + raise RuntimeError(f"Multiple ({num_caught_exceptions}) Integrity and/or Statement errors caught. See log. Raising exception to allow for rollback.") + + ############################################################################################ + # Insert/replace scenario + ############################################################################################ +
    [docs] def replace_scenario_in_db(self, scenario_name: str, inputs: Inputs = {}, outputs: Outputs = {}, bulk=True): + """Insert or replace a scenario. Main API to insert/update a scenario. + If the scenario exists, will delete rows first. + Inserts scenario data in all tables. + Inserts tables in order specified in OrderedDict. Inputs first, outputs second. + + :param scenario_name: + :param inputs: + :param outputs: + :param bulk: + :return: + """ + if self.enable_transactions: + print("Replacing scenario within transaction") + with self.engine.begin() as connection: + self._replace_scenario_in_db_transaction(scenario_name=scenario_name, inputs=inputs, outputs=outputs, bulk=bulk, connection=connection) + else: + self._replace_scenario_in_db_transaction(scenario_name=scenario_name, inputs=inputs, outputs=outputs, bulk=bulk)
    + + def _replace_scenario_in_db_transaction(self, scenario_name: str, inputs: Inputs = {}, outputs: Outputs = {}, + bulk: bool = True, connection=None): + """Replace a single full scenario in the DB. If doesn't exist, will insert. + Only inserts tables with an entry defined in self.db_tables (i.e. no `auto_insert`). + Will first delete all rows associated with a scenario_name. + Will set/overwrite the scenario_name in all dfs, so no need to add in advance. + Assumes schema has been created. + Note: there is no difference between dfs in inputs or outputs, i.e. they are inserted the same way. + """ + # Step 1: delete scenario if exists + self._delete_scenario_from_db(scenario_name, connection=connection) + # Step 2: add scenario_name to all dfs + inputs = ScenarioDbManager.add_scenario_name_to_dfs(scenario_name, inputs) + outputs = ScenarioDbManager.add_scenario_name_to_dfs(scenario_name, outputs) + # Step 3: insert scenario_name in scenario table + sql = f"INSERT INTO SCENARIO (scenario_name) VALUES ('{scenario_name}')" + if connection is None: + self.engine.execute(sql) + else: + connection.execute(sql) + # Step 4: (bulk) insert scenario + num_caught_exceptions = self._insert_single_scenario_tables_in_db(inputs=inputs, outputs=outputs, bulk=bulk, connection=connection) + # Throw exception if any exceptions caught in 'non-bulk' mode + # This will cause a rollback when using a transaction + if num_caught_exceptions > 0: + raise RuntimeError(f"Multiple ({num_caught_exceptions}) Integrity and/or Statement errors caught. See log. Raising exception to allow for rollback.") -
    [docs] def insert_tables_in_db(self, inputs: Inputs = {}, outputs: Outputs = {}, bulk: bool = True, auto_insert: bool = False): - """Note: the non-bulk ONLY works if the schema was created! I.e. only when using with self.create_schema. - TODO: how to set the schema info without clearing the existing schema and thus the whole DB? + def _delete_scenario_from_db(self, scenario_name: str, connection=None): + """Deletes all rows associated with a given scenario. + Note that it only deletes rows from tables defined in the self.db_tables, i.e. will NOT delete rows in 'auto-inserted' tables! + Must do a 'cascading' delete to ensure not violating FK constraints. In reverse order of how they are inserted. + Also deletes entry in scenario table + TODO: do within one session/cursor, so we don't have to worry about the order of the delete? """ + insp = sqlalchemy.inspect(self.engine) + for scenario_table_name, db_table in reversed(self.db_tables.items()): + if insp.has_table(db_table.db_table_name, schema=self.schema): + sql = f"DELETE FROM {db_table.db_table_name} WHERE scenario_name = '{scenario_name}'" + if connection is None: + self.engine.execute(sql) + else: + connection.execute(sql) + + # Delete scenario entry in scenario table: + sql = f"DELETE FROM SCENARIO WHERE scenario_name = '{scenario_name}'" + if connection is None: + self.engine.execute(sql) + else: + connection.execute(sql) + + def _insert_single_scenario_tables_in_db(self, inputs: Inputs = {}, outputs: Outputs = {}, + bulk: bool = True, connection=None) -> int: + """Specifically for single scenario replace/insert. + Does NOT insert into the `scenario` table. + No `auto_insert`, i.e. only df matching db_tables. + """ + num_caught_exceptions = 0 dfs = {**inputs, **outputs} # Combine all dfs in one dict - completed_dfs = [] for scenario_table_name, db_table in self.db_tables.items(): - if scenario_table_name in dfs: - completed_dfs.append(scenario_table_name) - if bulk: - # self.insert_table_in_db_bulk(db_table, dfs[scenario_table_name]) - db_table.insert_table_in_db_bulk(dfs[scenario_table_name], self) - else: # Row by row for data checking - self.insert_table_in_db(db_table, dfs[scenario_table_name]) - else: - print(f"No table named {scenario_table_name} in inputs or outputs") - # Insert any tables not defined in the schema: - if auto_insert: - for scenario_table_name, df in dfs.items(): - if scenario_table_name not in completed_dfs: - print(f"Table {scenario_table_name} auto inserted") - db_table = AutoScenarioDbTable(scenario_table_name) - db_table.insert_table_in_db_bulk(df, self)
    - -
    [docs] def insert_table_in_db(self, db_table: ScenarioDbTable, df: pd.DataFrame): + if scenario_table_name != 'Scenario': + if scenario_table_name in dfs: + df = dfs[scenario_table_name] + print(f"Inserting {df.shape[0]} rows and {df.shape[1]} columns in {scenario_table_name}") + # display(df.head(3)) + if bulk: + db_table.insert_table_in_db_bulk(df=df, mgr=self, connection=connection) + else: # Row by row for data checking + num_caught_exceptions += self._insert_table_in_db_by_row(db_table, df, connection=connection) + else: + print(f"No table named {scenario_table_name} in inputs or outputs") + return num_caught_exceptions + + def _insert_table_in_db_by_row(self, db_table: ScenarioDbTable, df: pd.DataFrame, connection=None) -> int: + """Inserts a table in the DB row-by-row. + For debugging FK/PK data issues. + Uses a single SQL insert statement for each row in the DataFrame so that if there is a FK/PK issue, + the error message will be about only this row. Is a lot easier to debug than using bulk. + In addition, it catches the exception and keeps on inserting, so that we get to see multiple errors. + This allows us to debug multiple data issues within one run. + To avoid too many exceptions, the number of exceptions per table is limited to 10. + After the limit, the insert will be terminated. And the next table will be inserted. + Note that as a result of terminating a table insert, it is very likely it will cause FK issues in subsequent tables. + """ num_exceptions = 0 max_num_exceptions = 10 columns = db_table.get_df_column_names() @@ -443,7 +658,10 @@

    Source code for dse_do_utils.scenariodbmanager

    values(row) ) try: - self.engine.execute(stmt) + if connection is None: + self.engine.execute(stmt) + else: + connection.execute(stmt) except exc.IntegrityError as e: print("++++++++++++Integrity Error+++++++++++++") print(e) @@ -456,43 +674,175 @@

    Source code for dse_do_utils.scenariodbmanager

    if num_exceptions > max_num_exceptions: print( f"Max number of exceptions {max_num_exceptions} for this table exceeded. Stopped inserting more data.") - break

    + break + return num_exceptions + +
    [docs] def insert_tables_in_db(self, inputs: Inputs = {}, outputs: Outputs = {}, + bulk: bool = True, auto_insert: bool = False, connection=None) -> int: + """DEPRECATED. + Was attempt to automatically insert a scenario without any schema definition. + Currently, one would need to use the AutoScenarioDbTable in the constructor. + If you want to automatically create such schema based on the inputs/outputs, then do that in the constructor. Not here. + Note: the non-bulk ONLY works if the schema was created! I.e. only when using with self.create_schema. + """ + dfs = {**inputs, **outputs} # Combine all dfs in one dict + completed_dfs = [] + num_caught_exceptions=0 + for scenario_table_name, db_table in self.db_tables.items(): + if scenario_table_name in dfs: + completed_dfs.append(scenario_table_name) + if bulk: + # self.insert_table_in_db_bulk(db_table, dfs[scenario_table_name]) + db_table.insert_table_in_db_bulk(dfs[scenario_table_name], self, connection=connection) + else: # Row by row for data checking + num_caught_exceptions += self._insert_table_in_db_by_row(db_table, dfs[scenario_table_name], connection=connection) + else: + print(f"No table named {scenario_table_name} in inputs or outputs") + # Insert any tables not defined in the schema: + if auto_insert: + for scenario_table_name, df in dfs.items(): + if scenario_table_name not in completed_dfs: + print(f"Table {scenario_table_name} auto inserted") + db_table = AutoScenarioDbTable(scenario_table_name) + db_table.insert_table_in_db_bulk(df, self, connection=connection) + return num_caught_exceptions
    + + ############################################################################################ + # Read scenario + ############################################################################################ +
    [docs] def get_scenarios_df(self): + """Return all scenarios in df. Result is indexed by `scenario_name`. + Main API to get all scenarios. + The API called by a cached procedure in the dse_do_dashboard.DoDashApp. + """ + sql = f"SELECT * FROM SCENARIO" + df = pd.read_sql(sql, con=self.engine).set_index(['scenario_name']) + return df
    [docs] def read_scenario_table_from_db(self, scenario_name: str, scenario_table_name: str) -> pd.DataFrame: - """ - Load a single table from the DB. + """Read a single table from the DB. + Main API to read a single table. + The API called by a cached procedure in the dse_do_dashboard.DoDashApp. + :param scenario_name: Name of scenario :param scenario_table_name: Name of scenario table (not the DB table name) :return: """ # print(f"read table {scenario_table_name}") - if scenario_table_name in self.input_db_tables: - db_table = self.input_db_tables[scenario_table_name] - elif scenario_table_name in self.output_db_tables: - db_table = self.output_db_tables[scenario_table_name] + if scenario_table_name in self.db_tables: + db_table = self.db_tables[scenario_table_name] else: # error! raise ValueError(f"Scenario table name '{scenario_table_name}' unknown. Cannot load data from DB.") + df = self._read_scenario_db_table_from_db(scenario_name, db_table) + + return df
    + +
    [docs] def read_scenario_from_db(self, scenario_name: str) -> (Inputs, Outputs): + """Single scenario load. + Main API to read a complete scenario. + Reads all tables for a single scenario. + Returns all tables in one dict""" + inputs = {} + for scenario_table_name, db_table in self.input_db_tables.items(): + inputs[scenario_table_name] = self._read_scenario_db_table_from_db(scenario_name, db_table) + + outputs = {} + for scenario_table_name, db_table in self.output_db_tables.items(): + outputs[scenario_table_name] = self._read_scenario_db_table_from_db(scenario_name, db_table) + + return inputs, outputs
    + + def _read_scenario_db_table_from_db(self, scenario_name: str, db_table: ScenarioDbTable) -> pd.DataFrame: + """Read one table from the DB. + Removes the `scenario_name` column.""" db_table_name = db_table.db_table_name sql = f"SELECT * FROM {db_table_name} WHERE scenario_name = '{scenario_name}'" df = pd.read_sql(sql, con=self.engine) if db_table_name != 'scenario': df = df.drop(columns=['scenario_name']) - return df
    + return df + + + ############################################################################################ + # Old Read scenario APIs + ############################################################################################ + # def read_scenario_table_from_db(self, scenario_name: str, scenario_table_name: str) -> pd.DataFrame: + # """Read a single table from the DB. + # The API called by a cached procedure in the dse_do_dashboard.DoDashApp. + # + # :param scenario_name: Name of scenario + # :param scenario_table_name: Name of scenario table (not the DB table name) + # :return: + # """ + # # print(f"read table {scenario_table_name}") + # if scenario_table_name in self.input_db_tables: + # db_table = self.input_db_tables[scenario_table_name] + # elif scenario_table_name in self.output_db_tables: + # db_table = self.output_db_tables[scenario_table_name] + # else: + # # error! + # raise ValueError(f"Scenario table name '{scenario_table_name}' unknown. Cannot load data from DB.") + # + # db_table_name = db_table.db_table_name + # sql = f"SELECT * FROM {db_table_name} WHERE scenario_name = '{scenario_name}'" + # df = pd.read_sql(sql, con=self.engine) + # if db_table_name != 'scenario': + # df = df.drop(columns=['scenario_name']) + # + # return df + + # def read_scenario_from_db(self, scenario_name: str) -> (Inputs, Outputs): + # """Single scenario load. + # Reads all tables for a single scenario. + # Returns all tables in one dict""" + # inputs = {} + # for scenario_table_name, db_table in self.input_db_tables.items(): + # db_table_name = db_table.db_table_name + # sql = f"SELECT * FROM {db_table_name} WHERE scenario_name = '{scenario_name}'" + # df = pd.read_sql(sql, con=self.engine) + # # print(db_table_name) + # inputs[scenario_table_name] = df + # + # outputs = {} + # for scenario_table_name, db_table in self.output_db_tables.items(): + # db_table_name = db_table.db_table_name + # sql = f"SELECT * FROM {db_table_name} WHERE scenario_name = '{scenario_name}'" + # df = pd.read_sql(sql, con=self.engine) + # # print(db_table_name) + # outputs[scenario_table_name] = df + # + # inputs, outputs = ScenarioDbManager.delete_scenario_name_column(inputs, outputs) + # return inputs, outputs ####################################################################################################### # Caching + # How it works: + # Setup: + # 1. DoDashApp defines a procedure `read_xxxx_proc` + # 2. DoDashApp applies Flask caching to procedure + # 3. DoDashApp registers the procedure as a callback in the ScenarioDbManager.read_xxx_callback using `dbm.set_xxx_callback(read_xxx_callback)` + # Operationally (where dbm is a ScenarioDbManager): + # 1. In the DoDashApp, call to `dbm.read_xxxx_cached()` + # 2. In the `ScenarioDbManager.read_xxxx_cached()` calls the cached callback procedure defined in the DoDashApp (i.e. `read_xxxx_proc`) + # 3. The cached procedure calls `dbm.read_xxxx()` + # + # TODO: why can't the DoDashApp call the `read_xxxx_proc` directly. This would avoid all this registration of callbacks + # TODO: migrate all of this caching and callbacks (if applicable) to the DoDashApp to reduce complexity and dependency ####################################################################################################### - ## ScenarioTable + # ScenarioTable
    [docs] def set_scenarios_table_read_callback(self, scenarios_table_read_callback=None): - """Sets a callback function to read the scenario table from the DB + """DEPRECATED - now in DoDashApp + Sets a callback function to read the scenario table from the DB """ self.read_scenarios_table_from_db_callback = scenarios_table_read_callback
    [docs] def read_scenarios_table_from_db_cached(self) -> pd.DataFrame: - """For use with Flask caching. Default implementation. + """DEPRECATED - now in DoDashApp + For use with Flask caching. Default implementation. + To be called from (typically) a Dash app to use the cached version. In case no caching has been configured. Simply calls the regular method `get_scenarios_df`. For caching: @@ -505,15 +855,17 @@

    Source code for dse_do_utils.scenariodbmanager

    df = self.get_scenarios_df() return df

    - ## Tables + # Tables
    [docs] def set_table_read_callback(self, table_read_callback=None): - """Sets a callback function to read a table from a scenario + """DEPRECATED - now in DoDashApp + Sets a callback function to read a table from a scenario """ # print(f"Set callback to {table_read_callback}") self.read_scenario_table_from_db_callback = table_read_callback
    [docs] def read_scenario_table_from_db_cached(self, scenario_name: str, scenario_table_name: str) -> pd.DataFrame: - """For use with Flask caching. Default implementation. + """DEPRECATED - now in DoDashApp + For use with Flask caching. Default implementation. In case no caching has been configured. Simply calls the regular method `read_scenario_table_from_db`. For caching: @@ -530,9 +882,13 @@

    Source code for dse_do_utils.scenariodbmanager

    df = self.read_scenario_table_from_db(scenario_name, scenario_table_name) return df

    -
    [docs] def read_scenario_tables_from_db_cached(self, scenario_name: str, input_table_names:List[str]=None, output_table_names:List[str]=None): - """For use with Flask caching. Loads data for selected input and output tables. - Same as `read_scenario_tables_from_db`, but calls `read_scenario_table_from_db_cached`""" +
    [docs] def read_scenario_tables_from_db_cached(self, scenario_name: str, + input_table_names: List[str] = None, + output_table_names: List[str] = None) -> (Inputs, Outputs): + """DEPRECATED - now in DoDashApp + For use with Flask caching. Loads data for selected input and output tables. + Same as `read_scenario_tables_from_db`, but calls `read_scenario_table_from_db_cached`. + Is called from dse_do_dashboard.DoDashApp to create the PlotlyManager.""" if input_table_names is None: # load all tables by default input_table_names = list(self.input_db_tables.keys()) @@ -551,7 +907,12 @@

    Source code for dse_do_utils.scenariodbmanager

    outputs[scenario_table_name] = self.read_scenario_table_from_db_cached(scenario_name, scenario_table_name) return inputs, outputs

    -
    [docs] def read_scenario_tables_from_db(self, scenario_name: str, input_table_names:List[str]=None, output_table_names:List[str]=None): + ####################################################################################################### + # Review + ####################################################################################################### +
    [docs] def read_scenario_tables_from_db(self, scenario_name: str, + input_table_names: List[str] = None, + output_table_names: List[str] = None) -> (Inputs, Outputs): """Loads data for selected input and output tables. If either list is names is None, will load all tables as defined in db_tables configuration. """ @@ -569,30 +930,7 @@

    Source code for dse_do_utils.scenariodbmanager

    outputs[scenario_table_name] = self.read_scenario_table_from_db(scenario_name, scenario_table_name) return inputs, outputs

    -
    [docs] def read_scenario_from_db(self, scenario_name: str) -> (Inputs, Outputs): - """Single scenario load. - Reads all tables for a single scenario. - Returns all tables in one dict""" - inputs = {} - for scenario_table_name, db_table in self.input_db_tables.items(): - db_table_name = db_table.db_table_name - sql = f"SELECT * FROM {db_table_name} WHERE scenario_name = '{scenario_name}'" - df = pd.read_sql(sql, con=self.engine) - # print(db_table_name) - inputs[scenario_table_name] = df - - outputs = {} - for scenario_table_name, db_table in self.output_db_tables.items(): - db_table_name = db_table.db_table_name - sql = f"SELECT * FROM {db_table_name} WHERE scenario_name = '{scenario_name}'" - df = pd.read_sql(sql, con=self.engine) - # print(db_table_name) - outputs[scenario_table_name] = df - - inputs, outputs = ScenarioDbManager.delete_scenario_name_column(inputs, outputs) - return inputs, outputs
    - -
    [docs] def read_scenarios_from_db(self, scenario_names: List[str] = []): +
    [docs] def read_scenarios_from_db(self, scenario_names: List[str] = []) -> (Inputs, Outputs): """Multi scenario load. Reads all tables from set of scenarios""" where_scenarios = ','.join([f"'{n}'" for n in scenario_names]) @@ -619,45 +957,9 @@

    Source code for dse_do_utils.scenariodbmanager

    return inputs, outputs

    -
    [docs] def delete_scenario_from_db(self, scenario_name: str): - """Deletes all rows associated with a given scenario. - Note that it only deletes rows from tables defined in the self.db_tables, i.e. will NOT delete rows in 'auto-inserted' tables! - Must do a 'cascading' delete to ensure not violating FK constraints. In reverse order of how they are inserted. - Also deletes entry in scenario table - TODO: do within one session/cursor, so we don't have to worry about the order of the delete? - """ - insp = sqlalchemy.inspect(self.engine) - for scenario_table_name, db_table in reversed(self.db_tables.items()): - if insp.has_table(db_table.db_table_name, schema=self.schema): - sql = f"DELETE FROM {db_table.db_table_name} WHERE scenario_name = '{scenario_name}'" - self.engine.execute(sql) - - # for scenario_table_name, db_table in reversed(self.db_tables.items()): - # sql = f"DELETE FROM {db_table.db_table_name} WHERE scenario_name = '{scenario_name}'" - # self.engine.execute(sql) - - # Delete scenario entry in scenario table: - sql = f"DELETE FROM SCENARIO WHERE scenario_name = '{scenario_name}'" - self.engine.execute(sql)
    - -
    [docs] def replace_scenario_in_db(self, scenario_name: str, inputs: Inputs = {}, outputs: Outputs = {}, bulk=True): - """Replace a single full scenario in the DB. If doesn't exists, will insert. - Only inserts tables with an entry defined in self.db_tables (i.e. no `auto_insert`). - Will first delete all rows associated with a scenario_name. - Will set/overwrite the scenario_name in all dfs, so no need to add in advance. - Assumes schema has been created. - Note: there is no difference between dfs in inputs or outputs, i.e. they are inserted the same way.""" - # Step 1: delete scenario if exists - self.delete_scenario_from_db(scenario_name) - # Step 2: add scenario_name to all dfs - inputs = ScenarioDbManager.add_scenario_name_to_dfs(scenario_name, inputs) - outputs = ScenarioDbManager.add_scenario_name_to_dfs(scenario_name, outputs) - # Step 3: insert scenario_name in scenario table - sql = f"INSERT INTO SCENARIO (scenario_name) VALUES ('{scenario_name}')" - self.engine.execute(sql) - # Step 4: (bulk) insert scenario - self.insert_single_scenario_tables_in_db(inputs=inputs, outputs=outputs, bulk=bulk)
    - + ####################################################################################################### + # Utils + #######################################################################################################
    [docs] @staticmethod def add_scenario_name_to_dfs(scenario_name: str, inputs: Dict[str, pd.DataFrame]) -> Dict[str, pd.DataFrame]: """Adds a `scenario_name` column to each df. @@ -669,27 +971,8 @@

    Source code for dse_do_utils.scenariodbmanager

    outputs[scenario_table_name] = df return outputs

    -
    [docs] def insert_single_scenario_tables_in_db(self, inputs={}, outputs={}, bulk: bool = True): - """Specifically for single scenario replace/insert. - Does NOT insert into the `scenario` table. - No `auto_insert`, i.e. only df matching db_tables. - """ - dfs = {**inputs, **outputs} # Combine all dfs in one dict - for scenario_table_name, db_table in self.db_tables.items(): - if scenario_table_name != 'Scenario': - if scenario_table_name in dfs: - df = dfs[scenario_table_name] - print(f"Inserting {df.shape[0]} rows and {df.shape[1]} columns in {scenario_table_name}") - # display(df.head(3)) - if bulk: - db_table.insert_table_in_db_bulk(df, self) - else: # Row by row for data checking - self.insert_table_in_db(db_table, df) - else: - print(f"No table named {scenario_table_name} in inputs or outputs")
    -
    [docs] @staticmethod - def delete_scenario_name_column(inputs, outputs): + def delete_scenario_name_column(inputs: Inputs, outputs: Outputs) -> (Inputs, Outputs): """Drops the column `scenario_name` from any df in either inputs or outputs. This is used to create a inputs/outputs combination similar to loading a single scenario from the DO Experiment. """ @@ -703,18 +986,12 @@

    Source code for dse_do_utils.scenariodbmanager

    if 'scenario_name' in df.columns: df = df.drop(columns=['scenario_name']) new_outputs[scenario_table_name] = df - return new_inputs, new_outputs

    - -
    [docs] def get_scenarios_df(self): - """Return all scenarios in df. Result is indexed by `scenario_name`.""" - sql = f"SELECT * FROM SCENARIO" - df = pd.read_sql(sql, con=self.engine).set_index(['scenario_name']) - return df
    + return new_inputs, new_outputs
    -# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# Input Tables -# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +####################################################################################################### +# Input Tables +#######################################################################################################
    [docs]class ScenarioTable(ScenarioDbTable): def __init__(self, db_table_name: str = 'scenario'): columns_metadata = [ @@ -733,9 +1010,9 @@

    Source code for dse_do_utils.scenariodbmanager

    super().__init__(db_table_name, columns_metadata)

    -# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# Output Tables -# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +####################################################################################################### +# Output Tables +#######################################################################################################
    [docs]class KpiTable(ScenarioDbTable): def __init__(self, db_table_name: str = 'kpis'): columns_metadata = [ @@ -744,6 +1021,7 @@

    Source code for dse_do_utils.scenariodbmanager

    ] super().__init__(db_table_name, columns_metadata)

    +
    [docs]class BusinessKpiTable(ScenarioDbTable): def __init__(self, db_table_name: str = 'business_kpi', extended_columns_metadata: List[Column] = []): columns_metadata = [ @@ -783,7 +1061,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/scenariomanager.html b/docs/doc_build/html/_modules/dse_do_utils/scenariomanager.html index 6210229..e67874c 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/scenariomanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/scenariomanager.html @@ -6,7 +6,7 @@ - dse_do_utils.scenariomanager — DSE DO Utils 0.5.2.0 documentation + dse_do_utils.scenariomanager — DSE DO Utils 0.5.3.0 documentation @@ -31,7 +31,7 @@

    Navigation

  • modules |
  • - + @@ -1061,7 +1061,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/index.html b/docs/doc_build/html/_modules/index.html index 3068fa4..ccbf873 100644 --- a/docs/doc_build/html/_modules/index.html +++ b/docs/doc_build/html/_modules/index.html @@ -6,7 +6,7 @@ - Overview: module code — DSE DO Utils 0.5.2.0 documentation + Overview: module code — DSE DO Utils 0.5.3.0 documentation @@ -31,7 +31,7 @@

    Navigation

  • modules |
  • - +
    @@ -87,7 +87,7 @@

    Navigation

  • modules |
  • - +
    diff --git a/docs/doc_build/html/_sources/dse_do_utils.rst.txt b/docs/doc_build/html/_sources/dse_do_utils.rst.txt index 2e9fc57..4e59039 100644 --- a/docs/doc_build/html/_sources/dse_do_utils.rst.txt +++ b/docs/doc_build/html/_sources/dse_do_utils.rst.txt @@ -76,6 +76,14 @@ dse\_do\_utils.optimizationengine module :undoc-members: :show-inheritance: +dse\_do\_utils.plotly\_cpd\_workaround module +--------------------------------------------- + +.. automodule:: dse_do_utils.plotly_cpd_workaround + :members: + :undoc-members: + :show-inheritance: + dse\_do\_utils.plotlymanager module ----------------------------------- diff --git a/docs/doc_build/html/_static/bizstyle.js b/docs/doc_build/html/_static/bizstyle.js index 248a1cb..5c8092d 100644 --- a/docs/doc_build/html/_static/bizstyle.js +++ b/docs/doc_build/html/_static/bizstyle.js @@ -36,6 +36,6 @@ $(window).resize(function(){ $("li.nav-item-0 a").text("Top"); } else { - $("li.nav-item-0 a").text("DSE DO Utils 0.5.2.0 documentation"); + $("li.nav-item-0 a").text("DSE DO Utils 0.5.3.0 documentation"); } }); \ No newline at end of file diff --git a/docs/doc_build/html/_static/documentation_options.js b/docs/doc_build/html/_static/documentation_options.js index b5a9dbf..b4ab292 100644 --- a/docs/doc_build/html/_static/documentation_options.js +++ b/docs/doc_build/html/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0.5.2.0', + VERSION: '0.5.3.0', LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/doc_build/html/dse_do_utils.html b/docs/doc_build/html/dse_do_utils.html index 9e729b7..883f083 100644 --- a/docs/doc_build/html/dse_do_utils.html +++ b/docs/doc_build/html/dse_do_utils.html @@ -6,7 +6,7 @@ - dse_do_utils package — DSE DO Utils 0.5.2.0 documentation + dse_do_utils package — DSE DO Utils 0.5.3.0 documentation @@ -35,7 +35,7 @@

    Navigation

  • previous |
  • - + @@ -1486,6 +1486,9 @@

    dse_do_utils.domodeldeployer module +

    dse_do_utils.plotly_cpd_workaround module

    dse_do_utils.plotlymanager module

    @@ -1498,14 +1501,16 @@

    dse_do_utils.domodeldeployer module
    get_dash_tab_layout_m(page_id)[source]
    -

    On the instance self, call the method named by get_tab_layout_{page_id}. +

    DEPRECATED. Not used in dse_do_dashboard package. +On the instance self, call the method named by get_tab_layout_{page_id}. Used in dse_do_dashboard Plotly-Dash dashboards

    get_plotly_fig_m(id)[source]
    -

    On the instance self, call the method named by id[‘index’] +

    DEPRECATED. Not used in dse_do_dashboard package. +On the instance self, call the method named by id[‘index’] For use with pattern-matching callbacks. Assumes the id[‘index’] is the name of a method of this class and returns a fig. Used in dse_do_dashboard Plotly-Dash dashboards

    @@ -1519,13 +1524,17 @@

    dse_do_utils.domodeldeployer module class dse_do_utils.scenariodbmanager.AutoScenarioDbTable(db_table_name: str)[source]

    Bases: dse_do_utils.scenariodbmanager.ScenarioDbTable

    -

    Designed to automatically generate the table definition based on the DataFrame. -Advantages: +

    Designed to automatically generate the table definition based on the DataFrame.

    +

    Main difference with the ‘regular’ ScenarioDbTable definition: +* At ‘create_schema`, the table will NOT be created. Instead, +* At ‘insert_table_in_db_bulk’ SQLAlchemy will automatically create a TABLE based on the DataFrame.

    +

    Advantages: - No need to define a custom ScenarioDbTable class per table - Automatically all columns are inserted Disadvantages: - No primary and foreign key relations. Thus no checks. - Missing relationships means Cognos cannot automatically extract a data model

    +

    TODO: find out what will happen if the DataFrame structure changes and we’re doing a new insert

    create_table_metadata(metadata, multi_scenario: bool = False)[source]
    @@ -1534,12 +1543,13 @@

    dse_do_utils.domodeldeployer module
    -insert_table_in_db_bulk(df, mgr)[source]
    +insert_table_in_db_bulk(df, mgr, connection=None)[source]
    Parameters
    • df (pd.DataFrame) –

    • mgr (ScenarioDbManager) –

    • +
    • connection – if not None, being run within a transaction

    @@ -1567,11 +1577,9 @@

    dse_do_utils.domodeldeployer module
    -class dse_do_utils.scenariodbmanager.ScenarioDbManager(input_db_tables: Dict[str, dse_do_utils.scenariodbmanager.ScenarioDbTable], output_db_tables: Dict[str, dse_do_utils.scenariodbmanager.ScenarioDbTable], credentials=None, schema: Optional[str] = None, echo: bool = False, multi_scenario: bool = True)[source]
    +class dse_do_utils.scenariodbmanager.ScenarioDbManager(input_db_tables: collections.OrderedDict[str, dse_do_utils.scenariodbmanager.ScenarioDbTable], output_db_tables: collections.OrderedDict[str, dse_do_utils.scenariodbmanager.ScenarioDbTable], credentials=None, schema: Optional[str] = None, echo: bool = False, multi_scenario: bool = True, enable_transactions: bool = True, enable_sqlite_fk: bool = True)[source]

    Bases: object

    -

    TODO: -* Allow insert of tables in inputs/outputs that do not have ScenarioDbTable definitions, like in the original ScenarioDbManager -These to be inserted after the others. No need for a

    +

    TODO: documentation!

    static add_scenario_name_to_dfs(scenario_name: str, inputs: Dict[str, pandas.core.frame.DataFrame]) Dict[str, pandas.core.frame.DataFrame][source]
    @@ -1580,42 +1588,15 @@

    dse_do_utils.domodeldeployer module -
    -create_database_engine(credentials=None, schema: Optional[str] = None, echo: bool = False)[source]
    -

    - -
    -
    -create_db2_engine(credentials, schema: str, echo: bool = False)[source]
    -

    Create a DB2 engine instance. -Connection string logic in get_db2_connection_string

    -
    -
    create_schema()[source]

    Drops all tables and re-creates the schema in the DB.

    -
    -
    -create_sqllite_engine(echo: bool)[source]
    -
    - -
    -
    -delete_scenario_from_db(scenario_name: str)[source]
    -

    Deletes all rows associated with a given scenario. -Note that it only deletes rows from tables defined in the self.db_tables, i.e. will NOT delete rows in ‘auto-inserted’ tables! -Must do a ‘cascading’ delete to ensure not violating FK constraints. In reverse order of how they are inserted. -Also deletes entry in scenario table -TODO: do within one session/cursor, so we don’t have to worry about the order of the delete?

    -
    -
    -static delete_scenario_name_column(inputs, outputs)[source]
    +static delete_scenario_name_column(inputs: Dict[str, pandas.core.frame.DataFrame], outputs: Dict[str, pandas.core.frame.DataFrame])[source]

    Drops the column scenario_name from any df in either inputs or outputs. This is used to create a inputs/outputs combination similar to loading a single scenario from the DO Experiment.

    @@ -1623,80 +1604,38 @@

    dse_do_utils.domodeldeployer module
    drop_all_tables()[source]
    -

    Drops all tables as defined in db_tables (if exists)

    -

    - -
    -
    -get_db2_connection_string(credentials, schema: str)[source]
    -

    Create a DB2 connection string.

    -

    Needs a work-around for DB2 on cloud.ibm.com. -Workaround: Pass in your credentials like this:

    -
    -
    DB2_credentials = {

    ‘username’: “user1”, -‘password’: “password1”, -‘host’: “hostname.databases.appdomain.cloud”, -‘port’: “30080”, -‘database’: “bludb”, -‘schema’: “my_schema”, #<- SCHEMA IN DATABASE -‘ssl’: “SSL” #<- NOTE: SPECIFY SSL HERE IF TRUE FOR DB2

    -
    -
    -

    }

    -

    The option ‘ssl=True’ doesn’t work. Instead use ‘Security=ssl’. -See https://stackoverflow.com/questions/58952002/using-credentials-from-db2-warehouse-on-cloud-to-initialize-flask-sqlalchemy.

    -

    Notes

    -
      -
    • The schema doesn’t work properly in DB2 Lite version on cloud.ibm.com. Schema names work properly -with paid versions where you can have multiple schemas

    • -
    • SQLAlchemy expects a certain way the SSL is encoded in the connection string. -This method adapts based on different ways the SSL is defined in the credentials

    • -
    +

    Drops all tables in the current schema.

    get_scenarios_df()[source]
    -

    Return all scenarios in df. Result is indexed by scenario_name.

    -
    - -
    -
    -initialize_db_tables_metadata()[source]
    -

    To be called from constructor, after engine is ‘created’/connected, after self.metadata, self.multi_scenario have been set. -This will add the scenario_name to the db_table configurations. -This also allows non-bulk inserts into an existing DB (i.e. without running ‘create_schema’)

    +

    Return all scenarios in df. Result is indexed by scenario_name. +Main API to get all scenarios. +The API called by a cached procedure in the dse_do_dashboard.DoDashApp.

    insert_scenarios_in_db(inputs={}, outputs={}, bulk: bool = True)[source]
    -
    - -
    -
    -insert_single_scenario_tables_in_db(inputs={}, outputs={}, bulk: bool = True)[source]
    -

    Specifically for single scenario replace/insert. -Does NOT insert into the scenario table. -No auto_insert, i.e. only df matching db_tables.

    +

    DEPRECATED. If we need it back, requires re-evaluation and bulk support.

    -
    -
    -insert_table_in_db(db_table: dse_do_utils.scenariodbmanager.ScenarioDbTable, df: pandas.core.frame.DataFrame)[source]
    -
    -
    -insert_tables_in_db(inputs: Dict[str, pandas.core.frame.DataFrame] = {}, outputs: Dict[str, pandas.core.frame.DataFrame] = {}, bulk: bool = True, auto_insert: bool = False)[source]
    -

    Note: the non-bulk ONLY works if the schema was created! I.e. only when using with self.create_schema. -TODO: how to set the schema info without clearing the existing schema and thus the whole DB?

    +insert_tables_in_db(inputs: Dict[str, pandas.core.frame.DataFrame] = {}, outputs: Dict[str, pandas.core.frame.DataFrame] = {}, bulk: bool = True, auto_insert: bool = False, connection=None) int[source] +

    DEPRECATED. +Was attempt to automatically insert a scenario without any schema definition. +Currently, one would need to use the AutoScenarioDbTable in the constructor. +If you want to automatically create such schema based on the inputs/outputs, then do that in the constructor. Not here. +Note: the non-bulk ONLY works if the schema was created! I.e. only when using with self.create_schema.

    read_scenario_from_db(scenario_name: str)[source]

    Single scenario load. +Main API to read a complete scenario. Reads all tables for a single scenario. Returns all tables in one dict

    @@ -1704,16 +1643,27 @@

    dse_do_utils.domodeldeployer module
    read_scenario_table_from_db(scenario_name: str, scenario_table_name: str) pandas.core.frame.DataFrame[source]
    -

    Load a single table from the DB. -:param scenario_name: Name of scenario -:param scenario_table_name: Name of scenario table (not the DB table name) -:return:

    +

    Read a single table from the DB. +Main API to read a single table. +The API called by a cached procedure in the dse_do_dashboard.DoDashApp.

    +
    +
    Parameters
    +
      +
    • scenario_name – Name of scenario

    • +
    • scenario_table_name – Name of scenario table (not the DB table name)

    • +
    +
    +
    Returns
    +

    +
    +
    read_scenario_table_from_db_cached(scenario_name: str, scenario_table_name: str) pandas.core.frame.DataFrame[source]
    -

    For use with Flask caching. Default implementation. +

    DEPRECATED - now in DoDashApp +For use with Flask caching. Default implementation. In case no caching has been configured. Simply calls the regular method read_scenario_table_from_db.

    For caching: 1. Specify a callback procedure in read_scenario_table_from_db_callback that uses a hard-coded version of a ScenarioDbManager, @@ -1730,8 +1680,10 @@

    dse_do_utils.domodeldeployer module
    read_scenario_tables_from_db_cached(scenario_name: str, input_table_names: Optional[List[str]] = None, output_table_names: Optional[List[str]] = None)[source]
    -

    For use with Flask caching. Loads data for selected input and output tables. -Same as read_scenario_tables_from_db, but calls read_scenario_table_from_db_cached

    +

    DEPRECATED - now in DoDashApp +For use with Flask caching. Loads data for selected input and output tables. +Same as read_scenario_tables_from_db, but calls read_scenario_table_from_db_cached. +Is called from dse_do_dashboard.DoDashApp to create the PlotlyManager.

    @@ -1744,7 +1696,9 @@

    dse_do_utils.domodeldeployer module
    read_scenarios_table_from_db_cached() pandas.core.frame.DataFrame[source]
    -

    For use with Flask caching. Default implementation. +

    DEPRECATED - now in DoDashApp +For use with Flask caching. Default implementation. +To be called from (typically) a Dash app to use the cached version. In case no caching has been configured. Simply calls the regular method get_scenarios_df.

    For caching: 1. Specify a callback procedure in read_scenarios_table_from_db_callback that uses a hard-coded version of a ScenarioDbManager, @@ -1754,24 +1708,37 @@

    dse_do_utils.domodeldeployer module
    replace_scenario_in_db(scenario_name: str, inputs: Dict[str, pandas.core.frame.DataFrame] = {}, outputs: Dict[str, pandas.core.frame.DataFrame] = {}, bulk=True)[source]
    -

    Replace a single full scenario in the DB. If doesn’t exists, will insert. -Only inserts tables with an entry defined in self.db_tables (i.e. no auto_insert). -Will first delete all rows associated with a scenario_name. -Will set/overwrite the scenario_name in all dfs, so no need to add in advance. -Assumes schema has been created. -Note: there is no difference between dfs in inputs or outputs, i.e. they are inserted the same way.

    +

    Insert or replace a scenario. Main API to insert/update a scenario. +If the scenario exists, will delete rows first. +Inserts scenario data in all tables. +Inserts tables in order specified in OrderedDict. Inputs first, outputs second.

    +
    +
    Parameters
    +
      +
    • scenario_name

    • +
    • inputs

    • +
    • outputs

    • +
    • bulk

    • +
    +
    +
    Returns
    +

    +
    +

    set_scenarios_table_read_callback(scenarios_table_read_callback=None)[source]
    -

    Sets a callback function to read the scenario table from the DB

    +

    DEPRECATED - now in DoDashApp +Sets a callback function to read the scenario table from the DB

    set_table_read_callback(table_read_callback=None)[source]
    -

    Sets a callback function to read a table from a scenario

    +

    DEPRECATED - now in DoDashApp +Sets a callback function to read a table from a scenario

    @@ -1779,7 +1746,7 @@

    dse_do_utils.domodeldeployer module
    class dse_do_utils.scenariodbmanager.ScenarioDbTable(db_table_name: str, columns_metadata: List[sqlalchemy.sql.schema.Column] = [], constraints_metadata=[])[source]
    -

    Bases: object

    +

    Bases: abc.ABC

    Abstract class. Subclass to be able to define table schema definition, i.e. column name, data types, primary and foreign keys. Only columns that are specified and included in the DB insert.

    @@ -1818,13 +1785,14 @@

    dse_do_utils.domodeldeployer module
    -insert_table_in_db_bulk(df: pandas.core.frame.DataFrame, mgr)[source]
    +insert_table_in_db_bulk(df: pandas.core.frame.DataFrame, mgr, connection=None)[source]

    Insert a DataFrame in the DB using ‘bulk’ insert, i.e. with one SQL insert. (Instead of row-by-row.) :param df: :type df: pd.DataFrame :param mgr: -:type mgr: ScenarioDbManager

    +:type mgr: ScenarioDbManager +:param connection: if not None, being run within a transaction

    @@ -2659,6 +2627,7 @@

    Table of Contents

  • dse_do_utils.mapmanager module
  • dse_do_utils.multiscenariomanager module
  • dse_do_utils.optimizationengine module
  • +
  • dse_do_utils.plotly_cpd_workaround module
  • dse_do_utils.plotlymanager module
  • dse_do_utils.scenariodbmanager module
  • dse_do_utils.scenariomanager module
  • @@ -2706,7 +2675,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/doc_build/html/genindex.html b/docs/doc_build/html/genindex.html index 19eb4ad..c68d7eb 100644 --- a/docs/doc_build/html/genindex.html +++ b/docs/doc_build/html/genindex.html @@ -6,7 +6,7 @@ - Index — DSE DO Utils 0.5.2.0 documentation + Index — DSE DO Utils 0.5.3.0 documentation @@ -31,7 +31,7 @@

    Navigation

  • modules |
  • - +

    @@ -141,23 +141,17 @@

    C

  • CPD25 (dse_do_utils.scenariomanager.Platform attribute)
  • + + - - -
    • dse_do_utils.deployeddomodelcpd21 @@ -234,6 +224,8 @@

      D

    • module
    + + -
  • get_db2_connection_string() (dse_do_utils.scenariodbmanager.ScenarioDbManager method) -
  • get_db_table_name() (dse_do_utils.scenariodbmanager.ScenarioDbTable method)
  • get_dd_client() (dse_do_utils.multiscenariomanager.MultiScenarioManager method) @@ -488,22 +485,16 @@

    G

    I

    - + + + +
    diff --git a/docs/doc_build/html/index.html b/docs/doc_build/html/index.html index f3bda33..8b7647a 100644 --- a/docs/doc_build/html/index.html +++ b/docs/doc_build/html/index.html @@ -6,7 +6,7 @@ - Welcome to DSE DO Utils documentation! — DSE DO Utils 0.5.2.0 documentation + Welcome to DSE DO Utils documentation! — DSE DO Utils 0.5.3.0 documentation @@ -35,7 +35,7 @@

    Navigation

  • next |
  • - + @@ -128,7 +128,7 @@

    Navigation

  • next |
  • - + diff --git a/docs/doc_build/html/modules.html b/docs/doc_build/html/modules.html index 11bafcb..2d2c682 100644 --- a/docs/doc_build/html/modules.html +++ b/docs/doc_build/html/modules.html @@ -6,7 +6,7 @@ - dse_do_utils — DSE DO Utils 0.5.2.0 documentation + dse_do_utils — DSE DO Utils 0.5.3.0 documentation @@ -39,7 +39,7 @@

    Navigation

  • previous |
  • - + @@ -64,6 +64,7 @@

    dse_do_utilsdse_do_utils.mapmanager module
  • dse_do_utils.multiscenariomanager module
  • dse_do_utils.optimizationengine module
  • +
  • dse_do_utils.plotly_cpd_workaround module
  • dse_do_utils.plotlymanager module
  • dse_do_utils.scenariodbmanager module
  • dse_do_utils.scenariomanager module
  • @@ -126,7 +127,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/doc_build/html/objects.inv b/docs/doc_build/html/objects.inv index 813c64294880ddcb30a77e58d3196f84ad8ac1e2..7c1684a613472821bafafd360a4a50543e46f5c2 100644 GIT binary patch delta 2070 zcmV+x2VsHV}sI{uS!9*Km?fbIGl(bLcdlc#?K{#DD-KAp!vu z04=M(zW5+1$&xG)#4;ya6!kvXC3dm+kf>#dD%3hI>_YE8G>W!@E#5BZ!5h`uHR8wg z)|;OeZ|;uXB%1#GKK#oaXJtexOetD&!4S5HVu$@-%N&Y#1;VnG#BqNm7w^t6ZWhGZJDT_@Pv&*1fT$)SWI!J(O9TTr<-8L1N$H ze1p%3PfQwD^h1QFdm0v=B832aQ#G;P8pQq7$C-?VkCr&!Y&Py(lORnM8 z4AY$Qa~vg=jNyOTL6gE@3;&QdT!@)aLUo;f#!wrW@TgLQ{xwctLC)#MR1y#+mwYt~ zYL<+VP&0VXDLq4s^`Q)iC|zQ`#?s0UoX+R*iUX)U|uwmE?)j@W*h9Ov(I;g^0M z!RTBxE`>KWtqy$;=J)Y2myQ|JYB!&wyT717!<^wP&PIPjnb}}(CC9?ffeb_K9GpU{ zD7UhPv9C247;A@x5MQr5$K@(?)VUi`YNC5dzZ(!oBa$?G*2=j2t(Rk!s%zWF1JyBe z=hxM$^hUTp-e)J;e4-yxCnhnwIJIFCk(?@HEM&`S2uANE)OiicmX{nLb9}lFbAp_; zt}E)@c4mKXhErLox50YaF6LgKdcZnw5A&=>+HP)rL2HR&Oy*nmQdHobFX}>hXOt)- z>s#mtSyT%wH-5a;WmIF#8KbtgoL{9>T@1-Nno}yj3@bQQFcB zD=R+tba`&{)4G|+v4_6!t$agDL3AMYWzm)NESsza3&or zCf>bwVz3YvXq0ku`LMsyBD#blg*4Nj8&J&vg#$Lstk_)7?BFz(Pao`=jNj=|+VO_} z7pH$hOs=?OnfdfosCw8v8nrUM-2KF@V{&vZy-Bl@%JJncWY2hgx(BMy2bVq$PMOy5 zQ_VO4G+YlYM;pyynqSr2cbpx1!Y1rraW)qQ0f9o{$z`ir3vSa{6qH@vL@Jb7TFrof zw?k-n0+bbTXHWBfB`K?xzKs+XQCIP}B5Z$WKIK69E^F~i3+2QvoK;3!Wj5HTR?^G? zDQQicBphi}kMULBwBQw`u6(uY(80pQ+IKh9hf0-C33M<+mFV$5xexfYs>aN>3XCrUfC;B117e@x3FQZX7mTbU8#xSc zOQ3?|0;aq@>1R9kGuz^TejTc-n!r5vf&*HewVKAAjrg^SZkHUi>^wN}^j$dRU3h$k z3m~nX0HAFENor>h`F3bdHj@`ZlE~1|$3Zh=>U~ygc=?4b4YTXtTIYY#_mzqfC|lxI zxT7%2T#GmlC{mYQmL9?~-GW*U$S~8%^B9wm4$!CWaIPl-HJ&rDSM6|6}a|^-+#Ejnm+hP`1fvqTSqv!;~yr7 z^0OVM7WZF2F77`s{*DxXXB&QpE1oO+;m$Yv3{3Cd^lv1!hh%udCR2}0>n@#Ib$1|j zh4HxaU05EY!v0&skl=E2h&#BPKKsRASTyX;vha|PLFrn$?`sNr|1tRae~x9~vyl-9 Apa1{> delta 2132 zcmV-a2&?!15WNwQL;*69ML>V!xDkf${uN3k*J15$WiNZnuIG@-y2iDWRE{VRfFz7S z00BVD+Fu`hkQ8Of773y`CtDQtKIjI}Xnc^=GDH<>9T#?^Pro#Zwt{Vb*wE1z)!sGY zuj#8#f7^U|xcHK2`qR(hU+y?7BT`{X(UuE_utgL*?EhNkP`oP;wyl38jw`wO@djhE zxW;b3I^k%^V*R7xj*Ue4}eVM2FXj6>aqL$_~ofrof9lSR`dOuk=73q z=Mv`|d_#O;(72-?dU(30VWAc&1mK&hk#*R$7DByiauCwq>o0%)C(PkKCxiqbRexhX zn|NVxD2-1-VG0L;t7oe*VE`?(QIb1lQ0m73eJna=p=d};e=HLYqtx3%qTik$6Cgh_ zejr>C!LV#~2`{`uC>e%7;-rXKw>w1JM#qdOX3VWwhZ<)e@UWpbAj`}PC!J&0C6|aL z_i%fLX-@h%kCJ~<#!z?Aq%hdRSJHtCu@XwCuFrgLC1NDh3f^-{uh7T(t_+AMonn2&(#krdjUvq2(DZz2ExYBmHGwFO*nXNE=kIIb zw|*YM=vp)`g*P>=4t)>i_wg~8jv3Qxx1OWBzo0YTar$7)sjBHSPEvkPs$(hs2%lNeo`IxvYyPL?qja%43GqxTZ(yar{#sjSf3V7+V?^DIz3VV$>!c~c{8H@7~awZt$c^DTQTD)7lCbs@bo zN|cfHCG>+Vss)w@Ki=vxsSrie$ znRKw2c=y?f!9rM|QOd35!~RB#=oXF?!c2c|Ks5st4%jfWV{6sf=rooOAMBOP-|11> z@rHl@8K*)_?zm)`@$_1#dOAHDwKG25{heFKg2dXclOP>d) zEGzi6W*h(-u7{GNgXS>BuWIfa&I!F>6ZWq-TML7LKq2wuvQ@1Gx9KJd%C2rA71AuN zRzSepAv8Pz%8IzNr+L4Ul$A?QBZWoOT|9rT2-}#iIZ(dKTKv*NIdNK+*k5Q=&+$`U zD*u5}mvY*DXcS>G?3)N`7MXhkkiPfxgWY`XK7pY1GIw6-RR3t5>NAnY`rm!0nBmw- zn*Dk}+S>4@Q)?DDfi0{$mNn3KR+5|(q_ zXoeN%b+lds6`LGUqHQDy&L|z1O=1`VY1MJm@(s=Bw33nTP+87W=2X~{S^g9Tm)vnI z_@AKzb&e}IR@?%{k>YGu94#P8zIK1as1bHHLSsimAv6Wh7$21ADxu;Ml$`f{aEM?Z zSS##E)||CI=`eFsgLUoMs_6^V{tq zjMjdX#(e&M!+j?47~y?nBg{&CVDS?G31&L?789OUjVW5%bb_`jWmKJ2IgfvXPDET< zRUQI11AYtgGXygK#K8NyOS)p2m67xM4R%{)nq`F*tI;_KyVr{zG9wjK7vt z{9XBQT|jWz9{wG*cX#elcE_AX3X4g*0Va682JUFrB>_6okDw}h4>*qkW6kvoP}ZT8 zwvrzHboU*HMl z2Y@$>tV2vW3~)=JI>$Sh^7f<`*_>y##R2^~RF^e@dF%}bG&^fGjr)IK@j;{R+z4pe zIXVOQT{z`kczLQ3Ago;hpltvNYBv!1c4$rxix)zY$WYMdK{I3OeN$`r_y^k>X7|6g z&ZQ^#iV-N=;#RneZj`weaT`!1FMD5l=$7dg)N(+EN!5Vrp&o!hmWeRGiaX>~9U)MW z!06)mc^eT2?JLHjwD5m6=*X!z$7VF!rSECIe8;Ih+4zdn`Oo;Abp*HR9WiLnnZbta zPxIwon6dq1zO#+mSVw=MiflgJU|n3W}P{|x^= zoNwz0qdWe~1W|sr*vkmm(717#oyV6H`B$FmVbHh#lA=Z)2C1U7fJ0Y8J@7o z)C<$POV?ICjHK=`o=?6B%S%+)e`^>LTpq@_(dG2pKm3JF!yYUPm3#?G*V27o)A!H8 K&;JKQYzL^NeI-Hw diff --git a/docs/doc_build/html/py-modindex.html b/docs/doc_build/html/py-modindex.html index eaf652c..9f2ee7a 100644 --- a/docs/doc_build/html/py-modindex.html +++ b/docs/doc_build/html/py-modindex.html @@ -6,7 +6,7 @@ - Python Module Index — DSE DO Utils 0.5.2.0 documentation + Python Module Index — DSE DO Utils 0.5.3.0 documentation @@ -34,7 +34,7 @@

    Navigation

  • modules |
  • - + @@ -101,6 +101,11 @@

    Python Module Index

        dse_do_utils.optimizationengine
        + dse_do_utils.plotly_cpd_workaround +
        @@ -163,7 +168,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/readme_link.html b/docs/doc_build/html/readme_link.html index ed735a3..885bca7 100644 --- a/docs/doc_build/html/readme_link.html +++ b/docs/doc_build/html/readme_link.html @@ -6,7 +6,7 @@ - Read me — DSE DO Utils 0.5.2.0 documentation + Read me — DSE DO Utils 0.5.3.0 documentation @@ -39,7 +39,7 @@

    Navigation

  • previous |
  • - + @@ -269,7 +269,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/doc_build/html/search.html b/docs/doc_build/html/search.html index 1b85601..9296628 100644 --- a/docs/doc_build/html/search.html +++ b/docs/doc_build/html/search.html @@ -6,7 +6,7 @@ - Search — DSE DO Utils 0.5.2.0 documentation + Search — DSE DO Utils 0.5.3.0 documentation @@ -37,7 +37,7 @@

    Navigation

  • modules |
  • - + @@ -96,7 +96,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/searchindex.js b/docs/doc_build/html/searchindex.js index ac440cf..716344f 100644 --- a/docs/doc_build/html/searchindex.js +++ b/docs/doc_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["dse_do_utils","index","modules","readme_link"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["dse_do_utils.rst","index.rst","modules.rst","readme_link.rst"],objects:{"":{dse_do_utils:[0,0,0,"-"]},"dse_do_utils.cpd25utilities":{add_file_as_data_asset_cpd25:[0,1,1,""],add_file_path_as_data_asset_cpd25:[0,1,1,""],add_file_path_as_data_asset_wsc:[0,1,1,""],write_data_asset_as_file_cpd25:[0,1,1,""],write_data_asset_as_file_wsc:[0,1,1,""]},"dse_do_utils.datamanager":{DataManager:[0,2,1,""]},"dse_do_utils.datamanager.DataManager":{apply_and_concat:[0,3,1,""],df_crossjoin_ai:[0,3,1,""],df_crossjoin_mi:[0,3,1,""],df_crossjoin_si:[0,3,1,""],extract_solution:[0,3,1,""],get_parameter_value:[0,3,1,""],get_raw_table_by_name:[0,3,1,""],prep_parameters:[0,3,1,""],prepare_data_frames:[0,3,1,""],prepare_input_data_frames:[0,3,1,""],prepare_output_data_frames:[0,3,1,""],print_hello:[0,3,1,""],print_inputs_outputs_summary:[0,3,1,""]},"dse_do_utils.deployeddomodel":{DeployedDOModel:[0,2,1,""]},"dse_do_utils.deployeddomodel.DeployedDOModel":{execute_model:[0,3,1,""],extract_solution:[0,3,1,""],get_deployment_id:[0,3,1,""],get_job_status:[0,3,1,""],get_outputs:[0,3,1,""],get_solve_details:[0,3,1,""],get_solve_details_objective:[0,3,1,""],get_solve_payload:[0,3,1,""],get_solve_status:[0,3,1,""],get_space_id:[0,3,1,""],monitor_execution:[0,3,1,""],solve:[0,3,1,""]},"dse_do_utils.deployeddomodelcpd21":{DeployedDOModel_CPD21:[0,2,1,""]},"dse_do_utils.deployeddomodelcpd21.DeployedDOModel_CPD21":{cleanup:[0,3,1,""],execute_model:[0,3,1,""],get_debug_dump_name_and_url:[0,3,1,""],get_debug_file_url:[0,3,1,""],get_execution_service_model_url:[0,3,1,""],get_execution_status:[0,3,1,""],get_headers:[0,3,1,""],get_input_files:[0,3,1,""],get_job_url:[0,3,1,""],get_kill_job_url:[0,3,1,""],get_log_file_name_and_url:[0,3,1,""],get_log_file_url:[0,3,1,""],get_objective:[0,3,1,""],get_solution_name_and_url:[0,3,1,""],get_solve_config:[0,3,1,""],get_solve_status:[0,3,1,""],get_solve_url:[0,3,1,""],get_stop_job_url:[0,3,1,""],kill_job:[0,3,1,""],monitor_execution:[0,3,1,""],post_process_container:[0,3,1,""],post_process_container_get_dataframe:[0,3,1,""],post_process_failed:[0,3,1,""],post_process_inline_table:[0,3,1,""],post_process_inline_table_get_dataframe:[0,3,1,""],post_process_interrupted:[0,3,1,""],post_process_processed:[0,3,1,""],retrieve_debug_materials:[0,3,1,""],retrieve_file:[0,3,1,""],retrieve_solution:[0,3,1,""],retrieve_solve_configuration:[0,3,1,""],set_output_settings_in_solve_configuration:[0,3,1,""],solve:[0,3,1,""],stop_job:[0,3,1,""]},"dse_do_utils.domodelexporter":{DOModelExporter:[0,2,1,""]},"dse_do_utils.domodelexporter.DOModelExporter":{export_do_models:[0,3,1,""],get_access_token_curl:[0,3,1,""],get_access_token_web:[0,3,1,""],get_do_model_export_curl:[0,3,1,""],get_do_model_export_web:[0,3,1,""],get_project_id:[0,3,1,""],write_do_model_to_file:[0,3,1,""]},"dse_do_utils.mapmanager":{MapManager:[0,2,1,""]},"dse_do_utils.mapmanager.MapManager":{add_full_screen:[0,3,1,""],add_layer_control:[0,3,1,""],create_blank_map:[0,3,1,""],get_arrows:[0,3,1,""],get_bearing:[0,3,1,""],get_html_table:[0,3,1,""],get_popup_table:[0,3,1,""],kansas_city_coord:[0,4,1,""]},"dse_do_utils.multiscenariomanager":{MultiScenarioManager:[0,2,1,""]},"dse_do_utils.multiscenariomanager.MultiScenarioManager":{add_data_file_to_project:[0,3,1,""],env_is_wscloud:[0,3,1,""],get_all_scenario_names:[0,3,1,""],get_data_directory:[0,3,1,""],get_dd_client:[0,3,1,""],get_multi_scenario_data:[0,3,1,""],get_root_directory:[0,3,1,""],get_scenarios_df:[0,3,1,""],load_data_from_scenario:[0,3,1,""],merge_scenario_data:[0,3,1,""],write_data_to_excel:[0,3,1,""]},"dse_do_utils.optimizationengine":{MyProgressListener:[0,2,1,""],OptimizationEngine:[0,2,1,""]},"dse_do_utils.optimizationengine.MyProgressListener":{notify_progress:[0,3,1,""]},"dse_do_utils.optimizationengine.OptimizationEngine":{add_mip_progress_kpis:[0,3,1,""],binary_var_series:[0,3,1,""],binary_var_series_s:[0,3,1,""],continuous_var_series:[0,3,1,""],continuous_var_series_s:[0,3,1,""],export_as_cpo:[0,3,1,""],export_as_cpo_s:[0,3,1,""],export_as_lp:[0,3,1,""],export_as_lp_s:[0,3,1,""],get_kpi_output_table:[0,3,1,""],integer_var_series:[0,3,1,""],integer_var_series_s:[0,3,1,""],solve:[0,3,1,""]},"dse_do_utils.plotlymanager":{PlotlyManager:[0,2,1,""]},"dse_do_utils.plotlymanager.PlotlyManager":{get_dash_tab_layout_m:[0,3,1,""],get_plotly_fig_m:[0,3,1,""]},"dse_do_utils.scenariodbmanager":{AutoScenarioDbTable:[0,2,1,""],BusinessKpiTable:[0,2,1,""],KpiTable:[0,2,1,""],ParameterTable:[0,2,1,""],ScenarioDbManager:[0,2,1,""],ScenarioDbTable:[0,2,1,""],ScenarioTable:[0,2,1,""]},"dse_do_utils.scenariodbmanager.AutoScenarioDbTable":{create_table_metadata:[0,3,1,""],insert_table_in_db_bulk:[0,3,1,""]},"dse_do_utils.scenariodbmanager.ScenarioDbManager":{add_scenario_name_to_dfs:[0,3,1,""],create_database_engine:[0,3,1,""],create_db2_engine:[0,3,1,""],create_schema:[0,3,1,""],create_sqllite_engine:[0,3,1,""],delete_scenario_from_db:[0,3,1,""],delete_scenario_name_column:[0,3,1,""],drop_all_tables:[0,3,1,""],get_db2_connection_string:[0,3,1,""],get_scenarios_df:[0,3,1,""],initialize_db_tables_metadata:[0,3,1,""],insert_scenarios_in_db:[0,3,1,""],insert_single_scenario_tables_in_db:[0,3,1,""],insert_table_in_db:[0,3,1,""],insert_tables_in_db:[0,3,1,""],read_scenario_from_db:[0,3,1,""],read_scenario_table_from_db:[0,3,1,""],read_scenario_table_from_db_cached:[0,3,1,""],read_scenario_tables_from_db:[0,3,1,""],read_scenario_tables_from_db_cached:[0,3,1,""],read_scenarios_from_db:[0,3,1,""],read_scenarios_table_from_db_cached:[0,3,1,""],replace_scenario_in_db:[0,3,1,""],set_scenarios_table_read_callback:[0,3,1,""],set_table_read_callback:[0,3,1,""]},"dse_do_utils.scenariodbmanager.ScenarioDbTable":{add_scenario_name_to_fk_constraint:[0,3,1,""],camel_case_to_snake_case:[0,3,1,""],create_table_metadata:[0,3,1,""],df_column_names_to_snake_case:[0,3,1,""],get_db_table_name:[0,3,1,""],get_df_column_names:[0,3,1,""],insert_table_in_db_bulk:[0,3,1,""],sqlcol:[0,3,1,""]},"dse_do_utils.scenariomanager":{Platform:[0,2,1,""],ScenarioManager:[0,2,1,""]},"dse_do_utils.scenariomanager.Platform":{CPD25:[0,4,1,""],CPD40:[0,4,1,""],CPDaaS:[0,4,1,""],Local:[0,4,1,""]},"dse_do_utils.scenariomanager.ScenarioManager":{add_data_file_to_project_s:[0,3,1,""],add_data_file_using_project_lib:[0,3,1,""],add_data_file_using_ws_lib:[0,3,1,""],add_data_file_using_ws_lib_s:[0,3,1,""],add_data_into_scenario:[0,3,1,""],add_data_into_scenario_s:[0,3,1,""],add_file_as_data_asset:[0,3,1,""],add_file_as_data_asset_s:[0,3,1,""],clear_scenario_data:[0,3,1,""],create_new_scenario:[0,3,1,""],detect_platform:[0,3,1,""],env_is_cpd25:[0,3,1,""],env_is_cpd40:[0,3,1,""],env_is_dsx:[0,3,1,""],env_is_wscloud:[0,3,1,""],export_model_as_lp:[0,3,1,""],get_data_directory:[0,3,1,""],get_dd_client:[0,3,1,""],get_do_scenario:[0,3,1,""],get_kpis_table_as_dataframe:[0,3,1,""],get_root_directory:[0,3,1,""],load_data:[0,3,1,""],load_data_from_csv:[0,3,1,""],load_data_from_csv_s:[0,3,1,""],load_data_from_excel:[0,3,1,""],load_data_from_excel_s:[0,3,1,""],load_data_from_scenario:[0,3,1,""],load_data_from_scenario_s:[0,3,1,""],print_table_names:[0,3,1,""],replace_data_in_scenario:[0,3,1,""],replace_data_into_scenario_s:[0,3,1,""],update_solve_output_into_scenario:[0,3,1,""],write_data_into_scenario:[0,3,1,""],write_data_into_scenario_s:[0,3,1,""],write_data_to_csv:[0,3,1,""],write_data_to_csv_s:[0,3,1,""],write_data_to_excel:[0,3,1,""],write_data_to_excel_s:[0,3,1,""]},"dse_do_utils.scenariopicker":{ScenarioPicker:[0,2,1,""]},"dse_do_utils.scenariopicker.ScenarioPicker":{ScenarioRefreshButton:[0,2,1,""],default_scenario:[0,4,1,""],get_dd_client:[0,3,1,""],get_scenario_picker_ui:[0,3,1,""],get_scenario_refresh_button:[0,3,1,""],get_scenario_select_drop_down:[0,3,1,""],get_selected_scenario:[0,3,1,""],load_selected_scenario_data:[0,3,1,""],widgets:[0,4,1,""]},"dse_do_utils.utilities":{add_sys_path:[0,1,1,""],list_file_hierarchy:[0,1,1,""]},dse_do_utils:{cpd25utilities:[0,0,0,"-"],datamanager:[0,0,0,"-"],deployeddomodel:[0,0,0,"-"],deployeddomodelcpd21:[0,0,0,"-"],domodelexporter:[0,0,0,"-"],mapmanager:[0,0,0,"-"],module_reload:[0,1,1,""],multiscenariomanager:[0,0,0,"-"],optimizationengine:[0,0,0,"-"],plotlymanager:[0,0,0,"-"],scenariodbmanager:[0,0,0,"-"],scenariomanager:[0,0,0,"-"],scenariopicker:[0,0,0,"-"],utilities:[0,0,0,"-"],version:[0,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"],"4":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method","4":"py:attribute"},terms:{"0":[0,1],"02ea6d480895":0,"04":0,"0596001673":0,"085594":0,"1":[0,3],"100":0,"1132":0,"16":0,"1993":0,"2":[0,3],"2005586":0,"2016":0,"21c8ac71":0,"23690284":0,"25a0fe88e4":0,"26c1":0,"3":[0,3],"30080":0,"31":0,"3810":0,"39":0,"4":[0,3],"41":0,"447a":0,"458550":0,"469":0,"49a5":0,"4bd2":0,"5":[0,1],"50":0,"5401":0,"585241":0,"58952002":0,"5de6560a1cfa":0,"6":0,"600":0,"7":3,"785":0,"8021":0,"8364":0,"94":0,"95":0,"96":0,"9f28":0,"abstract":0,"case":[0,3],"class":[0,1],"default":[0,3],"do":0,"enum":0,"export":[0,3],"float":0,"function":[0,3],"import":[0,1],"int":0,"new":0,"return":0,"static":0,"true":0,"while":0,A:[0,3],And:0,As:0,But:[0,3],By:0,FOR:0,For:[0,3],IF:0,IN:0,If:0,In:[0,3],Is:0,It:[0,3],NOT:[0,3],No:0,Not:0,On:0,One:0,Or:0,That:0,The:[0,3],Then:[0,3],These:0,To:[0,3],Will:0,With:0,_:0,__index__:0,__init__:0,_base:0,_export_:0,_multi_output:0,_output:0,_table_index_:0,_xlx:0,a567:0,a933:0,aa50:0,abbrevi:0,abl:[0,3],about:0,abov:0,abspath:0,accept:0,access:[0,3],access_project_or_spac:0,access_tok:0,access_token:0,accesstoken:0,accordingli:0,ad:[0,3],adapt:0,add:[0,3],add_child:0,add_data_file_to_project:0,add_data_file_to_project_:0,add_data_file_using_project_lib:0,add_data_file_using_ws_lib:0,add_data_file_using_ws_lib_:0,add_data_into_scenario:0,add_data_into_scenario_:0,add_file_as_data_asset:0,add_file_as_data_asset_:0,add_file_as_data_asset_cpd25:0,add_file_path_as_data_asset_cpd25:0,add_file_path_as_data_asset_wsc:0,add_full_screen:0,add_layer_control:0,add_mip_progress_kpi:0,add_scenario_name_to_df:0,add_scenario_name_to_fk_constraint:0,add_sys_path:0,add_to:0,addit:0,advanc:0,advantag:0,advis:0,after:0,air:3,alia:0,all:[0,3],allow:[0,3],along:0,alreadi:0,also:[0,3],altern:0,alwai:0,an:[0,3],ani:0,anoth:0,api:[0,3],apicli:0,app:0,appdomain:0,appear:0,appli:[0,3],applic:0,apply_and_concat:0,ar:[0,3],arg:0,argument:0,around:[0,3],arrow:0,asset:[0,3],asset_nam:0,assign:0,associ:0,assum:0,attach:0,attachment_typ:0,attribut:0,auto:0,auto_insert:0,autodetect:0,automat:[0,3],autoreload:0,autoscenariodbt:0,avail:[0,3],avoid:[0,3],axi:0,b7bf7fd8:0,backward:3,base:0,bash:0,basic:3,bear:0,been:[0,3],befor:0,being:0,below:0,best:0,best_bound_kpi_nam:0,better:0,between:[0,3],bewar:0,binary_var_seri:0,binary_var_series_:0,binaryvartyp:0,blank:0,blob:0,bludb:0,blue:0,bobhaffn:0,bool:0,both:[0,3],bound:0,box:0,br:0,build:0,builder:[0,1],bulk:0,business_kpi:0,businesskpit:0,button:0,c:0,cach:0,call:0,callback:0,came:0,camel_case_to_snake_cas:0,camelcas:0,can:[0,3],cancel:0,cannot:[0,3],cartesian:0,cascad:0,categor:0,categori:0,caus:0,cell:[0,3],certain:0,certif:0,ch04s23:0,challeng:0,chang:0,channel:3,charact:0,chart:0,check:0,child:0,clean:0,cleanup:0,clear:0,clear_scenario_data:0,client:[0,3],cloud:[0,3],cluster4:0,cluster:0,cluster_nam:0,co:0,code:[0,3],cogno:0,collabor:0,color:0,column:0,column_nam:0,columns_metadata:0,com:0,combin:[0,3],command:0,commun:0,compass:0,compat:[0,3],complet:0,complex:0,compon:0,comput:0,conda:3,condit:0,conf:0,configur:[0,3],connect:[0,3],constant:0,constraint:0,constraints_metadata:0,constructor:0,contain:[0,3],content:2,context:0,continuous_var_seri:0,continuous_var_series_:0,continuousvartyp:0,control:0,conveni:0,convers:0,convert:0,cookbook:0,coord:0,copi:0,copy_to_csv:0,core:0,corner:0,correctli:0,could:0,count:0,counti:0,cp4d25:0,cp4daa:0,cp4dv2:0,cp4dv4:0,cp:[0,3],cpd25:0,cpd25util:2,cpd2:0,cpd3:[0,3],cpd40:0,cpd4:3,cpd:[0,3],cpd_cluster_host:0,cpdaa:0,cpdv2:[0,1],cpdv3:[0,3],cpdv4:[0,1],cplex:[0,3],cpo:0,cpolab:0,cpsaa:0,creat:[0,3],create_blank_map:0,create_database_engin:0,create_db2_engin:0,create_new_scenario:0,create_schema:0,create_sqllite_engin:0,create_table_metadata:0,creation:0,credenti:0,cross:0,crossjoin:3,csv:[0,3],csv_directori:0,csv_name_pattern:0,curl:0,current:0,current_dir:0,cursor:0,custom:0,d4c69a0d8158:0,d:[0,3],dash:0,dashboard:0,dashenterpris:0,data:[0,3],data_asset:[0,3],data_by_scenario:0,data_id:0,data_manag:0,data_url:0,databas:0,datafram:0,datamanag:[2,3],datascienceelit:0,dataset:0,datetim:0,db2:0,db2_credenti:0,db:0,db_tabl:0,db_table_nam:0,dd:[0,3],dd_scenario:0,de:0,debug:0,debug_file_data_url:0,debug_file_dir:0,decis:3,decision_optimization_cli:0,def:0,default_max_oaas_time_limit_sec:0,default_max_run_time_sec:0,default_scenario:0,default_valu:0,defin:0,definit:0,delai:0,delet:0,delete_scenario_from_db:0,delete_scenario_name_column:0,depend:[0,3],deploi:0,deploy:[0,3],deployed_model_nam:0,deployeddomodel:2,deployeddomodel_cpd21:0,deployeddomodelcpd21:2,deployment_id:0,deprec:0,design:[0,3],despit:0,detail:3,detect_platform:0,develop:[0,3],df1:0,df2:0,df:0,df_column_names_to_snake_cas:0,df_crossjoin_ai:0,df_crossjoin_mi:0,df_crossjoin_si:0,df_dict:0,dict:0,dictionari:0,differ:[0,3],direct:0,directori:0,disadvantag:0,disk:0,dm:0,do4w:0,do_model_nam:0,do_util:0,doc:0,docplex:[0,3],document:3,doe:0,doesn:0,domodeldeploy:2,domodelexport:2,don:0,done:0,down:[0,3],download:[0,3],driven:0,drop:[0,3],drop_all_t:0,drop_column_nam:0,dropdown:0,dse:[0,3],dse_do_dashboard:0,dse_do_util:1,dsx:0,dsx_project_dir:0,dsxuser:0,due:0,dump:0,dumpzipnam:0,dure:0,dvar:[0,3],e:[0,3],each:0,easi:3,easier:0,echo:0,ef365b2c:0,effect:0,eg:0,either:0,element:0,els:0,emb:0,empti:[0,3],en:0,encod:0,end:0,engin:[0,3],ensur:0,entiti:0,entri:0,enumer:0,env_is_cpd25:0,env_is_cpd40:0,env_is_dsx:0,env_is_wscloud:0,environ:[0,1],error:0,establish:0,exampl:0,excel:[0,3],excel_file_nam:0,excel_output_file_nam:0,excel_test:0,excelfil:0,excelwrit:0,exclud:0,execut:0,execute_model:0,execution_result:0,execution_statu:0,execution_status_json:0,exist:[0,3],expect:0,experi:0,explicit:0,explicitli:0,export_as_cpo:0,export_as_cpo_:0,export_as_lp:0,export_as_lp_:0,export_do_model:0,export_model:0,export_model_as_lp:0,expos:0,express:0,extend:0,extended_columns_metadata:0,extens:0,extract:0,extract_dvar_nam:0,extract_solut:0,f:0,fail:0,fake:3,fals:0,faster:0,featur:3,featuregroup:0,field:0,fig:0,file:[0,3],file_nam:0,file_path:0,filenam:0,filter:0,find:0,firefox:0,first:0,fk:0,fkc:0,flask:0,folder:0,folium:[0,3],follow:[0,3],forc:0,foreign:0,foreignkeyconstraint:0,form:0,format:0,former:[0,3],found:0,frame:0,free:0,from:[0,3],full:0,full_project_nam:0,func:0,futur:[0,3],g:[0,3],gap:[0,3],gener:0,get:0,get_access_token_curl:0,get_access_token_web:0,get_all_scenario_nam:0,get_arrow:0,get_bear:0,get_dash_tab_layout_m:0,get_data_directori:0,get_db2_connection_str:0,get_db_table_nam:0,get_dd_client:0,get_debug_dump_name_and_url:0,get_debug_file_url:0,get_deployment_id:0,get_df_column_nam:0,get_do_model_export_curl:0,get_do_model_export_web:0,get_do_scenario:0,get_execution_service_model_url:0,get_execution_statu:0,get_head:0,get_html_tabl:0,get_input_fil:0,get_job_statu:0,get_job_url:0,get_kill_job_url:0,get_kpi_output_t:0,get_kpis_table_as_datafram:0,get_log_file_name_and_url:0,get_log_file_url:0,get_multi_scenario_data:0,get_object:0,get_output:0,get_parameter_valu:0,get_plotly_fig_m:0,get_popup_t:0,get_project_id:0,get_raw_table_by_nam:0,get_root_directori:0,get_scenario_picker_ui:0,get_scenario_refresh_button:0,get_scenario_select_drop_down:0,get_scenarios_df:0,get_selected_scenario:0,get_solution_name_and_url:0,get_solve_config:0,get_solve_detail:0,get_solve_details_object:0,get_solve_payload:0,get_solve_statu:0,get_solve_url:0,get_space_id:0,get_stop_job_url:0,get_tab_layout_:0,getcwd:0,gist:0,git:0,github:[0,3],githubpag:3,give:0,given:0,glob:0,grand:0,greatli:3,gsilabs_scnfo:0,h:0,ha:[0,3],hack:3,hand:0,hard:0,have:[0,3],height:0,hello:0,here:0,hierarch:0,hold:0,home:0,host:0,hostnam:0,how:[0,3],howev:0,html:0,http:0,hypothet:0,i:0,ibm:[0,3],ibm_watson_machine_learn:0,ibm_watson_studio_lib:0,icon:0,icpd:3,id:0,ignor:[0,3],imp:0,impact:3,implement:0,improv:3,includ:0,inconsist:0,independ:0,index:[0,1],indic:0,individu:3,info:0,inform:0,init:0,initi:0,initialize_db_tables_metadata:0,inline_t:0,inner:0,input:0,input_csv_name_pattern:0,input_db_t:0,input_table_nam:0,insecurerequestwarn:0,insert:0,insert_scenarios_in_db:0,insert_single_scenario_tables_in_db:0,insert_table_in_db:0,insert_table_in_db_bulk:0,insert_tables_in_db:0,instal:[0,1],installationreadm:3,instanc:0,instead:0,integ:0,integer_var_list:0,integer_var_seri:0,integer_var_series_:0,integervartyp:0,intend:3,interact:[0,3],interfac:3,intermedi:0,intern:[0,3],internet:3,interrupt:0,interv:0,io:0,ipynb:0,ipywidget:0,issu:0,itself:3,jerom:0,job:0,job_config_json:0,job_detail:0,job_uid:0,join:0,json:0,jupyt:[0,3],jupyterlab:3,just:0,kansas_city_coord:0,karg:0,keep:0,kei:0,keyword:0,kill:0,kill_job:0,km:0,kpi:0,kpitabl:0,kwarg:0,lambda:0,last:0,lat:0,later:0,latest:0,layer_control_posit:0,leav:0,left:0,let:0,level:0,lib:0,librari:0,like:[0,3],limit:[0,3],line:0,list:0,list_file_hierarchi:0,lite:0,load:0,load_data:0,load_data_from_csv:0,load_data_from_csv_:0,load_data_from_excel:0,load_data_from_excel_:0,load_data_from_scenario:0,load_data_from_scenario_:0,load_from_excel:0,load_selected_scenario_data:0,local:[0,3],local_root:0,locat:0,log:0,log_file_nam:0,logic:0,lon:0,longer:[0,3],look:0,loop:0,lp:[0,3],m:0,machin:0,made:0,mai:0,main:1,maintain:0,major:0,make:0,manag:0,mani:3,manipul:[0,3],manual:0,map:[0,3],mapmanag:[2,3],marker:0,master:0,match:0,max_oaas_time_limit_sec:0,max_run_time_sec:0,maximum:0,mb:3,md:3,mdl:0,me:[0,1],mean:0,medium:0,member:0,menu:[0,3],merg:0,merge_scenario_data:0,messag:0,metadata:0,method:0,mgr:0,might:3,minu:0,mip_gap_kpi_nam:0,miss:0,mix:0,mkonrad:0,mode:0,model1:0,model2:0,model:[0,1],model_build:0,model_nam:0,modelbuild:0,modifi:0,modul:[1,2],module_reload:0,moment:3,monitor:0,monitor_execut:0,monitor_loop_delay_sec:0,more:[0,3],most:0,mostli:3,move:3,mp:0,msm:0,multi:0,multi_scenario:0,multiindex:0,multipl:[0,3],multiscenariomanag:2,must:0,my:0,my_default_scenario:0,my_do_model:0,my_funct:0,my_input_column_nam:0,my_input_valu:0,my_output_column_name_1:0,my_output_column_name_2:0,my_output_value1:0,my_output_value_1:0,my_output_value_2:0,my_schema:0,my_tabl:0,myexcelfil:0,myexcelfileoutput:0,myfil:0,mymodel:0,myoptimizationengin:0,myprogresslisten:0,mytabl:0,n:0,n_arrow:0,name:0,namedtupl:0,nbviewer:0,necessari:0,need:0,neither:3,net:0,never:0,new_path:0,new_scenario_nam:0,next:0,nodefault:3,non:0,none:0,not_start:0,note:[0,3],notebook:[0,3],notify_progress:0,now:0,number:0,oaa:0,object:0,off:0,ok:0,onc:0,one:0,ones:0,onli:[0,3],open:0,oper:0,optim:[0,3],optimizationengin:[2,3],option:[0,3],order:0,ordereddict:0,ore:3,oreilli:0,org:0,organ:0,origin:0,os:0,other:[0,3],otherwis:0,out:0,output:0,output_csv_name_pattern:0,output_db_t:0,output_table_nam:0,outsid:3,overrid:0,overwrit:0,overwritten:0,p1:0,p2:0,packag:[1,2,3],page:[0,1],page_id:0,page_sourc:0,paid:0,pak:3,panda:0,panel:0,param:0,param_nam:0,param_typ:0,paramet:0,parametert:0,pardir:0,parent:0,parent_dir:0,parent_dir_2:0,pars:0,parse_html:0,part:0,particular:[0,3],pass:0,password1:0,password:0,past:0,path:0,pattern:0,payload:0,pd:0,per:0,perform:3,period:0,person:0,phase:0,pick:3,picker:0,pip:[0,3],place:0,placehold:0,plain:0,platform:0,plot:0,plotli:0,plotlymanag:2,plugin:0,point:0,poll:0,polylin:0,popul:0,popup:0,popup_t:0,port:0,possibl:0,post:[0,3],post_process_contain:0,post_process_container_get_datafram:0,post_process_fail:0,post_process_inline_t:0,post_process_inline_table_get_datafram:0,post_process_interrupt:0,post_process_process:0,practic:0,pre:[0,3],prefer:3,prep_paramet:0,prepar:0,prepare_data_fram:0,prepare_input_data_fram:0,prepare_output_data_fram:0,prevent:0,previou:3,primari:0,print:0,print_hello:0,print_inputs_outputs_summari:0,print_table_nam:0,problem:0,procedur:0,process:[0,3],product:0,productionplan:0,progress:0,progress_data:0,progressdata:0,project:[0,3],project_access_token:0,project_data:[0,3],project_id:0,project_lib:0,project_nam:0,properli:0,properti:0,property_1:0,property_2:0,provid:[0,3],put:3,pwd:0,py:0,pydata:0,pypi:3,python:[0,3],question:0,queu:0,quot:0,rais:0,raw:0,re:0,reach:0,read:[0,1],read_csv:0,read_scenario_from_db:0,read_scenario_table_from_db:0,read_scenario_table_from_db_cach:0,read_scenario_table_from_db_callback:0,read_scenario_tables_from_db:0,read_scenario_tables_from_db_cach:0,read_scenarios_from_db:0,read_scenarios_table_from_db_cach:0,read_scenarios_table_from_db_callback:0,readthedoc:0,reason:0,record:0,reduc:0,refactor:3,refer:0,refine_conflict:0,refresh:0,regist:0,regular:0,regularli:[0,3],rel:0,relat:0,relationship:0,releas:3,relev:0,reliabl:0,reload:0,remot:0,remov:0,renam:0,repeatedli:0,replac:0,replace_data_in_scenario:0,replace_data_into_scenario_:0,replace_scenario_in_db:0,repositori:3,repres:0,represent:0,request:0,requir:[0,1],rerun:0,resourc:0,respons:0,rest:0,restor:0,restrict:0,result:0,retreiv:0,retriev:0,retrieve_debug_materi:0,retrieve_fil:0,retrieve_solut:0,retrieve_solve_configur:0,revers:0,right:0,root:0,root_dir:0,rotat:0,round:0,rout:0,routin:0,row:0,run:[0,3],runtime_env_apsx_url:0,s:0,same:[0,3],save:0,scenario:[0,3],scenario_1:0,scenario_nam:0,scenario_table_nam:0,scenariodbmanag:2,scenariodbt:0,scenariomanag:[2,3],scenariopick:[2,3],scenariorefreshbutton:0,scenarios_table_read_callback:0,scenariot:0,schema:0,scnfo:0,scnfo_dash_pycharm_github:0,scope:1,screen:0,script:3,search:[0,1],second:0,secur:0,see:[0,3],seem:0,select:0,self:0,separ:[0,3],sequenc:0,seri:0,server:0,servic:0,service_configuration_json:0,service_nam:0,session:0,set:0,set_index:0,set_output_settings_in_solve_configur:0,set_scenarios_table_read_callback:0,set_table_read_callback:0,setup:0,share:3,sheet:0,should:[0,3],show:0,side:0,signific:3,similar:0,simpl:0,simplest:0,simpli:0,sinc:0,singl:0,site:0,size:0,skip:0,sm:0,small:0,snake_cas:0,so:0,solut:0,solution_count_kpi_nam:0,solutionlisten:0,solv:0,solve_config:0,solve_config_json:0,solve_payload:0,solve_phase_kpi_nam:0,solve_statu:0,solve_time_kpi_nam:0,solvesolut:0,some:[0,3],someth:0,somewhat:0,sourc:[0,3],sp:0,space:0,space_id:0,space_nam:0,spd:0,specif:0,specifi:0,speed:0,spreadhseet:3,spreadsheet:0,sql:0,sqlalchemi:0,sqlcol:0,ssl:0,stackoverflow:0,stamp:0,standard:0,start:0,startpath:0,state:0,statement:0,statu:0,step:0,stop:0,stop_job:0,storag:0,store:[0,3],str:0,strftime:0,string:0,strongli:0,studio:[0,3],sub:0,subclass:[0,3],submiss:0,submodul:2,succesfulli:0,suffici:0,suggest:0,summari:0,support:0,suppress:0,suppress_warn:0,sure:0,sy:0,system:[0,3],t:0,tabl:[0,3],table_index_sheet:0,table_nam:0,table_read_callback:0,target:[0,1],task:0,templat:0,template_scenario_nam:0,temporari:0,termin:0,test:0,text:0,than:0,thei:0,them:0,therebi:0,therefor:[0,3],thi:[0,3],thing:0,those:0,thu:0,time:0,todo:0,token:0,tooltip:0,top:0,topleft:0,track:0,translat:0,tree:0,truth:0,tupl:0,turn:0,two:0,txt:0,type:0,typic:[0,3],ugli:0,ui:0,un:0,under:0,unfortun:0,uniqu:0,unknown:0,unnam:0,unverifi:0,up:[0,3],updat:0,update_solve_output_into_scenario:0,upload:[0,3],url:0,urllib3:0,us:[0,3],usag:[0,3],user1:0,user:0,user_access_token:0,user_nam:0,usernam:0,util:[2,3],v0:3,v2:3,v4:3,valid:0,valu:0,value_1:0,value_2:0,value_format:0,valueerror:0,variabl:0,venv:0,veri:3,verif:0,verifi:0,verify_integr:0,version:[2,3],via:0,view:0,violat:0,visibl:0,visual:[0,3],w:0,wa:0,wai:0,want:0,warehous:0,warn:0,watson:[0,3],watsonmachinelearningapicli:0,we:0,web:0,well:0,what:0,whatev:0,wheel:3,when:[0,3],where:0,which:0,whole:0,widget:0,widget_button:0,widget_select:0,width:0,wil:0,window:0,within:[0,3],without:0,wml:1,wml_credenti:0,work:[0,3],workaround:0,world:0,worri:0,would:0,write:[0,3],write_data_asset_as_file_cpd25:0,write_data_asset_as_file_wsc:0,write_data_into_scenario:0,write_data_into_scenario_:0,write_data_to_csv:0,write_data_to_csv_:0,write_data_to_excel:0,write_data_to_excel_:0,write_do_model_to_fil:0,writer:0,written:0,ws:[0,3],wsl1:0,wsl:[0,3],wslib:0,wslv1:3,wsuser:0,www:0,xdvar:0,xl:0,xlsx:0,xlx:0,xxxxxx:0,y:0,yet:0,you:0,your:0,yyyymmdd_hhmm:0,zip:[0,3],zoom_start:0},titles:["dse_do_utils package","Welcome to DSE DO Utils documentation!","dse_do_utils","Read me"],titleterms:{"0":3,"5":3,"class":3,"do":[1,3],"import":3,builder:3,content:[0,1],cpd25util:0,cpdv2:3,cpdv4:3,custom:3,datamanag:0,deployeddomodel:0,deployeddomodelcpd21:0,document:1,domodeldeploy:0,domodelexport:0,dse:1,dse_do_util:[0,2,3],environ:3,indic:1,instal:3,main:3,mapmanag:0,me:3,model:3,modul:[0,3],multiscenariomanag:0,optimizationengin:0,packag:0,plotlymanag:0,read:3,requir:3,scenariodbmanag:0,scenariomanag:0,scenariopick:0,scope:3,submodul:0,tabl:1,target:3,util:[0,1],version:0,welcom:1,wml:3}}) \ No newline at end of file +Search.setIndex({docnames:["dse_do_utils","index","modules","readme_link"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":4,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.viewcode":1,sphinx:56},filenames:["dse_do_utils.rst","index.rst","modules.rst","readme_link.rst"],objects:{"":{dse_do_utils:[0,0,0,"-"]},"dse_do_utils.cpd25utilities":{add_file_as_data_asset_cpd25:[0,1,1,""],add_file_path_as_data_asset_cpd25:[0,1,1,""],add_file_path_as_data_asset_wsc:[0,1,1,""],write_data_asset_as_file_cpd25:[0,1,1,""],write_data_asset_as_file_wsc:[0,1,1,""]},"dse_do_utils.datamanager":{DataManager:[0,2,1,""]},"dse_do_utils.datamanager.DataManager":{apply_and_concat:[0,3,1,""],df_crossjoin_ai:[0,3,1,""],df_crossjoin_mi:[0,3,1,""],df_crossjoin_si:[0,3,1,""],extract_solution:[0,3,1,""],get_parameter_value:[0,3,1,""],get_raw_table_by_name:[0,3,1,""],prep_parameters:[0,3,1,""],prepare_data_frames:[0,3,1,""],prepare_input_data_frames:[0,3,1,""],prepare_output_data_frames:[0,3,1,""],print_hello:[0,3,1,""],print_inputs_outputs_summary:[0,3,1,""]},"dse_do_utils.deployeddomodel":{DeployedDOModel:[0,2,1,""]},"dse_do_utils.deployeddomodel.DeployedDOModel":{execute_model:[0,3,1,""],extract_solution:[0,3,1,""],get_deployment_id:[0,3,1,""],get_job_status:[0,3,1,""],get_outputs:[0,3,1,""],get_solve_details:[0,3,1,""],get_solve_details_objective:[0,3,1,""],get_solve_payload:[0,3,1,""],get_solve_status:[0,3,1,""],get_space_id:[0,3,1,""],monitor_execution:[0,3,1,""],solve:[0,3,1,""]},"dse_do_utils.deployeddomodelcpd21":{DeployedDOModel_CPD21:[0,2,1,""]},"dse_do_utils.deployeddomodelcpd21.DeployedDOModel_CPD21":{cleanup:[0,3,1,""],execute_model:[0,3,1,""],get_debug_dump_name_and_url:[0,3,1,""],get_debug_file_url:[0,3,1,""],get_execution_service_model_url:[0,3,1,""],get_execution_status:[0,3,1,""],get_headers:[0,3,1,""],get_input_files:[0,3,1,""],get_job_url:[0,3,1,""],get_kill_job_url:[0,3,1,""],get_log_file_name_and_url:[0,3,1,""],get_log_file_url:[0,3,1,""],get_objective:[0,3,1,""],get_solution_name_and_url:[0,3,1,""],get_solve_config:[0,3,1,""],get_solve_status:[0,3,1,""],get_solve_url:[0,3,1,""],get_stop_job_url:[0,3,1,""],kill_job:[0,3,1,""],monitor_execution:[0,3,1,""],post_process_container:[0,3,1,""],post_process_container_get_dataframe:[0,3,1,""],post_process_failed:[0,3,1,""],post_process_inline_table:[0,3,1,""],post_process_inline_table_get_dataframe:[0,3,1,""],post_process_interrupted:[0,3,1,""],post_process_processed:[0,3,1,""],retrieve_debug_materials:[0,3,1,""],retrieve_file:[0,3,1,""],retrieve_solution:[0,3,1,""],retrieve_solve_configuration:[0,3,1,""],set_output_settings_in_solve_configuration:[0,3,1,""],solve:[0,3,1,""],stop_job:[0,3,1,""]},"dse_do_utils.domodelexporter":{DOModelExporter:[0,2,1,""]},"dse_do_utils.domodelexporter.DOModelExporter":{export_do_models:[0,3,1,""],get_access_token_curl:[0,3,1,""],get_access_token_web:[0,3,1,""],get_do_model_export_curl:[0,3,1,""],get_do_model_export_web:[0,3,1,""],get_project_id:[0,3,1,""],write_do_model_to_file:[0,3,1,""]},"dse_do_utils.mapmanager":{MapManager:[0,2,1,""]},"dse_do_utils.mapmanager.MapManager":{add_full_screen:[0,3,1,""],add_layer_control:[0,3,1,""],create_blank_map:[0,3,1,""],get_arrows:[0,3,1,""],get_bearing:[0,3,1,""],get_html_table:[0,3,1,""],get_popup_table:[0,3,1,""],kansas_city_coord:[0,4,1,""]},"dse_do_utils.multiscenariomanager":{MultiScenarioManager:[0,2,1,""]},"dse_do_utils.multiscenariomanager.MultiScenarioManager":{add_data_file_to_project:[0,3,1,""],env_is_wscloud:[0,3,1,""],get_all_scenario_names:[0,3,1,""],get_data_directory:[0,3,1,""],get_dd_client:[0,3,1,""],get_multi_scenario_data:[0,3,1,""],get_root_directory:[0,3,1,""],get_scenarios_df:[0,3,1,""],load_data_from_scenario:[0,3,1,""],merge_scenario_data:[0,3,1,""],write_data_to_excel:[0,3,1,""]},"dse_do_utils.optimizationengine":{MyProgressListener:[0,2,1,""],OptimizationEngine:[0,2,1,""]},"dse_do_utils.optimizationengine.MyProgressListener":{notify_progress:[0,3,1,""]},"dse_do_utils.optimizationengine.OptimizationEngine":{add_mip_progress_kpis:[0,3,1,""],binary_var_series:[0,3,1,""],binary_var_series_s:[0,3,1,""],continuous_var_series:[0,3,1,""],continuous_var_series_s:[0,3,1,""],export_as_cpo:[0,3,1,""],export_as_cpo_s:[0,3,1,""],export_as_lp:[0,3,1,""],export_as_lp_s:[0,3,1,""],get_kpi_output_table:[0,3,1,""],integer_var_series:[0,3,1,""],integer_var_series_s:[0,3,1,""],solve:[0,3,1,""]},"dse_do_utils.plotlymanager":{PlotlyManager:[0,2,1,""]},"dse_do_utils.plotlymanager.PlotlyManager":{get_dash_tab_layout_m:[0,3,1,""],get_plotly_fig_m:[0,3,1,""]},"dse_do_utils.scenariodbmanager":{AutoScenarioDbTable:[0,2,1,""],BusinessKpiTable:[0,2,1,""],KpiTable:[0,2,1,""],ParameterTable:[0,2,1,""],ScenarioDbManager:[0,2,1,""],ScenarioDbTable:[0,2,1,""],ScenarioTable:[0,2,1,""]},"dse_do_utils.scenariodbmanager.AutoScenarioDbTable":{create_table_metadata:[0,3,1,""],insert_table_in_db_bulk:[0,3,1,""]},"dse_do_utils.scenariodbmanager.ScenarioDbManager":{add_scenario_name_to_dfs:[0,3,1,""],create_schema:[0,3,1,""],delete_scenario_name_column:[0,3,1,""],drop_all_tables:[0,3,1,""],get_scenarios_df:[0,3,1,""],insert_scenarios_in_db:[0,3,1,""],insert_tables_in_db:[0,3,1,""],read_scenario_from_db:[0,3,1,""],read_scenario_table_from_db:[0,3,1,""],read_scenario_table_from_db_cached:[0,3,1,""],read_scenario_tables_from_db:[0,3,1,""],read_scenario_tables_from_db_cached:[0,3,1,""],read_scenarios_from_db:[0,3,1,""],read_scenarios_table_from_db_cached:[0,3,1,""],replace_scenario_in_db:[0,3,1,""],set_scenarios_table_read_callback:[0,3,1,""],set_table_read_callback:[0,3,1,""]},"dse_do_utils.scenariodbmanager.ScenarioDbTable":{add_scenario_name_to_fk_constraint:[0,3,1,""],camel_case_to_snake_case:[0,3,1,""],create_table_metadata:[0,3,1,""],df_column_names_to_snake_case:[0,3,1,""],get_db_table_name:[0,3,1,""],get_df_column_names:[0,3,1,""],insert_table_in_db_bulk:[0,3,1,""],sqlcol:[0,3,1,""]},"dse_do_utils.scenariomanager":{Platform:[0,2,1,""],ScenarioManager:[0,2,1,""]},"dse_do_utils.scenariomanager.Platform":{CPD25:[0,4,1,""],CPD40:[0,4,1,""],CPDaaS:[0,4,1,""],Local:[0,4,1,""]},"dse_do_utils.scenariomanager.ScenarioManager":{add_data_file_to_project_s:[0,3,1,""],add_data_file_using_project_lib:[0,3,1,""],add_data_file_using_ws_lib:[0,3,1,""],add_data_file_using_ws_lib_s:[0,3,1,""],add_data_into_scenario:[0,3,1,""],add_data_into_scenario_s:[0,3,1,""],add_file_as_data_asset:[0,3,1,""],add_file_as_data_asset_s:[0,3,1,""],clear_scenario_data:[0,3,1,""],create_new_scenario:[0,3,1,""],detect_platform:[0,3,1,""],env_is_cpd25:[0,3,1,""],env_is_cpd40:[0,3,1,""],env_is_dsx:[0,3,1,""],env_is_wscloud:[0,3,1,""],export_model_as_lp:[0,3,1,""],get_data_directory:[0,3,1,""],get_dd_client:[0,3,1,""],get_do_scenario:[0,3,1,""],get_kpis_table_as_dataframe:[0,3,1,""],get_root_directory:[0,3,1,""],load_data:[0,3,1,""],load_data_from_csv:[0,3,1,""],load_data_from_csv_s:[0,3,1,""],load_data_from_excel:[0,3,1,""],load_data_from_excel_s:[0,3,1,""],load_data_from_scenario:[0,3,1,""],load_data_from_scenario_s:[0,3,1,""],print_table_names:[0,3,1,""],replace_data_in_scenario:[0,3,1,""],replace_data_into_scenario_s:[0,3,1,""],update_solve_output_into_scenario:[0,3,1,""],write_data_into_scenario:[0,3,1,""],write_data_into_scenario_s:[0,3,1,""],write_data_to_csv:[0,3,1,""],write_data_to_csv_s:[0,3,1,""],write_data_to_excel:[0,3,1,""],write_data_to_excel_s:[0,3,1,""]},"dse_do_utils.scenariopicker":{ScenarioPicker:[0,2,1,""]},"dse_do_utils.scenariopicker.ScenarioPicker":{ScenarioRefreshButton:[0,2,1,""],default_scenario:[0,4,1,""],get_dd_client:[0,3,1,""],get_scenario_picker_ui:[0,3,1,""],get_scenario_refresh_button:[0,3,1,""],get_scenario_select_drop_down:[0,3,1,""],get_selected_scenario:[0,3,1,""],load_selected_scenario_data:[0,3,1,""],widgets:[0,4,1,""]},"dse_do_utils.utilities":{add_sys_path:[0,1,1,""],list_file_hierarchy:[0,1,1,""]},dse_do_utils:{cpd25utilities:[0,0,0,"-"],datamanager:[0,0,0,"-"],deployeddomodel:[0,0,0,"-"],deployeddomodelcpd21:[0,0,0,"-"],domodelexporter:[0,0,0,"-"],mapmanager:[0,0,0,"-"],module_reload:[0,1,1,""],multiscenariomanager:[0,0,0,"-"],optimizationengine:[0,0,0,"-"],plotly_cpd_workaround:[0,0,0,"-"],plotlymanager:[0,0,0,"-"],scenariodbmanager:[0,0,0,"-"],scenariomanager:[0,0,0,"-"],scenariopicker:[0,0,0,"-"],utilities:[0,0,0,"-"],version:[0,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"],"4":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method","4":"py:attribute"},terms:{"0":[0,1],"02ea6d480895":0,"04":0,"0596001673":0,"085594":0,"1":[0,3],"100":0,"1132":0,"16":0,"1993":0,"2":[0,3],"2005586":0,"2016":0,"21c8ac71":0,"23690284":0,"25a0fe88e4":0,"26c1":0,"3":[0,3],"30080":[],"31":0,"3810":0,"39":0,"4":[0,3],"41":0,"447a":0,"458550":0,"469":0,"49a5":0,"4bd2":0,"5":[0,1],"50":0,"5401":0,"585241":0,"58952002":[],"5de6560a1cfa":0,"6":0,"600":0,"7":3,"785":0,"8021":0,"8364":0,"94":0,"95":0,"96":0,"9f28":0,"abstract":0,"case":[0,3],"class":[0,1],"default":[0,3],"do":0,"enum":0,"export":[0,3],"float":0,"function":[0,3],"import":[0,1],"int":0,"new":0,"return":0,"static":0,"true":0,"while":0,A:[0,3],And:0,As:0,At:0,But:[0,3],By:0,FOR:0,For:[0,3],IF:[],IN:[],If:0,In:[0,3],Is:0,It:[0,3],NOT:[0,3],No:0,Not:0,On:0,One:0,Or:0,That:0,The:[0,3],Then:[0,3],These:0,To:[0,3],Will:0,With:0,_:0,__index__:0,__init__:0,_base:0,_export_:0,_multi_output:0,_output:0,_table_index_:0,_xlx:0,a567:0,a933:0,aa50:0,abbrevi:0,abc:0,abl:[0,3],about:0,abov:0,abspath:0,accept:0,access:[0,3],access_project_or_spac:0,access_tok:0,access_token:0,accesstoken:0,accordingli:0,ad:[0,3],adapt:[],add:[0,3],add_child:0,add_data_file_to_project:0,add_data_file_to_project_:0,add_data_file_using_project_lib:0,add_data_file_using_ws_lib:0,add_data_file_using_ws_lib_:0,add_data_into_scenario:0,add_data_into_scenario_:0,add_file_as_data_asset:0,add_file_as_data_asset_:0,add_file_as_data_asset_cpd25:0,add_file_path_as_data_asset_cpd25:0,add_file_path_as_data_asset_wsc:0,add_full_screen:0,add_layer_control:0,add_mip_progress_kpi:0,add_scenario_name_to_df:0,add_scenario_name_to_fk_constraint:0,add_sys_path:0,add_to:0,addit:0,advanc:0,advantag:0,advis:0,after:0,air:3,alia:0,all:[0,3],allow:[0,3],along:0,alreadi:0,also:[0,3],altern:0,alwai:0,an:[0,3],ani:0,anoth:0,api:[0,3],apicli:0,app:0,appdomain:[],appear:0,appli:[0,3],applic:0,apply_and_concat:0,ar:[0,3],arg:0,argument:0,around:[0,3],arrow:0,asset:[0,3],asset_nam:0,assign:0,associ:[],assum:0,attach:0,attachment_typ:0,attempt:0,attribut:0,auto:[],auto_insert:0,autodetect:0,automat:[0,3],autoreload:0,autoscenariodbt:0,avail:[0,3],avoid:[0,3],axi:0,b7bf7fd8:0,back:0,backward:3,base:0,bash:0,basic:3,bear:0,been:[0,3],befor:0,being:0,below:0,best:0,best_bound_kpi_nam:0,better:0,between:[0,3],bewar:0,binary_var_seri:0,binary_var_series_:0,binaryvartyp:0,blank:0,blob:0,bludb:[],blue:0,bobhaffn:0,bool:0,both:[0,3],bound:0,box:0,br:0,build:0,builder:[0,1],bulk:0,business_kpi:0,businesskpit:0,button:0,c:0,cach:0,call:0,callback:0,came:0,camel_case_to_snake_cas:0,camelcas:0,can:[0,3],cancel:0,cannot:[0,3],cartesian:0,cascad:[],categor:0,categori:0,caus:0,cell:[0,3],certain:0,certif:0,ch04s23:0,challeng:0,chang:0,channel:3,charact:0,chart:0,check:0,child:0,clean:0,cleanup:0,clear:0,clear_scenario_data:0,client:[0,3],cloud:[0,3],cluster4:0,cluster:0,cluster_nam:0,co:0,code:[0,3],cogno:0,collabor:0,collect:0,color:0,column:0,column_nam:0,columns_metadata:0,com:0,combin:[0,3],command:0,commun:0,compass:0,compat:[0,3],complet:0,complex:0,compon:0,comput:0,conda:3,condit:0,conf:0,configur:[0,3],connect:[0,3],constant:0,constraint:[],constraints_metadata:0,constructor:0,contain:[0,3],content:2,context:0,continuous_var_seri:0,continuous_var_series_:0,continuousvartyp:0,control:0,conveni:0,convers:0,convert:0,cookbook:0,coord:0,copi:0,copy_to_csv:0,core:0,corner:0,correctli:0,could:0,count:0,counti:0,cp4d25:0,cp4daa:0,cp4dv2:0,cp4dv4:0,cp:[0,3],cpd25:0,cpd25util:2,cpd2:0,cpd3:[0,3],cpd40:0,cpd4:3,cpd:[0,3],cpd_cluster_host:0,cpdaa:0,cpdv2:[0,1],cpdv3:[0,3],cpdv4:[0,1],cplex:[0,3],cpo:0,cpolab:0,cpsaa:0,creat:[0,3],create_blank_map:0,create_database_engin:[],create_db2_engin:[],create_new_scenario:0,create_schema:0,create_sqllite_engin:[],create_table_metadata:0,creation:0,credenti:0,cross:0,crossjoin:3,csv:[0,3],csv_directori:0,csv_name_pattern:0,curl:0,current:0,current_dir:0,cursor:[],custom:0,d4c69a0d8158:0,d:[0,3],dash:0,dashboard:0,dashenterpris:0,data:[0,3],data_asset:[0,3],data_by_scenario:0,data_id:0,data_manag:0,data_url:0,databas:[],datafram:0,datamanag:[2,3],datascienceelit:0,dataset:0,datetim:0,db2:[],db2_credenti:[],db:0,db_tabl:0,db_table_nam:0,dd:[0,3],dd_scenario:0,de:0,debug:0,debug_file_data_url:0,debug_file_dir:0,decis:3,decision_optimization_cli:0,def:0,default_max_oaas_time_limit_sec:0,default_max_run_time_sec:0,default_scenario:0,default_valu:0,defin:0,definit:0,delai:0,delet:0,delete_scenario_from_db:[],delete_scenario_name_column:0,depend:[0,3],deploi:0,deploy:[0,3],deployed_model_nam:0,deployeddomodel:2,deployeddomodel_cpd21:0,deployeddomodelcpd21:2,deployment_id:0,deprec:0,design:[0,3],despit:0,detail:3,detect_platform:0,develop:[0,3],df1:0,df2:0,df:0,df_column_names_to_snake_cas:0,df_crossjoin_ai:0,df_crossjoin_mi:0,df_crossjoin_si:0,df_dict:0,dict:0,dictionari:0,differ:[0,3],direct:0,directori:0,disadvantag:0,disk:0,dm:0,do4w:0,do_model_nam:0,do_util:0,doc:0,docplex:[0,3],document:[0,3],dodashapp:0,doe:0,doesn:0,domodeldeploy:2,domodelexport:2,don:[],done:0,down:[0,3],download:[0,3],driven:0,drop:[0,3],drop_all_t:0,drop_column_nam:0,dropdown:0,dse:[0,3],dse_do_dashboard:0,dse_do_util:1,dsx:0,dsx_project_dir:0,dsxuser:0,due:0,dump:0,dumpzipnam:0,dure:0,dvar:[0,3],e:[0,3],each:0,easi:3,easier:0,echo:0,ef365b2c:0,effect:0,eg:0,either:0,element:0,els:0,emb:0,empti:[0,3],en:0,enable_sqlite_fk:0,enable_transact:0,encod:[],end:0,engin:[0,3],ensur:0,entiti:0,entri:0,enumer:0,env_is_cpd25:0,env_is_cpd40:0,env_is_dsx:0,env_is_wscloud:0,environ:[0,1],error:0,establish:0,evalu:0,exampl:0,excel:[0,3],excel_file_nam:0,excel_output_file_nam:0,excel_test:0,excelfil:0,excelwrit:0,exclud:0,execut:0,execute_model:0,execution_result:0,execution_statu:0,execution_status_json:0,exist:[0,3],expect:0,experi:0,explicit:0,explicitli:0,export_as_cpo:0,export_as_cpo_:0,export_as_lp:0,export_as_lp_:0,export_do_model:0,export_model:0,export_model_as_lp:0,expos:0,express:0,extend:0,extended_columns_metadata:0,extens:0,extract:0,extract_dvar_nam:0,extract_solut:0,f:0,fail:0,fake:3,fals:0,faster:0,featur:3,featuregroup:0,field:0,fig:0,file:[0,3],file_nam:0,file_path:0,filenam:0,filter:0,find:0,firefox:0,first:0,fk:[],fkc:0,flask:0,folder:0,folium:[0,3],follow:[0,3],forc:0,foreign:0,foreignkeyconstraint:0,form:0,format:0,former:[0,3],found:0,frame:0,free:0,from:[0,3],full:0,full_project_nam:0,func:0,futur:[0,3],g:[0,3],gap:[0,3],gener:0,get:0,get_access_token_curl:0,get_access_token_web:0,get_all_scenario_nam:0,get_arrow:0,get_bear:0,get_dash_tab_layout_m:0,get_data_directori:0,get_db2_connection_str:[],get_db_table_nam:0,get_dd_client:0,get_debug_dump_name_and_url:0,get_debug_file_url:0,get_deployment_id:0,get_df_column_nam:0,get_do_model_export_curl:0,get_do_model_export_web:0,get_do_scenario:0,get_execution_service_model_url:0,get_execution_statu:0,get_head:0,get_html_tabl:0,get_input_fil:0,get_job_statu:0,get_job_url:0,get_kill_job_url:0,get_kpi_output_t:0,get_kpis_table_as_datafram:0,get_log_file_name_and_url:0,get_log_file_url:0,get_multi_scenario_data:0,get_object:0,get_output:0,get_parameter_valu:0,get_plotly_fig_m:0,get_popup_t:0,get_project_id:0,get_raw_table_by_nam:0,get_root_directori:0,get_scenario_picker_ui:0,get_scenario_refresh_button:0,get_scenario_select_drop_down:0,get_scenarios_df:0,get_selected_scenario:0,get_solution_name_and_url:0,get_solve_config:0,get_solve_detail:0,get_solve_details_object:0,get_solve_payload:0,get_solve_statu:0,get_solve_url:0,get_space_id:0,get_stop_job_url:0,get_tab_layout_:0,getcwd:0,gist:0,git:0,github:[0,3],githubpag:3,give:0,given:[],glob:0,grand:0,greatli:3,gsilabs_scnfo:0,h:0,ha:[0,3],hack:3,hand:0,happen:0,hard:0,have:[0,3],height:0,hello:0,here:0,hierarch:0,hold:0,home:0,host:[],hostnam:[],how:[0,3],howev:0,html:0,http:0,hypothet:0,i:0,ibm:[0,3],ibm_watson_machine_learn:0,ibm_watson_studio_lib:0,icon:0,icpd:3,id:0,ignor:[0,3],imp:0,impact:3,implement:0,improv:3,includ:0,inconsist:0,independ:0,index:[0,1],indic:0,individu:3,info:0,inform:0,init:0,initi:0,initialize_db_tables_metadata:[],inline_t:0,inner:0,input:0,input_csv_name_pattern:0,input_db_t:0,input_table_nam:0,insecurerequestwarn:0,insert:0,insert_scenarios_in_db:0,insert_single_scenario_tables_in_db:[],insert_table_in_db:[],insert_table_in_db_bulk:0,insert_tables_in_db:0,instal:[0,1],installationreadm:3,instanc:0,instead:0,integ:0,integer_var_list:0,integer_var_seri:0,integer_var_series_:0,integervartyp:0,intend:3,interact:[0,3],interfac:3,intermedi:0,intern:[0,3],internet:3,interrupt:0,interv:0,io:0,ipynb:0,ipywidget:0,issu:0,itself:3,jerom:0,job:0,job_config_json:0,job_detail:0,job_uid:0,join:0,json:0,jupyt:[0,3],jupyterlab:3,just:0,kansas_city_coord:0,karg:0,keep:0,kei:0,keyword:0,kill:0,kill_job:0,km:0,kpi:0,kpitabl:0,kwarg:0,lambda:0,last:0,lat:0,later:0,latest:0,layer_control_posit:0,leav:0,left:0,let:0,level:0,lib:0,librari:0,like:[0,3],limit:[0,3],line:0,list:0,list_file_hierarchi:0,lite:[],load:0,load_data:0,load_data_from_csv:0,load_data_from_csv_:0,load_data_from_excel:0,load_data_from_excel_:0,load_data_from_scenario:0,load_data_from_scenario_:0,load_from_excel:0,load_selected_scenario_data:0,local:[0,3],local_root:0,locat:0,log:0,log_file_nam:0,logic:0,lon:0,longer:[0,3],look:0,loop:0,lp:[0,3],m:0,machin:0,made:0,mai:0,main:[0,1],maintain:0,major:0,make:0,manag:0,mani:3,manipul:[0,3],manual:0,map:[0,3],mapmanag:[2,3],marker:0,master:0,match:0,max_oaas_time_limit_sec:0,max_run_time_sec:0,maximum:0,mb:3,md:3,mdl:0,me:[0,1],mean:0,medium:0,member:0,menu:[0,3],merg:0,merge_scenario_data:0,messag:0,metadata:0,method:0,mgr:0,might:3,minu:0,mip_gap_kpi_nam:0,miss:0,mix:0,mkonrad:0,mode:0,model1:0,model2:0,model:[0,1],model_build:0,model_nam:0,modelbuild:0,modifi:0,modul:[1,2],module_reload:0,moment:3,monitor:0,monitor_execut:0,monitor_loop_delay_sec:0,more:[0,3],most:0,mostli:3,move:3,mp:0,msm:0,multi:0,multi_scenario:0,multiindex:0,multipl:[0,3],multiscenariomanag:2,must:0,my:0,my_default_scenario:0,my_do_model:0,my_funct:0,my_input_column_nam:0,my_input_valu:0,my_output_column_name_1:0,my_output_column_name_2:0,my_output_value1:0,my_output_value_1:0,my_output_value_2:0,my_schema:[],my_tabl:0,myexcelfil:0,myexcelfileoutput:0,myfil:0,mymodel:0,myoptimizationengin:0,myprogresslisten:0,mytabl:0,n:0,n_arrow:0,name:0,namedtupl:0,nbviewer:0,necessari:0,need:0,neither:3,net:0,never:0,new_path:0,new_scenario_nam:0,next:0,nodefault:3,non:0,none:0,not_start:0,note:[0,3],notebook:[0,3],notify_progress:0,now:0,number:0,oaa:0,object:0,off:0,ok:0,onc:0,one:0,ones:0,onli:[0,3],open:0,oper:0,optim:[0,3],optimizationengin:[2,3],option:[0,3],order:0,ordereddict:0,ore:3,oreilli:0,org:0,organ:0,origin:0,os:0,other:[0,3],otherwis:0,out:0,output:0,output_csv_name_pattern:0,output_db_t:0,output_table_nam:0,outsid:3,overrid:0,overwrit:0,overwritten:0,p1:0,p2:0,packag:[1,2,3],page:[0,1],page_id:0,page_sourc:0,paid:[],pak:3,panda:0,panel:0,param:0,param_nam:0,param_typ:0,paramet:0,parametert:0,pardir:0,parent:0,parent_dir:0,parent_dir_2:0,pars:0,parse_html:0,part:0,particular:[0,3],pass:0,password1:[],password:0,past:0,path:0,pattern:0,payload:0,pd:0,per:0,perform:3,period:0,person:0,phase:0,pick:3,picker:0,pip:[0,3],place:0,placehold:0,plain:0,platform:0,plot:0,plotli:0,plotly_cpd_workaround:2,plotlymanag:2,plugin:0,point:0,poll:0,polylin:0,popul:0,popup:0,popup_t:0,port:[],possibl:0,post:[0,3],post_process_contain:0,post_process_container_get_datafram:0,post_process_fail:0,post_process_inline_t:0,post_process_inline_table_get_datafram:0,post_process_interrupt:0,post_process_process:0,practic:0,pre:[0,3],prefer:3,prep_paramet:0,prepar:0,prepare_data_fram:0,prepare_input_data_fram:0,prepare_output_data_fram:0,prevent:0,previou:3,primari:0,print:0,print_hello:0,print_inputs_outputs_summari:0,print_table_nam:0,problem:0,procedur:0,process:[0,3],product:0,productionplan:0,progress:0,progress_data:0,progressdata:0,project:[0,3],project_access_token:0,project_data:[0,3],project_id:0,project_lib:0,project_nam:0,properli:[],properti:0,property_1:0,property_2:0,provid:[0,3],put:3,pwd:0,py:0,pydata:0,pypi:3,python:[0,3],question:0,queu:0,quot:0,rais:0,raw:0,re:0,reach:0,read:[0,1],read_csv:0,read_scenario_from_db:0,read_scenario_table_from_db:0,read_scenario_table_from_db_cach:0,read_scenario_table_from_db_callback:0,read_scenario_tables_from_db:0,read_scenario_tables_from_db_cach:0,read_scenarios_from_db:0,read_scenarios_table_from_db_cach:0,read_scenarios_table_from_db_callback:0,readthedoc:0,reason:0,record:0,reduc:0,refactor:3,refer:0,refine_conflict:0,refresh:0,regist:0,regular:0,regularli:[0,3],rel:0,relat:0,relationship:0,releas:3,relev:0,reliabl:0,reload:0,remot:0,remov:0,renam:0,repeatedli:0,replac:0,replace_data_in_scenario:0,replace_data_into_scenario_:0,replace_scenario_in_db:0,repositori:3,repres:0,represent:0,request:0,requir:[0,1],rerun:0,resourc:0,respons:0,rest:0,restor:0,restrict:0,result:0,retreiv:0,retriev:0,retrieve_debug_materi:0,retrieve_fil:0,retrieve_solut:0,retrieve_solve_configur:0,revers:[],right:0,root:0,root_dir:0,rotat:0,round:0,rout:0,routin:0,row:0,run:[0,3],runtime_env_apsx_url:0,s:0,same:[0,3],save:0,scenario:[0,3],scenario_1:0,scenario_nam:0,scenario_table_nam:0,scenariodbmanag:2,scenariodbt:0,scenariomanag:[2,3],scenariopick:[2,3],scenariorefreshbutton:0,scenarios_table_read_callback:0,scenariot:0,schema:0,scnfo:0,scnfo_dash_pycharm_github:0,scope:1,screen:0,script:3,search:[0,1],second:0,secur:[],see:[0,3],seem:0,select:0,self:0,separ:[0,3],sequenc:0,seri:0,server:0,servic:0,service_configuration_json:0,service_nam:0,session:[],set:0,set_index:0,set_output_settings_in_solve_configur:0,set_scenarios_table_read_callback:0,set_table_read_callback:0,setup:0,share:3,sheet:0,should:[0,3],show:0,side:0,signific:3,similar:0,simpl:0,simplest:0,simpli:0,sinc:0,singl:0,site:0,size:0,skip:0,sm:0,small:0,snake_cas:0,so:0,solut:0,solution_count_kpi_nam:0,solutionlisten:0,solv:0,solve_config:0,solve_config_json:0,solve_payload:0,solve_phase_kpi_nam:0,solve_statu:0,solve_time_kpi_nam:0,solvesolut:0,some:[0,3],someth:0,somewhat:0,sourc:[0,3],sp:0,space:0,space_id:0,space_nam:0,spd:0,specif:[],specifi:0,speed:0,spreadhseet:3,spreadsheet:0,sql:0,sqlalchemi:0,sqlcol:0,ssl:0,stackoverflow:0,stamp:0,standard:0,start:0,startpath:0,state:0,statement:0,statu:0,step:0,stop:0,stop_job:0,storag:0,store:[0,3],str:0,strftime:0,string:0,strongli:0,structur:0,studio:[0,3],sub:0,subclass:[0,3],submiss:0,submodul:2,succesfulli:0,suffici:0,suggest:0,summari:0,support:0,suppress:0,suppress_warn:0,sure:0,sy:0,system:[0,3],t:0,tabl:[0,3],table_index_sheet:0,table_nam:0,table_read_callback:0,target:[0,1],task:0,templat:0,template_scenario_nam:0,temporari:0,termin:0,test:0,text:0,than:0,thei:0,them:0,therebi:0,therefor:[0,3],thi:[0,3],thing:0,those:0,thu:0,time:0,todo:0,token:0,tooltip:0,top:0,topleft:0,track:0,transact:0,translat:0,tree:0,truth:0,tupl:0,turn:0,two:0,txt:0,type:0,typic:[0,3],ugli:0,ui:0,un:0,under:0,unfortun:0,uniqu:0,unknown:0,unnam:0,unverifi:0,up:[0,3],updat:0,update_solve_output_into_scenario:0,upload:[0,3],url:0,urllib3:0,us:[0,3],usag:[0,3],user1:[],user:0,user_access_token:0,user_nam:0,usernam:[],util:[2,3],v0:3,v2:3,v4:3,valid:0,valu:0,value_1:0,value_2:0,value_format:0,valueerror:0,variabl:0,venv:0,veri:3,verif:0,verifi:0,verify_integr:0,version:[2,3],via:0,view:0,violat:[],visibl:0,visual:[0,3],w:0,wa:0,wai:0,want:0,warehous:[],warn:0,watson:[0,3],watsonmachinelearningapicli:0,we:0,web:0,well:0,what:0,whatev:0,wheel:3,when:[0,3],where:0,which:0,whole:0,widget:0,widget_button:0,widget_select:0,width:0,wil:0,window:0,within:[0,3],without:0,wml:1,wml_credenti:0,work:[0,3],workaround:[],world:0,worri:[],would:0,write:[0,3],write_data_asset_as_file_cpd25:0,write_data_asset_as_file_wsc:0,write_data_into_scenario:0,write_data_into_scenario_:0,write_data_to_csv:0,write_data_to_csv_:0,write_data_to_excel:0,write_data_to_excel_:0,write_do_model_to_fil:0,writer:0,written:0,ws:[0,3],wsl1:0,wsl:[0,3],wslib:0,wslv1:3,wsuser:0,www:0,xdvar:0,xl:0,xlsx:0,xlx:0,xxxxxx:0,y:0,yet:0,you:0,your:0,yyyymmdd_hhmm:0,zip:[0,3],zoom_start:0},titles:["dse_do_utils package","Welcome to DSE DO Utils documentation!","dse_do_utils","Read me"],titleterms:{"0":3,"5":3,"class":3,"do":[1,3],"import":3,builder:3,content:[0,1],cpd25util:0,cpdv2:3,cpdv4:3,custom:3,datamanag:0,deployeddomodel:0,deployeddomodelcpd21:0,document:1,domodeldeploy:0,domodelexport:0,dse:1,dse_do_util:[0,2,3],environ:3,indic:1,instal:3,main:3,mapmanag:0,me:3,model:3,modul:[0,3],multiscenariomanag:0,optimizationengin:0,packag:0,plotly_cpd_workaround:0,plotlymanag:0,read:3,requir:3,scenariodbmanag:0,scenariomanag:0,scenariopick:0,scope:3,submodul:0,tabl:1,target:3,util:[0,1],version:0,welcom:1,wml:3}}) \ No newline at end of file diff --git a/docs/source/dse_do_utils.rst b/docs/source/dse_do_utils.rst index 2e9fc57..4e59039 100644 --- a/docs/source/dse_do_utils.rst +++ b/docs/source/dse_do_utils.rst @@ -76,6 +76,14 @@ dse\_do\_utils.optimizationengine module :undoc-members: :show-inheritance: +dse\_do\_utils.plotly\_cpd\_workaround module +--------------------------------------------- + +.. automodule:: dse_do_utils.plotly_cpd_workaround + :members: + :undoc-members: + :show-inheritance: + dse\_do\_utils.plotlymanager module ----------------------------------- diff --git a/dse_do_utils/version.py b/dse_do_utils/version.py index 6e26a58..23c02c4 100644 --- a/dse_do_utils/version.py +++ b/dse_do_utils/version.py @@ -9,4 +9,4 @@ See https://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package """ -__version__ = "0.5.3.0b" +__version__ = "0.5.3.0"