diff --git a/CHANGELOG.md b/CHANGELOG.md index 78b3659..9457a4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased]## [0.5.4.5b0] +### Changed + +## [0.5.4.4] - 2022-04-28 +### Added +- ScenarioManager.load_data_from_zip_csv_s: loading input data from a zipped archive of csv files +- ScenarioManager.write_data_to_zip_csv_s: writing input/output data as a zipped archive of csv files +### Removed +- ScenarioManager.write_data_to_csv_s no longer adds files as data assets + ## [0.5.4.3] - 2022-04-21 ### Changed - Fixed indentation bug in domodeldeployer diff --git a/docs/doc_build/doctrees/dse_do_utils.doctree b/docs/doc_build/doctrees/dse_do_utils.doctree index 978251d..29b44f8 100644 Binary files a/docs/doc_build/doctrees/dse_do_utils.doctree and b/docs/doc_build/doctrees/dse_do_utils.doctree differ diff --git a/docs/doc_build/doctrees/environment.pickle b/docs/doc_build/doctrees/environment.pickle index 29d9c00..012c290 100644 Binary files a/docs/doc_build/doctrees/environment.pickle and b/docs/doc_build/doctrees/environment.pickle differ diff --git a/docs/doc_build/html/.buildinfo b/docs/doc_build/html/.buildinfo index 8bab9a6..f454eb1 100644 --- a/docs/doc_build/html/.buildinfo +++ b/docs/doc_build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: a2fef2d4d97989a7a252359bf54f6f01 +config: f8f9929cad760595d068a901248ae903 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/doc_build/html/_modules/dse_do_utils.html b/docs/doc_build/html/_modules/dse_do_utils.html index 5ec0f7a..5e77e88 100644 --- a/docs/doc_build/html/_modules/dse_do_utils.html +++ b/docs/doc_build/html/_modules/dse_do_utils.html @@ -6,7 +6,7 @@ - dse_do_utils — DSE DO Utils 0.5.4.2 documentation + dse_do_utils — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/cpd25utilities.html b/docs/doc_build/html/_modules/dse_do_utils/cpd25utilities.html index 0291296..2926153 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/cpd25utilities.html +++ b/docs/doc_build/html/_modules/dse_do_utils/cpd25utilities.html @@ -6,7 +6,7 @@ - dse_do_utils.cpd25utilities — DSE DO Utils 0.5.4.2 documentation + dse_do_utils.cpd25utilities — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/datamanager.html b/docs/doc_build/html/_modules/dse_do_utils/datamanager.html index fc5a882..7255597 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/datamanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/datamanager.html @@ -6,7 +6,7 @@ - dse_do_utils.datamanager — DSE DO Utils 0.5.4.2 documentation + dse_do_utils.datamanager — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

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

    Source code for dse_do_utils.datamanager

                 else:
                     param = raw_param
             else:
    -            print('Warning: {} not in Parameters'.format(param_name))
    +            print(f'Warning: {param_name} not in Parameters. Using default value = {default_value}')
                 # If datetime, the default value can be a string
                 import six  # For Python 2 and 3 compatibility of testing string instance
                 if param_type == 'datetime' and isinstance(default_value, six.string_types):
    @@ -456,7 +456,7 @@ 

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/deployeddomodel.html b/docs/doc_build/html/_modules/dse_do_utils/deployeddomodel.html index 339b87a..2fd123c 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/deployeddomodel.html +++ b/docs/doc_build/html/_modules/dse_do_utils/deployeddomodel.html @@ -6,7 +6,7 @@ - dse_do_utils.deployeddomodel — DSE DO Utils 0.5.4.2 documentation + dse_do_utils.deployeddomodel — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/deployeddomodelcpd21.html b/docs/doc_build/html/_modules/dse_do_utils/deployeddomodelcpd21.html index 7d2b21d..79c19b4 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/deployeddomodelcpd21.html +++ b/docs/doc_build/html/_modules/dse_do_utils/deployeddomodelcpd21.html @@ -6,7 +6,7 @@ - dse_do_utils.deployeddomodelcpd21 — DSE DO Utils 0.5.4.2 documentation + dse_do_utils.deployeddomodelcpd21 — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/domodeldeployer.html b/docs/doc_build/html/_modules/dse_do_utils/domodeldeployer.html index b5084a3..cb09f97 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/domodeldeployer.html +++ b/docs/doc_build/html/_modules/dse_do_utils/domodeldeployer.html @@ -6,7 +6,7 @@ - dse_do_utils.domodeldeployer — DSE DO Utils 0.5.4.3 documentation + dse_do_utils.domodeldeployer — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/domodelexporter.html b/docs/doc_build/html/_modules/dse_do_utils/domodelexporter.html index 2c9ae17..273af97 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/domodelexporter.html +++ b/docs/doc_build/html/_modules/dse_do_utils/domodelexporter.html @@ -6,7 +6,7 @@ - dse_do_utils.domodelexporter — DSE DO Utils 0.5.4.2 documentation + dse_do_utils.domodelexporter — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/mapmanager.html b/docs/doc_build/html/_modules/dse_do_utils/mapmanager.html index 499e0a3..742604e 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/mapmanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/mapmanager.html @@ -6,7 +6,7 @@ - dse_do_utils.mapmanager — DSE DO Utils 0.5.4.3 documentation + dse_do_utils.mapmanager — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/multiscenariomanager.html b/docs/doc_build/html/_modules/dse_do_utils/multiscenariomanager.html index b7316c1..7c3070e 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/multiscenariomanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/multiscenariomanager.html @@ -6,7 +6,7 @@ - dse_do_utils.multiscenariomanager — DSE DO Utils 0.5.4.2 documentation + dse_do_utils.multiscenariomanager — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/optimizationengine.html b/docs/doc_build/html/_modules/dse_do_utils/optimizationengine.html index 8270c7b..c4163b1 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/optimizationengine.html +++ b/docs/doc_build/html/_modules/dse_do_utils/optimizationengine.html @@ -6,7 +6,7 @@ - dse_do_utils.optimizationengine — DSE DO Utils 0.5.4.3 documentation + dse_do_utils.optimizationengine — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/plotlymanager.html b/docs/doc_build/html/_modules/dse_do_utils/plotlymanager.html index c89771e..1076f6a 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/plotlymanager.html +++ b/docs/doc_build/html/_modules/dse_do_utils/plotlymanager.html @@ -6,7 +6,7 @@ - dse_do_utils.plotlymanager — DSE DO Utils 0.5.4.2 documentation + dse_do_utils.plotlymanager — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

  • modules |
  • - + @@ -118,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 b29800d..da33eae 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.4.3 documentation + dse_do_utils.scenariodbmanager — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

  • modules |
  • - + @@ -1722,7 +1722,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 ec4e11b..da2857b 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.4.3 documentation + dse_do_utils.scenariomanager — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

  • modules |
  • - + @@ -56,12 +56,15 @@

    Source code for dse_do_utils.scenariomanager

    import glob
     import pathlib
     import zipfile
    +import tempfile
     
     import docplex
     import pandas as pd
     from typing import Sequence, List, Dict, Tuple, Optional
     
     #  Typing aliases
    +from dse_do_utils.utilities import convert_size
    +
     Inputs = Dict[str, pd.DataFrame]
     Outputs = Dict[str, pd.DataFrame]
     InputsOutputs = Tuple[Inputs, Outputs]
    @@ -966,21 +969,13 @@ 

    Source code for dse_do_utils.scenariomanager

    file_path = os.path.join(csv_directory, table_name + ".csv")
                     print("Writing {}".format(file_path))
                     df.to_csv(file_path, index=False)
    -                ScenarioManager.add_file_as_data_asset_s(file_path, table_name + ".csv", platform=platform)
    -                # if platform == Platform.CPD40:
    -                #     ScenarioManager.add_data_file_using_ws_lib_s(file_path)
    -                # elif platform in [Platform.CPD25, Platform.CPDaaS]:
    -                #     ScenarioManager.add_data_file_to_project_s(file_path, table_name + ".csv")
    +                # ScenarioManager.add_file_as_data_asset_s(file_path, table_name + ".csv", platform=platform)
             if outputs is not None:
                 for table_name, df in outputs.items():
                     file_path = os.path.join(csv_directory, table_name + ".csv")
                     print("Writing {}".format(file_path))
    -                df.to_csv(file_path, index=False)
    -                ScenarioManager.add_file_as_data_asset_s(file_path, table_name + ".csv", platform=platform)
    - # if platform == Platform.CPD40: - # ScenarioManager.add_data_file_using_ws_lib_s(file_path) - # elif platform in [Platform.CPD25, Platform.CPDaaS]: - # ScenarioManager.add_data_file_to_project_s(file_path, table_name + ".csv") + df.to_csv(file_path, index=False)
    + # ScenarioManager.add_file_as_data_asset_s(file_path, table_name + ".csv", platform=platform) # ----------------------------------------------------------------- # Load data from parquet @@ -1065,6 +1060,66 @@

    Source code for dse_do_utils.scenariomanager

    print("Writing output {}".format(file_path))
                     df.to_parquet(file_path, index=False)
    + # ----------------------------------------------------------------- + # Read from / write to zipped set of csv files + # ----------------------------------------------------------------- +
    [docs] @staticmethod + def load_data_from_zip_csv_s(zip_file_path: str, file_size_limit: int = None, **kwargs) -> Dict[str, pd.DataFrame]: + """Read data from a zip file with .csv files. + + Args: + zip_file_path (str): the full path of a zip file containing one or more .csv files. + file_size_limit (int): maximum file size in bytes. None implies no limit. + **kwargs: Set of optional arguments for the pd.read_csv() function + + Returns: + data: dict of DataFrames. Keys are the .csv file names. + """ + inputs = {} + + with zipfile.ZipFile(zip_file_path, "r") as f: + for csv_file in f.infolist(): + if pathlib.Path(csv_file.filename).suffix.lower() == '.csv': + table_name = pathlib.Path(csv_file.filename).stem + # print(f"Reading table = {table_name}. File-size = {convert_size(csv_file.file_size)}") + if file_size_limit is None or csv_file.file_size <= file_size_limit: + df = pd.read_csv(f.open(csv_file.filename), **kwargs) + inputs[table_name] = df + #print(f"Read {table_name}: {df.shape[0]} rows and {df.shape[1]} columns") + else: + pass + #print(f"Read {table_name}: skipped") + + return inputs
    + +
    [docs] @staticmethod + def write_data_to_zip_csv_s(zip_file_path: str, inputs: Inputs = None, outputs: Outputs = None, **kwargs): + """Write data as a zip file with .csv files. + inputs and outputs dictionaries are merged and written in same zip. + + Args: + zip_file_path (str): the full path of a zip file. + inputs: dict of input DataFrames + outputs: dict of input DataFrames + **kwargs: Set of optional arguments for the df.to_csv() function + + Returns: + None + """ + dfs = {} + if inputs is not None: + dfs = {**dfs, **inputs} + if outputs is not None: + dfs = {**dfs, **outputs} + with zipfile.ZipFile(zip_file_path, 'w') as zipMe: + with tempfile.TemporaryDirectory() as tmpdir: + for table_name, df in dfs.items(): + filename = table_name + ".csv" + file_path = os.path.join(tmpdir, filename) + # print(f"Write table {table_name}, rows = {df.shape[0]} as {file_path}") + df.to_csv(file_path, index=False, **kwargs) + zipMe.write(file_path, arcname=filename, compress_type=zipfile.ZIP_DEFLATED)
    + # ----------------------------------------------------------------- # Utils # ----------------------------------------------------------------- @@ -1220,7 +1275,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/scenariopicker.html b/docs/doc_build/html/_modules/dse_do_utils/scenariopicker.html index dc432ee..92db4d7 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/scenariopicker.html +++ b/docs/doc_build/html/_modules/dse_do_utils/scenariopicker.html @@ -6,7 +6,7 @@ - dse_do_utils.scenariopicker — DSE DO Utils 0.5.4.2 documentation + dse_do_utils.scenariopicker — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/dse_do_utils/utilities.html b/docs/doc_build/html/_modules/dse_do_utils/utilities.html index ffcb227..5cda33b 100644 --- a/docs/doc_build/html/_modules/dse_do_utils/utilities.html +++ b/docs/doc_build/html/_modules/dse_do_utils/utilities.html @@ -6,7 +6,7 @@ - dse_do_utils.utilities — DSE DO Utils 0.5.4.2 documentation + dse_do_utils.utilities — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

  • modules |
  • - + @@ -114,6 +114,22 @@

    Source code for dse_do_utils.utilities

                 print('{}{}'.format(subindent, f))
    +
    [docs]def convert_size(size_bytes: int): + """Returns string describing file size. + + Args: + size_bytes (int): size if file in bytes + + From https://stackoverflow.com/questions/5194057/better-way-to-convert-file-sizes-in-python + """ + import math + if size_bytes == 0: + return "0B" + size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") + i = int(math.floor(math.log(size_bytes, 1024))) + p = math.pow(1024, i) + s = round(size_bytes / p, 2) + return "%s %s" % (s, size_name[i])
    @@ -146,7 +162,7 @@

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_modules/index.html b/docs/doc_build/html/_modules/index.html index 13cd274..875e6a9 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.4.3 documentation + Overview: module code — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/_static/bizstyle.js b/docs/doc_build/html/_static/bizstyle.js index d6de99e..acf1a61 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.4.3 documentation"); + $("li.nav-item-0 a").text("DSE DO Utils 0.5.4.4 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 05bee0b..405b9f4 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.4.3', + VERSION: '0.5.4.4', 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 c60dc9f..9e44a70 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.4.3 documentation + dse_do_utils package — DSE DO Utils 0.5.4.4 documentation @@ -35,7 +35,7 @@

    Navigation

  • previous |
  • - + @@ -2689,6 +2689,27 @@

    Submodules +
    +static load_data_from_zip_csv_s(zip_file_path: str, file_size_limit: Optional[int] = None, **kwargs) Dict[str, pandas.core.frame.DataFrame][source]
    +

    Read data from a zip file with .csv files.

    +
    +
    Parameters
    +
      +
    • zip_file_path (str) – the full path of a zip file containing one or more .csv files.

    • +
    • file_size_limit (int) – maximum file size in bytes. None implies no limit.

    • +
    • **kwargs – Set of optional arguments for the pd.read_csv() function

    • +
    +
    +
    Returns
    +

    dict of DataFrames. Keys are the .csv file names.

    +
    +
    Return type
    +

    data

    +
    +
    +
    +
    print_table_names() None[source]
    @@ -2845,6 +2866,26 @@

    Submodules +
    +static write_data_to_zip_csv_s(zip_file_path: str, inputs: Optional[Dict[str, pandas.core.frame.DataFrame]] = None, outputs: Optional[Dict[str, pandas.core.frame.DataFrame]] = None, **kwargs)[source]
    +

    Write data as a zip file with .csv files. +inputs and outputs dictionaries are merged and written in same zip.

    +
    +
    Parameters
    +
      +
    • zip_file_path (str) – the full path of a zip file.

    • +
    • inputs – dict of input DataFrames

    • +
    • outputs – dict of input DataFrames

    • +
    • **kwargs – Set of optional arguments for the df.to_csv() function

    • +
    +
    +
    Returns
    +

    None

    +
    +
    +

    + @@ -2953,6 +2994,18 @@

    Submodules +
    +dse_do_utils.utilities.convert_size(size_bytes: int)[source]
    +

    Returns string describing file size.

    +
    +
    Parameters
    +

    size_bytes (int) – size if file in bytes

    +
    +
    +

    From https://stackoverflow.com/questions/5194057/better-way-to-convert-file-sizes-in-python

    +
    +
    dse_do_utils.utilities.list_file_hierarchy(startpath: str) None[source]
    @@ -3106,7 +3159,7 @@

    Navigation

  • previous |
  • - + diff --git a/docs/doc_build/html/genindex.html b/docs/doc_build/html/genindex.html index be0a381..6942b5e 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.4.3 documentation + Index — DSE DO Utils 0.5.4.4 documentation @@ -31,7 +31,7 @@

    Navigation

  • modules |
  • - + @@ -141,6 +141,8 @@

    C

  • continuous_var_series() (dse_do_utils.optimizationengine.OptimizationEngine method)
  • continuous_var_series_s() (dse_do_utils.optimizationengine.OptimizationEngine static method) +
  • +
  • convert_size() (in module dse_do_utils.utilities)
  • CPD25 (dse_do_utils.scenariomanager.Platform attribute)
  • @@ -595,10 +597,10 @@

    L

  • load_data_from_excel_s() (dse_do_utils.scenariomanager.ScenarioManager static method)
  • - - +
  • load_data_from_scenario_s() (dse_do_utils.scenariomanager.ScenarioManager method) +
  • +
  • load_data_from_zip_csv_s() (dse_do_utils.scenariomanager.ScenarioManager static method)
  • load_selected_scenario_data() (dse_do_utils.scenariopicker.ScenarioPicker method)
  • @@ -870,10 +874,10 @@

    W

  • write_data_to_csv() (dse_do_utils.scenariomanager.ScenarioManager method)
  • - - + @@ -128,7 +128,7 @@

    Navigation

  • next |
  • - + diff --git a/docs/doc_build/html/modules.html b/docs/doc_build/html/modules.html index 11406f5..155302d 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.4.3 documentation + dse_do_utils — DSE DO Utils 0.5.4.4 documentation @@ -39,7 +39,7 @@

    Navigation

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

    Navigation

  • previous |
  • - + diff --git a/docs/doc_build/html/objects.inv b/docs/doc_build/html/objects.inv index 864557c..e65c11f 100644 Binary files a/docs/doc_build/html/objects.inv and b/docs/doc_build/html/objects.inv differ diff --git a/docs/doc_build/html/py-modindex.html b/docs/doc_build/html/py-modindex.html index 4a50b51..885c2a1 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.4.3 documentation + Python Module Index — DSE DO Utils 0.5.4.4 documentation @@ -34,7 +34,7 @@

    Navigation

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

    Navigation

  • modules |
  • - + diff --git a/docs/doc_build/html/readme_link.html b/docs/doc_build/html/readme_link.html index f3d5614..a536d28 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.4.3 documentation + Read me — DSE DO Utils 0.5.4.4 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 9bee47d..4ce8613 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.4.3 documentation + Search — DSE DO Utils 0.5.4.4 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 0b5c469..43f4521 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,""],set_parameters:[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.domodeldeployer":{DOModelDeployer:[0,2,1,""]},"dse_do_utils.domodeldeployer.DOModelDeployer":{create_archive:[0,3,1,""],create_model_archive:[0,3,1,""],create_model_directory:[0,3,1,""],create_package_extension:[0,3,1,""],create_software_specification:[0,3,1,""],create_zip_package_extension:[0,3,1,""],deploy_archive:[0,3,1,""],deploy_model:[0,3,1,""],get_scenario:[0,3,1,""],get_wml_create_deployment_meta_props:[0,3,1,""],get_wml_create_store_model_meta_props:[0,3,1,""],guid_from_space_name:[0,3,1,""],wml_create_deployment:[0,3,1,""],wml_store_model:[0,3,1,""],write_main_file:[0,3,1,""],write_yaml_file:[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,""],get_tooltip_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,""],DbCellUpdate:[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,""],get_sa_table:[0,3,1,""],insert_table_in_db_bulk:[0,3,1,""]},"dse_do_utils.scenariodbmanager.DbCellUpdate":{column_name:[0,4,1,""],current_value:[0,4,1,""],previous_value:[0,4,1,""],row_idx:[0,4,1,""],row_index:[0,4,1,""],scenario_name:[0,4,1,""],table_name:[0,4,1,""]},"dse_do_utils.scenariodbmanager.ScenarioDbManager":{add_scenario_name_to_dfs:[0,3,1,""],create_schema:[0,3,1,""],delete_scenario_from_db:[0,3,1,""],delete_scenario_name_column:[0,3,1,""],drop_all_tables:[0,3,1,""],duplicate_scenario_in_db:[0,3,1,""],get_scenario_db_table:[0,3,1,""],get_scenarios_df:[0,3,1,""],insert_scenarios_from_zip:[0,3,1,""],insert_scenarios_in_db:[0,3,1,""],insert_tables_in_db:[0,3,1,""],read_multi_scenario_tables_from_db:[0,3,1,""],read_scenario_from_db:[0,3,1,""],read_scenario_input_tables_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,""],rename_scenario_in_db:[0,3,1,""],replace_scenario_in_db:[0,3,1,""],replace_scenario_tables_in_db:[0,3,1,""],set_scenarios_table_read_callback:[0,3,1,""],set_table_read_callback:[0,3,1,""],update_cell_changes_in_db:[0,3,1,""],update_scenario_output_tables_in_db:[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,""],get_sa_column:[0,3,1,""],get_sa_table:[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,""],insert_scenarios_from_zip:[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_parquet:[0,3,1,""],load_data_from_parquet_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,""],write_data_to_parquet:[0,3,1,""],write_data_to_parquet_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,"-"],domodeldeployer:[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],"01":0,"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,"2022":0,"21":0,"21c8ac71":0,"23690284":0,"25a0fe88e4":0,"26c1":0,"277618282":0,"2fcustom_librari":0,"2fdeploy":0,"2fnotebook":0,"2fpython_sdk":0,"2fuse":0,"2fwatson":0,"3":[0,3],"31":0,"37188b1a8b48be2bef34b35b55f01cba0d29ed19":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,"5de6560a1cfa":0,"6":0,"600":0,"68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f49424d2f776174736f6e2d6d616368696e652d6c6561726e696e672d73616d706c65732f333731383862316138623438626532626566333462333562353566303163626130643239656431392f637064342e302f6e6f7465626f6f6b732f707974686f6e5f73646b2f6465706c6f796d656e74732f637573746f6d5f6c6962726172792f5573652532307363696b69742d6c6561726e253230616e64253230637573746f6d2532306c696272617279253230746f2532307072656469637425323074656d70657261747572652e6970796e62":0,"7":3,"785":0,"8021":0,"8364":0,"94":0,"95":0,"96":0,"98":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,"super":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: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],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],android:0,ani:0,anoth:0,anywher:0,api:[0,3],apicli:0,app:0,appear:0,appli:[0,3],applic:0,apply_and_concat:0,ar:[0,3],archiv:0,arg:0,argument:0,around:[0,3],arrow:0,asset:[0,3],asset_nam:0,assign:0,assum:0,astyp:0,attach:0,attachment_typ:0,attempt: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,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,blue:0,bobhaffn:0,boilerpl:0,bool:0,both:[0,3],bound:0,box:0,br:0,browser: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,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,chrome: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,color_mod:0,column:0,column_nam:0,columns_metadata:0,com:0,combin:[0,3],command:0,commit:0,commun:0,compass:0,compat:[0,3],complet:0,complex:0,compon:0,comput:0,conda:[0,3],condit:0,conf:0,configur:[0,3],connect:[0,3],constant: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:[0,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_arch:0,create_blank_map:0,create_model_arch:0,create_model_directori:0,create_new_scenario:0,create_package_extens:0,create_schema:0,create_software_specif:0,create_table_metadata:0,create_zip_package_extens: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,current_valu: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_directori:0,data_id:0,data_manag:0,data_url:0,datafram:0,datamanag:[2,3],datascienceelit:0,dataset:0,datatyp:0,datetim:0,db:0,db_cell_upd:0,db_column_nam:0,db_table_nam:0,dbcellupd: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],deploy_arch:0,deploy_model:0,deployed_model_nam:0,deployeddomodel:2,deployeddomodel_cpd21:0,deployeddomodelcpd21:2,deployment_descript:0,deployment_id:0,deployment_nam:0,deployment_uid:0,deprec:0,design:[0,3],despit:0,detail:3,detect_platform:0,develop:[0,3],devic:0,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,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,duplic:0,duplicate_scenario_in_db:0,dure:0,dvar:[0,3],e:[0,3],each:0,easi:[0,3],easier:0,easili:0,echo:0,ef365b2c:0,effect:0,effici:0,eg:0,either:0,element:0,els:0,emb:0,empti:[0,3],en:0,enabl:0,enable_astyp:0,enable_debug_print:0,enable_sqlite_fk:0,enable_transact:0,enc_url: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,evalu:0,exampl:0,excel:[0,3],excel_file_nam:0,excel_output_file_nam:0,excel_test:0,excelfil:0,excelwrit:0,except: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_name_pattern:0,file_path:0,filenam:0,filepath:0,filter:0,find:0,firefox:0,first:0,fix:0,fkc:0,flask:0,folder:0,folium:[0,3],follow:[0,3],footer:0,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_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_sa_column:0,get_sa_t:0,get_scenario:0,get_scenario_db_t: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,get_tooltip_t:0,get_wml_create_deployment_meta_prop:0,get_wml_create_store_model_meta_prop:0,getcwd:0,gist:0,git:0,github:[0,3],githubpag:3,githubusercont:0,give:0,given:0,glob:0,grand:0,greatli:3,gsilabs_scnfo:0,guid_from_space_nam:0,h:0,ha:[0,3],hack:3,hand:0,handl:0,happen:0,hard:0,have:[0,3],header:0,height:0,hello:0,here:0,hierarch:0,hold:0,home: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:[0,3],includ:0,inconsist:0,incorrect:0,independ:0,index:[0,1],indic:0,individu:[0,3],info:0,inform:0,init:0,initi:0,inline_t:0,inner:0,input:0,input_csv_name_pattern:0,input_db_t:0,input_name_pattern:0,input_table_nam:0,insecurerequestwarn:0,insert:0,insert_scenarios_from_zip:0,insert_scenarios_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:[0,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,lead:0,learn: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,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_parquet:0,load_data_from_parquet_:0,load_data_from_scenario:0,load_data_from_scenario_:0,load_from_excel:0,load_selected_scenario_data:0,local:[0,3],local_relative_data_path:0,local_root:0,locat:0,log:0,log_file_nam:0,logged_in: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],main_file_path:0,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:[0,3],mdl:0,me:[0,1],mean:0,medium:0,member:0,menu:[0,3],merg:0,merge_scenario_data:0,messag:0,meta_prop: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_archive_file_path:0,model_build:0,model_nam:0,model_uid: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,multi_thread: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_modul: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_tabl:0,myclass: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,nwo:0,oaa:0,object:0,off:0,ok:0,omit: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_name_pattern:0,output_table_nam:0,outsid:3,overrid:0,overridden:0,overwrit:0,overwritten:0,p1:0,p2:0,packag:[1,2,3],package_extens:0,package_path:0,package_zip_filepath:0,page:[0,1],page_id:0,page_sourc:0,pair: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,parquet:0,pars:0,parse_html:0,part:0,particular:[0,3],pass:0,password:0,past:0,path:0,pattern:0,payload:0,pd:0,per:0,perform:[0,3],period:0,person:0,phase:0,pick:3,picker:0,pip:[0,3],pkg_ext_id:0,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,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],predict:0,prefer:3,prep_paramet:0,prepar:0,prepare_data_fram:0,prepare_input_data_fram:0,prepare_output_data_fram:0,present:0,prevent:0,previou:3,previous_valu:0,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,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_multi_scenario_tables_from_db:0,read_parquet:0,read_scenario_from_db:0,read_scenario_input_tables_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,reflect: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,rename_scenario_in_db:0,repeatedli:0,replac:0,replace_data_in_scenario:0,replace_data_into_scenario_:0,replace_scenario_in_db:0,replace_scenario_tables_in_db:0,repositori:[0,3],repository_id:0,repository_typ:0,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,right:0,root:0,root_dir:0,rotat:0,round:0,rout:0,routin:0,row:0,row_idx:0,row_index:0,run:[0,3],runtime_env_apsx_url:0,s:0,same:[0,3],sampl:0,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,scikit:0,scnfo:0,scnfo_dash_pycharm_github:0,scope:1,screen:0,script:3,search:[0,1],second: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,set:0,set_index:0,set_output_settings_in_solve_configur:0,set_paramet: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,simplenamespac: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],source_scenario_nam:0,sp:0,space:0,space_id:0,space_nam:0,spd:0,specifi:0,speed:0,spreadhseet:3,spreadsheet:0,sql:0,sqlachemi: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,surround:0,sw_spec_id:0,sy:0,system:[0,3],t:0,tabl:[0,3],table_index_sheet:0,table_metadata:0,table_nam:0,table_read_callback:0,target:[0,1],target_scenario_nam:0,task:0,temperatur: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,time_limit:0,tmp_dir:0,todo:0,token:0,tooltip:0,tooltip_t:0,top:0,topleft:0,touch: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,uid:0,un:0,under:0,unfortun:0,uniqu:0,unknown:0,unnam:0,untest:0,unverifi:0,up:[0,3],updat:0,update_cell_changes_in_db:0,update_scenario_output_tables_in_db:0,update_solve_output_into_scenario:0,upload:[0,3],url:0,urllib3:0,us:[0,3],usag:[0,3],user:0,user_access_token:0,user_nam: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,visibl:0,visual:[0,3],vt:0,w:0,wa:0,wai:0,want: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:[0,1],wml_create_deploy:0,wml_credenti:0,wml_store_model:0,work:[0,3],world: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_data_to_parquet:0,write_data_to_parquet_:0,write_do_model_to_fil:0,write_main_fil:0,write_yaml_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,xxx:0,xxxxxx:0,y:0,yaml_file_path:0,yet:0,yml: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 +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,""],set_parameters:[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.domodeldeployer":{DOModelDeployer:[0,2,1,""]},"dse_do_utils.domodeldeployer.DOModelDeployer":{create_archive:[0,3,1,""],create_model_archive:[0,3,1,""],create_model_directory:[0,3,1,""],create_package_extension:[0,3,1,""],create_software_specification:[0,3,1,""],create_zip_package_extension:[0,3,1,""],deploy_archive:[0,3,1,""],deploy_model:[0,3,1,""],get_scenario:[0,3,1,""],get_wml_create_deployment_meta_props:[0,3,1,""],get_wml_create_store_model_meta_props:[0,3,1,""],guid_from_space_name:[0,3,1,""],wml_create_deployment:[0,3,1,""],wml_store_model:[0,3,1,""],write_main_file:[0,3,1,""],write_yaml_file:[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,""],get_tooltip_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,""],DbCellUpdate:[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,""],get_sa_table:[0,3,1,""],insert_table_in_db_bulk:[0,3,1,""]},"dse_do_utils.scenariodbmanager.DbCellUpdate":{column_name:[0,4,1,""],current_value:[0,4,1,""],previous_value:[0,4,1,""],row_idx:[0,4,1,""],row_index:[0,4,1,""],scenario_name:[0,4,1,""],table_name:[0,4,1,""]},"dse_do_utils.scenariodbmanager.ScenarioDbManager":{add_scenario_name_to_dfs:[0,3,1,""],create_schema:[0,3,1,""],delete_scenario_from_db:[0,3,1,""],delete_scenario_name_column:[0,3,1,""],drop_all_tables:[0,3,1,""],duplicate_scenario_in_db:[0,3,1,""],get_scenario_db_table:[0,3,1,""],get_scenarios_df:[0,3,1,""],insert_scenarios_from_zip:[0,3,1,""],insert_scenarios_in_db:[0,3,1,""],insert_tables_in_db:[0,3,1,""],read_multi_scenario_tables_from_db:[0,3,1,""],read_scenario_from_db:[0,3,1,""],read_scenario_input_tables_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,""],rename_scenario_in_db:[0,3,1,""],replace_scenario_in_db:[0,3,1,""],replace_scenario_tables_in_db:[0,3,1,""],set_scenarios_table_read_callback:[0,3,1,""],set_table_read_callback:[0,3,1,""],update_cell_changes_in_db:[0,3,1,""],update_scenario_output_tables_in_db:[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,""],get_sa_column:[0,3,1,""],get_sa_table:[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,""],insert_scenarios_from_zip:[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_parquet:[0,3,1,""],load_data_from_parquet_s:[0,3,1,""],load_data_from_scenario:[0,3,1,""],load_data_from_scenario_s:[0,3,1,""],load_data_from_zip_csv_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,""],write_data_to_parquet:[0,3,1,""],write_data_to_parquet_s:[0,3,1,""],write_data_to_zip_csv_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,""],convert_size:[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,"-"],domodeldeployer:[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],"01":0,"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,"2022":0,"21":0,"21c8ac71":0,"23690284":0,"25a0fe88e4":0,"26c1":0,"277618282":0,"2fcustom_librari":0,"2fdeploy":0,"2fnotebook":0,"2fpython_sdk":0,"2fuse":0,"2fwatson":0,"3":[0,3],"31":0,"37188b1a8b48be2bef34b35b55f01cba0d29ed19":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,"5194057":0,"5401":0,"585241":0,"5de6560a1cfa":0,"6":0,"600":0,"68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f49424d2f776174736f6e2d6d616368696e652d6c6561726e696e672d73616d706c65732f333731383862316138623438626532626566333462333562353566303163626130643239656431392f637064342e302f6e6f7465626f6f6b732f707974686f6e5f73646b2f6465706c6f796d656e74732f637573746f6d5f6c6962726172792f5573652532307363696b69742d6c6561726e253230616e64253230637573746f6d2532306c696272617279253230746f2532307072656469637425323074656d70657261747572652e6970796e62":0,"7":3,"785":0,"8021":0,"8364":0,"94":0,"95":0,"96":0,"98":0,"9f28":0,"abstract":0,"byte":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,"super":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: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],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],android:0,ani:0,anoth:0,anywher:0,api:[0,3],apicli:0,app:0,appear:0,appli:[0,3],applic:0,apply_and_concat:0,ar:[0,3],archiv:0,arg:0,argument:0,around:[0,3],arrow:0,asset:[0,3],asset_nam:0,assign:0,assum:0,astyp:0,attach:0,attachment_typ:0,attempt: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,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,blue:0,bobhaffn:0,boilerpl:0,bool:0,both:[0,3],bound:0,box:0,br:0,browser: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,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,chrome: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,color_mod:0,column:0,column_nam:0,columns_metadata:0,com:0,combin:[0,3],command:0,commit:0,commun:0,compass:0,compat:[0,3],complet:0,complex:0,compon:0,comput:0,conda:[0,3],condit:0,conf:0,configur:[0,3],connect:[0,3],constant: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,convert_s: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:[0,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_arch:0,create_blank_map:0,create_model_arch:0,create_model_directori:0,create_new_scenario:0,create_package_extens:0,create_schema:0,create_software_specif:0,create_table_metadata:0,create_zip_package_extens: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,current_valu: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_directori:0,data_id:0,data_manag:0,data_url:0,datafram:0,datamanag:[2,3],datascienceelit:0,dataset:0,datatyp:0,datetim:0,db:0,db_cell_upd:0,db_column_nam:0,db_table_nam:0,dbcellupd: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],deploy_arch:0,deploy_model:0,deployed_model_nam:0,deployeddomodel:2,deployeddomodel_cpd21:0,deployeddomodelcpd21:2,deployment_descript:0,deployment_id:0,deployment_nam:0,deployment_uid:0,deprec:0,describ:0,design:[0,3],despit:0,detail:3,detect_platform:0,develop:[0,3],devic:0,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,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,duplic:0,duplicate_scenario_in_db:0,dure:0,dvar:[0,3],e:[0,3],each:0,easi:[0,3],easier:0,easili:0,echo:0,ef365b2c:0,effect:0,effici:0,eg:0,either:0,element:0,els:0,emb:0,empti:[0,3],en:0,enabl:0,enable_astyp:0,enable_debug_print:0,enable_sqlite_fk:0,enable_transact:0,enc_url: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,evalu:0,exampl:0,excel:[0,3],excel_file_nam:0,excel_output_file_nam:0,excel_test:0,excelfil:0,excelwrit:0,except: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_name_pattern:0,file_path:0,file_size_limit:0,filenam:0,filepath:0,filter:0,find:0,firefox:0,first:0,fix:0,fkc:0,flask:0,folder:0,folium:[0,3],follow:[0,3],footer:0,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_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_sa_column:0,get_sa_t:0,get_scenario:0,get_scenario_db_t: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,get_tooltip_t:0,get_wml_create_deployment_meta_prop:0,get_wml_create_store_model_meta_prop:0,getcwd:0,gist:0,git:0,github:[0,3],githubpag:3,githubusercont:0,give:0,given:0,glob:0,grand:0,greatli:3,gsilabs_scnfo:0,guid_from_space_nam:0,h:0,ha:[0,3],hack:3,hand:0,handl:0,happen:0,hard:0,have:[0,3],header:0,height:0,hello:0,here:0,hierarch:0,hold:0,home: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,impli:0,improv:[0,3],includ:0,inconsist:0,incorrect:0,independ:0,index:[0,1],indic:0,individu:[0,3],info:0,inform:0,init:0,initi:0,inline_t:0,inner:0,input:0,input_csv_name_pattern:0,input_db_t:0,input_name_pattern:0,input_table_nam:0,insecurerequestwarn:0,insert:0,insert_scenarios_from_zip:0,insert_scenarios_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:[0,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,lead:0,learn: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,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_parquet:0,load_data_from_parquet_:0,load_data_from_scenario:0,load_data_from_scenario_:0,load_data_from_zip_csv_:0,load_from_excel:0,load_selected_scenario_data:0,local:[0,3],local_relative_data_path:0,local_root:0,locat:0,log:0,log_file_nam:0,logged_in: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],main_file_path:0,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:[0,3],mdl:0,me:[0,1],mean:0,medium:0,member:0,menu:[0,3],merg:0,merge_scenario_data:0,messag:0,meta_prop: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_archive_file_path:0,model_build:0,model_nam:0,model_uid: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,multi_thread: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_modul: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_tabl:0,myclass: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,nwo:0,oaa:0,object:0,off:0,ok:0,omit: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_name_pattern:0,output_table_nam:0,outsid:3,overrid:0,overridden:0,overwrit:0,overwritten:0,p1:0,p2:0,packag:[1,2,3],package_extens:0,package_path:0,package_zip_filepath:0,page:[0,1],page_id:0,page_sourc:0,pair: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,parquet:0,pars:0,parse_html:0,part:0,particular:[0,3],pass:0,password:0,past:0,path:0,pattern:0,payload:0,pd:0,per:0,perform:[0,3],period:0,person:0,phase:0,pick:3,picker:0,pip:[0,3],pkg_ext_id:0,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,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],predict:0,prefer:3,prep_paramet:0,prepar:0,prepare_data_fram:0,prepare_input_data_fram:0,prepare_output_data_fram:0,present:0,prevent:0,previou:3,previous_valu:0,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,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_multi_scenario_tables_from_db:0,read_parquet:0,read_scenario_from_db:0,read_scenario_input_tables_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,reflect: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,rename_scenario_in_db:0,repeatedli:0,replac:0,replace_data_in_scenario:0,replace_data_into_scenario_:0,replace_scenario_in_db:0,replace_scenario_tables_in_db:0,repositori:[0,3],repository_id:0,repository_typ:0,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,right:0,root:0,root_dir:0,rotat:0,round:0,rout:0,routin:0,row:0,row_idx:0,row_index:0,run:[0,3],runtime_env_apsx_url:0,s:0,same:[0,3],sampl:0,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,scikit:0,scnfo:0,scnfo_dash_pycharm_github:0,scope:1,screen:0,script:3,search:[0,1],second: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,set:0,set_index:0,set_output_settings_in_solve_configur:0,set_paramet: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,simplenamespac:0,simplest:0,simpli:0,sinc:0,singl:0,site:0,size:0,size_byt: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],source_scenario_nam:0,sp:0,space:0,space_id:0,space_nam:0,spd:0,specifi:0,speed:0,spreadhseet:3,spreadsheet:0,sql:0,sqlachemi: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,surround:0,sw_spec_id:0,sy:0,system:[0,3],t:0,tabl:[0,3],table_index_sheet:0,table_metadata:0,table_nam:0,table_read_callback:0,target:[0,1],target_scenario_nam:0,task:0,temperatur: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,time_limit:0,tmp_dir:0,to_csv:0,todo:0,token:0,tooltip:0,tooltip_t:0,top:0,topleft:0,touch: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,uid:0,un:0,under:0,unfortun:0,uniqu:0,unknown:0,unnam:0,untest:0,unverifi:0,up:[0,3],updat:0,update_cell_changes_in_db:0,update_scenario_output_tables_in_db:0,update_solve_output_into_scenario:0,upload:[0,3],url:0,urllib3:0,us:[0,3],usag:[0,3],user:0,user_access_token:0,user_nam: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,visibl:0,visual:[0,3],vt:0,w:0,wa:0,wai:0,want: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:[0,1],wml_create_deploy:0,wml_credenti:0,wml_store_model:0,work:[0,3],world: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_data_to_parquet:0,write_data_to_parquet_:0,write_data_to_zip_csv_:0,write_do_model_to_fil:0,write_main_fil:0,write_yaml_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,xxx:0,xxxxxx:0,y:0,yaml_file_path:0,yet:0,yml:0,you:0,your:0,yyyymmdd_hhmm:0,zip:[0,3],zip_file_path:0,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/dse_do_utils/datamanager.py b/dse_do_utils/datamanager.py index 3dd9f0a..1bc9472 100644 --- a/dse_do_utils/datamanager.py +++ b/dse_do_utils/datamanager.py @@ -181,7 +181,7 @@ def get_parameter_value(params, param_name: str, param_type: Optional[str] = Non else: param = raw_param else: - print('Warning: {} not in Parameters'.format(param_name)) + print(f'Warning: {param_name} not in Parameters. Using default value = {default_value}') # If datetime, the default value can be a string import six # For Python 2 and 3 compatibility of testing string instance if param_type == 'datetime' and isinstance(default_value, six.string_types): diff --git a/dse_do_utils/scenariomanager.py b/dse_do_utils/scenariomanager.py index d7db2ab..6ff0e1f 100644 --- a/dse_do_utils/scenariomanager.py +++ b/dse_do_utils/scenariomanager.py @@ -10,12 +10,15 @@ import glob import pathlib import zipfile +import tempfile import docplex import pandas as pd from typing import Sequence, List, Dict, Tuple, Optional # Typing aliases +from dse_do_utils.utilities import convert_size + Inputs = Dict[str, pd.DataFrame] Outputs = Dict[str, pd.DataFrame] InputsOutputs = Tuple[Inputs, Outputs] @@ -920,21 +923,13 @@ def write_data_to_csv_s(csv_directory: str, file_path = os.path.join(csv_directory, table_name + ".csv") print("Writing {}".format(file_path)) df.to_csv(file_path, index=False) - ScenarioManager.add_file_as_data_asset_s(file_path, table_name + ".csv", platform=platform) - # if platform == Platform.CPD40: - # ScenarioManager.add_data_file_using_ws_lib_s(file_path) - # elif platform in [Platform.CPD25, Platform.CPDaaS]: - # ScenarioManager.add_data_file_to_project_s(file_path, table_name + ".csv") + # ScenarioManager.add_file_as_data_asset_s(file_path, table_name + ".csv", platform=platform) if outputs is not None: for table_name, df in outputs.items(): file_path = os.path.join(csv_directory, table_name + ".csv") print("Writing {}".format(file_path)) df.to_csv(file_path, index=False) - ScenarioManager.add_file_as_data_asset_s(file_path, table_name + ".csv", platform=platform) - # if platform == Platform.CPD40: - # ScenarioManager.add_data_file_using_ws_lib_s(file_path) - # elif platform in [Platform.CPD25, Platform.CPDaaS]: - # ScenarioManager.add_data_file_to_project_s(file_path, table_name + ".csv") + # ScenarioManager.add_file_as_data_asset_s(file_path, table_name + ".csv", platform=platform) # ----------------------------------------------------------------- # Load data from parquet @@ -1019,6 +1014,66 @@ def write_data_to_parquet_s(directory: str, print("Writing output {}".format(file_path)) df.to_parquet(file_path, index=False) + # ----------------------------------------------------------------- + # Read from / write to zipped set of csv files + # ----------------------------------------------------------------- + @staticmethod + def load_data_from_zip_csv_s(zip_file_path: str, file_size_limit: int = None, **kwargs) -> Dict[str, pd.DataFrame]: + """Read data from a zip file with .csv files. + + Args: + zip_file_path (str): the full path of a zip file containing one or more .csv files. + file_size_limit (int): maximum file size in bytes. None implies no limit. + **kwargs: Set of optional arguments for the pd.read_csv() function + + Returns: + data: dict of DataFrames. Keys are the .csv file names. + """ + inputs = {} + + with zipfile.ZipFile(zip_file_path, "r") as f: + for csv_file in f.infolist(): + if pathlib.Path(csv_file.filename).suffix.lower() == '.csv': + table_name = pathlib.Path(csv_file.filename).stem + # print(f"Reading table = {table_name}. File-size = {convert_size(csv_file.file_size)}") + if file_size_limit is None or csv_file.file_size <= file_size_limit: + df = pd.read_csv(f.open(csv_file.filename), **kwargs) + inputs[table_name] = df + #print(f"Read {table_name}: {df.shape[0]} rows and {df.shape[1]} columns") + else: + pass + #print(f"Read {table_name}: skipped") + + return inputs + + @staticmethod + def write_data_to_zip_csv_s(zip_file_path: str, inputs: Inputs = None, outputs: Outputs = None, **kwargs): + """Write data as a zip file with .csv files. + inputs and outputs dictionaries are merged and written in same zip. + + Args: + zip_file_path (str): the full path of a zip file. + inputs: dict of input DataFrames + outputs: dict of input DataFrames + **kwargs: Set of optional arguments for the df.to_csv() function + + Returns: + None + """ + dfs = {} + if inputs is not None: + dfs = {**dfs, **inputs} + if outputs is not None: + dfs = {**dfs, **outputs} + with zipfile.ZipFile(zip_file_path, 'w') as zipMe: + with tempfile.TemporaryDirectory() as tmpdir: + for table_name, df in dfs.items(): + filename = table_name + ".csv" + file_path = os.path.join(tmpdir, filename) + # print(f"Write table {table_name}, rows = {df.shape[0]} as {file_path}") + df.to_csv(file_path, index=False, **kwargs) + zipMe.write(file_path, arcname=filename, compress_type=zipfile.ZIP_DEFLATED) + # ----------------------------------------------------------------- # Utils # ----------------------------------------------------------------- diff --git a/dse_do_utils/utilities.py b/dse_do_utils/utilities.py index ef88405..f9ff147 100644 --- a/dse_do_utils/utilities.py +++ b/dse_do_utils/utilities.py @@ -68,4 +68,20 @@ def list_file_hierarchy(startpath: str) -> None: print('{}{}'.format(subindent, f)) +def convert_size(size_bytes: int): + """Returns string describing file size. + + Args: + size_bytes (int): size if file in bytes + + From https://stackoverflow.com/questions/5194057/better-way-to-convert-file-sizes-in-python + """ + import math + if size_bytes == 0: + return "0B" + size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") + i = int(math.floor(math.log(size_bytes, 1024))) + p = math.pow(1024, i) + s = round(size_bytes / p, 2) + return "%s %s" % (s, size_name[i]) diff --git a/dse_do_utils/version.py b/dse_do_utils/version.py index 5825383..7a9311b 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.4.3" +__version__ = "0.5.4.4"