diff --git a/MANIFEST.in b/MANIFEST.in index 27cdbc2a93aba15cbab7911aac32bb0eb839265d..74deebee0aaab89108db97868e8998d9af45add8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,10 +10,9 @@ graft kadmos/interface/templates graft kadmos/utilities/cmdows graft kadmos/cmdows/schemas -# Include current vispack templates -graft kadmos/vispack/VISTOMS_170817 -graft kadmos/vispack/VISTOMS_dev -graft kadmos/vispack/VISTOMS_TreeViewer +# Include vistoms templates and static files +graft kadmos/vistoms/static +graft kadmos/vispack/templates # Include XDSM templates include kadmos/external/XDSM_writer/*.tex diff --git a/examples/scripts/ssbj_mdo.py b/examples/scripts/ssbj_mdo.py index d9f14a9d015167bf762baa95990e9dab570fc924..f8e8cabcca7740844ee74d5a8501ca3d569e3905 100644 --- a/examples/scripts/ssbj_mdo.py +++ b/examples/scripts/ssbj_mdo.py @@ -5,6 +5,8 @@ import logging from kadmos.graph import FundamentalProblemGraph, load # Settings for logging +from kadmos.graph.mixin_vistoms import vistoms_start + logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) # List of MDAO definitions that can be wrapped around the problem @@ -13,10 +15,12 @@ mdao_definitions = ['MDF-GS', # 0 'IDF', # 2 'CO', # 3 'BLISS-2000'] # 4 +all_graphs = [] # Settings for scripting mdao_definitions_loop_all = True # Option for looping through all MDAO definitions mdao_definition_id = 2 # Option for selecting a MDAO definition (in case mdao_definitions_loop_all=False) +start_interactive_vistoms = True # Option to start an interactive VISTOMS at the end # Settings for loading and saving kb_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../knowledgebases') @@ -107,6 +111,7 @@ rcg.save('RCG', destination_folder=cmdows_dir, pretty_print=True, integrity=True) +all_graphs.append(rcg) # On to the wrapping of the MDAO architectures # Get iterator (all or single one) @@ -185,6 +190,7 @@ for mdao_definition in mdao_definitions: fpg.add_problem_formulation(mdao_definition, function_order, doe_settings=None if mdao_definition is not 'BLISS-2000' else {'doe_method': 'Latin hypercube design', 'doe_seed': 5, 'doe_runs': 50}) + all_graphs.append(fpg) # Get Mdao graphs mdg, mpg = fpg.impose_mdao_architecture() @@ -213,5 +219,9 @@ for mdao_definition in mdao_definitions: version='0.1', pretty_print=True, integrity=True) + all_graphs.append((mdg,mpg)) logging.info('Done!') + +if start_interactive_vistoms: + vistoms_start(all_graphs, file_dir='ssbj/VISTOMStest') diff --git a/kadmos/graph/mixin_vistoms.py b/kadmos/graph/mixin_vistoms.py index eb6c98239a482fdbee8f16249cbad079f911bbfc..e10ec7e33f5eb33168dded0f719bf4232b97dc01 100644 --- a/kadmos/graph/mixin_vistoms.py +++ b/kadmos/graph/mixin_vistoms.py @@ -5,13 +5,12 @@ import re import shutil import linecache import logging -# noinspection PyPackageRequirements import tempfile import progressbar from kadmos.cmdows import CMDOWS -import kadmos.vispack as vispack +import kadmos.vistoms as vistoms from lxml import etree @@ -24,21 +23,61 @@ logger = logging.getLogger(__name__) THEDATA_PREFIX = ' theData = ' VISTOMS_NAME = 'VISTOMS.html' -VISTOMS_TV_NAME = 'VISTOMS_TreeViewer.html' -LOCAL_FILE_REFS = dict(REP__Acknowledgements__REP="file:include/Acknowledgements.svg", - REP__AGILE_Icon__REP="include/AGILE_Icon.png", - REP__AGILE_Logo__REP="file:include/AGILE_Logo.png", - REP__Contact__REP="file:include/Contact.svg", - REP__Home__REP="file:include/Home.svg", - REP__RWTH_Logo__REP="file:include/RWTH_Logo.svg", - REP__TUDelft_Logo__REP="file:include/TUDelft_Logo.svg", - REP__Tutorial__REP="file:include/Tutorial.svg", - REP__VISTOMS_Label__REP="file:include/VISTOMS_Label.svg") +VISTOMS_TV_NAME = 'VISTOMS_XMLviewer.html' + +VISTOMS_NAME_TEMP = 'VISTOMS_Static.html' +VISTOMS_TV_NAME_TEMP = 'VISTOMS_TreeViewer.html' + +LOCAL_PATH_PICTURES = os.path.join("file:static", "pictures") +LOCAL_FILE_REFS = dict(REP__Acknowledgements__REP=os.path.join(LOCAL_PATH_PICTURES, "Acknowledgements.svg"), + REP__AGILE_Icon__REP=os.path.join(LOCAL_PATH_PICTURES, "AGILE_Icon.png"), + REP__AGILE_Logo__REP=os.path.join(LOCAL_PATH_PICTURES, "AGILE_Logo.png"), + REP__Contact__REP=os.path.join(LOCAL_PATH_PICTURES, "Contact.svg"), + REP__Home__REP=os.path.join(LOCAL_PATH_PICTURES, "Home.svg"), + REP__RWTH_Logo__REP=os.path.join(LOCAL_PATH_PICTURES, "RWTH_Logo.svg"), + REP__TUDelft_Logo__REP=os.path.join(LOCAL_PATH_PICTURES, "TUDelft_Logo.svg"), + REP__Tutorial__REP=os.path.join(LOCAL_PATH_PICTURES, "Tutorial.svg"), + REP__VISTOMS_Label__REP=os.path.join(LOCAL_PATH_PICTURES, "VISTOMS_Label.svg")) + class VistomsMixin(object): + def vistoms_start(self, file_dir=None, mpg=None): + """Function to open an interactive VISTOMS based on the data graph and (optionally) the MPG. If file_dir is not + provided then the files are stored in a temp directory. + + :param file_dir: folder name or path where the graphs used in the interactive VISTOMS will be stored. + :type file_dir: path + :param mpg: MDAO process graph to be used in combination with the data graph. + :type mpg: MdaoProcessGraph + :return: interactive VISTOMS + :rtype: file + """ + + # Logging + logger.info('Creating the VISTOMS instance...') + + # If destination folder is given, create + use that + if file_dir is not None: + if os.path.isdir(file_dir): + shutil.rmtree(file_dir) + os.mkdir(file_dir) + vistoms_dir = os.path.abspath(file_dir) + # Else create temporary directory + else: + temp_dir = tempfile.mkdtemp() + vistoms_dir = os.path.abspath(temp_dir) + + # Save the graph (self) in the folder + self.save('tmp_01.kdms', destination_folder=vistoms_dir, mpg=mpg) + + # Then run interactive VISTOMS + from kadmos.vistoms.vistoms import run_vistoms + run_vistoms(folder=vistoms_dir) + def vistoms_create(self, vistoms_dir, vistoms_version=None, mpg=None, function_order=None, reference_file=None, - compress=False, remove_after_compress=True, graph_id=None, use_png_figs=False, file_refs=None, xml_file=None): + compress=False, remove_after_compress=True, graph_id=None, use_png_figs=False, file_refs=None, + xml_file=None): """Function to create a new VISTOMS instance from a graph. :type self: KadmosGraph @@ -78,7 +117,7 @@ class VistomsMixin(object): vistoms_dir = os.path.abspath(vistoms_dir) # Initiate VISTOMS instance - vispack.copy(temp_dir, vispack_version=vistoms_version) + vistoms.copy(temp_dir, vistoms_version='Static') # Create dictionary for the data.json file data = dict(graphs=[], categories=[]) @@ -120,13 +159,13 @@ class VistomsMixin(object): # Perform the text replacement rep = dict((re.escape(k), v) for k, v in rep.iteritems()) pattern = re.compile("|".join(rep.keys())) - with open(os.path.join(temp_dir, 'VISTOMS_datarepl.html'), "rt") as fin: + with open(os.path.join(temp_dir, VISTOMS_NAME_TEMP), "rt") as fin: with open(os.path.join(temp_dir, VISTOMS_NAME), "wt") as fout: for line in fin: fout.write(pattern.sub(lambda m: rep[re.escape(m.group(0))], line)) # Remove the original VISTOMS file - os.remove(os.path.join(temp_dir, 'VISTOMS_datarepl.html')) + os.remove(os.path.join(temp_dir, VISTOMS_NAME_TEMP)) # Copy temp directory to file path # Remove previous VISTOMS directory (if present) @@ -242,82 +281,40 @@ class VistomsMixin(object): return - def vistoms_add_json(self, vistoms_dir, mpg=None, function_order=None, reference_file=None, graph_id=None, replacement_id=None, xml_file=None): + def vistoms_add_json(self, mpg=None, function_order=None, graph_id=None): """Function to add a graph to a existing VISTOMS instance. In one VISTOMS instance different graphs can be shown. For example it is possible to include different architectures for the same problem in one VISTOMS instance. - :param vistoms_dir: directory of the VISTOMS directory to be used for addition - :type vistoms_dir: str :param mpg: optional MPG graph to be saved with MDG as XDSM (if None a DSM is created) :type mpg: MdaoProcessGraph :param function_order: optional function order for the diagonal of the graph (only applicable for DSMs) :type function_order: list - :param reference_file: file from which reference values are extracted (either full path or file in same folder) - :type reference_file: str - :param replacement_id: indentifier of the graph to be replaced - :type replacement_id: basestr - :param xml_file: Name of the CMDOWS xml-file - :type xml_file: file """ # Check inputs - self._vistoms_assertions(mpg, function_order, reference_file, None, graph_id) - if replacement_id: - assert isinstance(replacement_id, str), 'The attribute replacement_id should be of type str.' - assert os.path.exists(vistoms_dir), 'There is not VISTOMS instance at %s.' % vistoms_dir - assert os.path.exists(os.path.join(vistoms_dir, VISTOMS_NAME)), VISTOMS_NAME + \ - ' not found in folder %s.' % vistoms_dir + self._vistoms_assertions(mpg, function_order, None, None, graph_id) # Logging logger.info('Adding graph to the VISTOMS instance (this might take a while)...') - # Create vistoms file name path - vistoms_file = os.path.join(vistoms_dir, VISTOMS_NAME) - - # Get the graph data and line number - data, data_linenumber = _get_the_data(vistoms_file) - - - if data == 'REP__GRAPH_DATA__REP': - # Create dictionary for the data.json file - data = dict(graphs=[], categories=[]) - # Add categories - data['categories'].append({'name': 'schema', 'description': 'schema'}) - data['categories'].append({"name": "catschema_nodeLev", "description": "node levels"}) - data['categories'].append({"name": "catschema_funLev", "description": "function levels"}) - data['categories'].append({"name": "catschema_roleLev", "description": "role levels"}) - data['categories'].append({"name": "catschema_sysLev", "description": "system levels"}) - - - if replacement_id is not None: - # Find IDs in the current data.json - graph_ids = [graph['id'] for graph in data['graphs']] - assert replacement_id in graph_ids, 'Could not find replacement_id: %s. Available IDs: %s.' % \ - (replacement_id, graph_ids) - replacement_index = graph_ids.index(replacement_id) - if graph_id is None: - if replacement_id is None: - if data == 'REP__GRAPH_DATA__REP': - graph_id = '01' - else: - graph_id = str(len(data['graphs']) + 1).zfill(2) - assert int(graph_id) < 100, 'graph_id (%d) should be smaller than 100.' % int(graph_id) - else: - graph_id = replacement_id - + # if data == 'REP__GRAPH_DATA__REP': + # Create dictionary for the data.json file + data = dict(graphs=[], categories=[]) + # Add categories + data['categories'].append({'name': 'schema', 'description': 'schema'}) + data['categories'].append({"name": "catschema_nodeLev", "description": "node levels"}) + data['categories'].append({"name": "catschema_funLev", "description": "function levels"}) + data['categories'].append({"name": "catschema_roleLev", "description": "role levels"}) + data['categories'].append({"name": "catschema_sysLev", "description": "system levels"}) # Determine graph data entry - graph_entry = self._vispack_get_graph_data_entry(graph_id, mpg=mpg, order=function_order, - reference_file=reference_file, xml_file=xml_file) + graph_entry = self._vispack_get_graph_data_entry(graph_id, mpg=mpg, order=function_order,reference_file=None, xml_file=None) # Add graph_entry at the right location - if replacement_id is None: - data['graphs'].append(graph_entry) - else: - data['graphs'][replacement_index] = graph_entry + data['graphs'].append(graph_entry) # Replace the graph data data_str = json.dumps(data) @@ -974,6 +971,51 @@ class VistomsMixin(object): return variable_tree_categorized_function_level +def vistoms_start(graphs, file_dir=None): + """Function to open an interactive VISTOMS based on a list of data and (optionally) process graphs. If file_dir is + not provided then the files are stored in a temp directory. + + :param graphs: list or tuple with graphs. For pure data graphs, provide the graph object directly in the list. For + data+process graphs, provide them as a list or tuple pair with first the data graph and then process graph. + :type graphs: list or tuple + :param file_dir: folder name or path where the graphs used in the interactive VISTOMS will be stored. + :type file_dir: path + :param mpg: MDAO process graph to be used in combination with the data graph. + :type mpg: MdaoProcessGraph + :return: interactive VISTOMS + :rtype: file + """ + + # Logging + logger.info('Creating the VISTOMS instance...') + + # Assert input + assert isinstance(graphs, (list, tuple)), 'Input should be of type list or tuple, now: {}.'.format(type(graphs)) + + # If destination folder is given, create + use that + if file_dir is not None: + if os.path.isdir(file_dir): + shutil.rmtree(file_dir) + os.mkdir(file_dir) + vistoms_dir = os.path.abspath(file_dir) + # Else create temporary directory + else: + temp_dir = tempfile.mkdtemp() + vistoms_dir = os.path.abspath(temp_dir) + + # Save the graphs in the folder + for i, graph in enumerate(graphs): + i_str = format(i+1, '02d') + if isinstance(graph, (list, tuple)): + graph[0].save('tmp_{}.kdms'.format(i_str), destination_folder=vistoms_dir, mpg=graph[1]) + else: + graph.save('tmp_{}.kdms'.format(i_str), destination_folder=vistoms_dir) + + # Then run interactive VISTOMS + from kadmos.vistoms.vistoms import run_vistoms + run_vistoms(folder=vistoms_dir) + + def vistoms_remove(graph_id, vistoms_dir, compress=False, remove_after_compress=True): """ Function to remove a graph from a VISTOMS instance. @@ -1095,7 +1137,7 @@ def get_vistoms_tree_viewer(xml_file, vistoms_dir, use_png_figs=False, file_refs vistoms_dir = os.path.abspath(vistoms_dir) # Initiate VISTOMS instance - vispack.copy(temp_dir, vispack_version="TreeViewer") + vistoms.copy(temp_dir, vistoms_version="TreeViewer") # Settings dummy_tool_name = '__dummy__' @@ -1146,13 +1188,13 @@ def get_vistoms_tree_viewer(xml_file, vistoms_dir, use_png_figs=False, file_refs # Perform the text replacement rep = dict((re.escape(k), v) for k, v in rep.iteritems()) pattern = re.compile("|".join(rep.keys())) - with open(os.path.join(temp_dir, "VISTOMS_TreeViewer_datarepl.html"), "rt") as fin: + with open(os.path.join(temp_dir, VISTOMS_TV_NAME_TEMP), "rt") as fin: with open(os.path.join(temp_dir, VISTOMS_TV_NAME), "wt") as fout: for line in fin: fout.write(pattern.sub(lambda m: rep[re.escape(m.group(0))], line)) # Remove the original VISTOMS file - os.remove(os.path.join(temp_dir, 'VISTOMS_TreeViewer_datarepl.html')) + os.remove(os.path.join(temp_dir, VISTOMS_TV_NAME_TEMP)) # Remove the dummy files os.remove(dummy_cmdows_file) diff --git a/kadmos/vispack/__init__.py b/kadmos/vispack/__init__.py deleted file mode 100644 index 581420d3ccceac93811be56283e7a8e9314ec8f6..0000000000000000000000000000000000000000 --- a/kadmos/vispack/__init__.py +++ /dev/null @@ -1,44 +0,0 @@ -import shutil -import os -import re - - -def version(): - """Function returns most recent visualization package version""" - - search_path = os.path.dirname(os.path.abspath(__file__)) - subdirs = [name for name in os.listdir(search_path) if os.path.isdir(os.path.join(search_path, name))] - versions = [re.findall('\d+', subdir) for subdir in subdirs] - - return str(max(versions)[0]) - - -def copy(vispack_destination, vispack_version=None): - """ - Function to copy a version of the visualization package to a new destination. - - :param vispack_destination: name of the folder to put the visualization package - :type vispack_destination: basestring - :param vispack_version: version of the visualization package in yymmdd format - :type vispack_version: basestring, None - :return: folder with visualization package - :rtype: file - """ - - # Get vispack version - if vispack_version is None: - vispack_version = version() - - # Get directory name of the vispack - vispack_folder = 'VISTOMS_' + vispack_version - - # Get path names - src = os.path.join(os.path.dirname(os.path.abspath(__file__)), vispack_folder) - dst = os.path.abspath(vispack_destination) - - # Remove destination directory and copy files - if os.path.isdir(dst): - shutil.rmtree(dst) - shutil.copytree(src, dst) - - return diff --git a/kadmos/vistoms/__init__.py b/kadmos/vistoms/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8a767e1d637096a6bc044a484871f5a49896bb69 --- /dev/null +++ b/kadmos/vistoms/__init__.py @@ -0,0 +1,41 @@ +import shutil +import os + +VISTOMS_NAME_TEMP = 'VISTOMS_Static.html' +VISTOMS_TV_NAME_TEMP = 'VISTOMS_TreeViewer.html' + +def copy(vistoms_destination, vistoms_version='Static'): + """ + Function to copy a version of the visualization package to a new destination. + + :param vistoms_destination: name of the folder to put the visualization package + :type vistoms_destination: basestring + :param vistoms_version: version of the visualization package ('Static' or 'TreeViewer') + :type vistoms_version: basestring + :return: folder with visualization package + :rtype: file + """ + + # Set directory and file name of the VISTOMS templates and static files + vistoms_folder = 'templates' + if vistoms_version == 'Static': + vistoms_file = VISTOMS_NAME_TEMP + elif vistoms_version == 'TreeViewer': + vistoms_file = VISTOMS_TV_NAME_TEMP + else: + raise IOError('Invalid vistoms_version {} provided. Expected Static or TreeViewer.'.format(vistoms_version)) + static_folder = 'static' + + # Get path names + src_html = os.path.join(os.path.dirname(os.path.abspath(__file__)), vistoms_folder, vistoms_file) + src_static = os.path.join(os.path.dirname(os.path.abspath(__file__)), static_folder) + + dst = os.path.abspath(vistoms_destination) + + # Remove destination directory and copy files + if os.path.isdir(dst): + shutil.rmtree(dst) + shutil.copytree(src_static, os.path.join(dst, 'static')) + shutil.copy2(src_html, os.path.join(dst, vistoms_file)) + + return diff --git a/kadmos/vispack/VISTOMS/static/lib/bowser/bowser.js b/kadmos/vistoms/static/lib/bowser/bowser.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/bowser/bowser.js rename to kadmos/vistoms/static/lib/bowser/bowser.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/css/bootstrap-theme.css.map b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/css/bootstrap-theme.css.map similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/css/bootstrap-theme.css.map rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/css/bootstrap-theme.css.map diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/css/bootstrap-theme.min.css b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/css/bootstrap-theme.min.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/css/bootstrap-theme.min.css rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/css/bootstrap-theme.min.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/css/bootstrap.css.map b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/css/bootstrap.css.map similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/css/bootstrap.css.map rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/css/bootstrap.css.map diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/css/bootstrap.min.css b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/css/bootstrap.min.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/css/bootstrap.min.css rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/css/bootstrap.min.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.eot b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.eot rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.eot diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.svg b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.svg rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.svg diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.woff b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.woff rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.woff diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/js/bootbox.min.js b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/js/bootbox.min.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/js/bootbox.min.js rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/js/bootbox.min.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/js/bootstrap.min.js b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/js/bootstrap.min.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/js/bootstrap.min.js rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/js/bootstrap.min.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/js/npm.js b/kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/js/npm.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/dist/js/npm.js rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/dist/js/npm.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/.csscomb.json b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/.csscomb.json similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/.csscomb.json rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/.csscomb.json diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/.csslintrc b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/.csslintrc similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/.csslintrc rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/.csslintrc diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/alerts.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/alerts.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/alerts.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/alerts.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/badges.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/badges.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/badges.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/badges.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/bootstrap.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/bootstrap.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/bootstrap.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/bootstrap.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/breadcrumbs.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/breadcrumbs.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/breadcrumbs.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/breadcrumbs.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/button-groups.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/button-groups.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/button-groups.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/button-groups.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/buttons.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/buttons.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/buttons.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/buttons.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/carousel.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/carousel.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/carousel.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/carousel.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/close.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/close.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/close.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/close.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/code.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/code.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/code.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/code.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/component-animations.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/component-animations.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/component-animations.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/component-animations.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/dropdowns.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/dropdowns.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/dropdowns.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/dropdowns.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/forms.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/forms.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/forms.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/forms.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/glyphicons.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/glyphicons.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/glyphicons.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/glyphicons.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/grid.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/grid.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/grid.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/grid.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/input-groups.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/input-groups.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/input-groups.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/input-groups.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/jumbotron.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/jumbotron.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/jumbotron.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/jumbotron.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/labels.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/labels.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/labels.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/labels.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/list-group.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/list-group.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/list-group.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/list-group.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/media.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/media.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/media.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/media.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/alerts.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/alerts.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/alerts.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/alerts.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/background-variant.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/background-variant.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/background-variant.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/background-variant.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/border-radius.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/border-radius.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/border-radius.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/border-radius.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/buttons.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/buttons.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/buttons.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/buttons.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/center-block.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/center-block.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/center-block.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/center-block.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/clearfix.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/clearfix.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/clearfix.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/clearfix.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/forms.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/forms.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/forms.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/forms.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/gradients.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/gradients.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/gradients.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/gradients.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/grid-framework.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/grid-framework.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/grid-framework.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/grid-framework.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/grid.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/grid.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/grid.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/grid.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/hide-text.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/hide-text.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/hide-text.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/hide-text.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/image.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/image.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/image.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/image.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/labels.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/labels.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/labels.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/labels.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/list-group.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/list-group.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/list-group.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/list-group.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/nav-divider.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/nav-divider.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/nav-divider.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/nav-divider.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/nav-vertical-align.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/nav-vertical-align.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/nav-vertical-align.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/nav-vertical-align.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/opacity.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/opacity.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/opacity.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/opacity.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/pagination.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/pagination.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/pagination.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/pagination.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/panels.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/panels.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/panels.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/panels.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/progress-bar.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/progress-bar.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/progress-bar.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/progress-bar.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/reset-filter.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/reset-filter.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/reset-filter.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/reset-filter.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/reset-text.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/reset-text.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/reset-text.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/reset-text.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/resize.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/resize.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/resize.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/resize.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/responsive-visibility.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/responsive-visibility.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/responsive-visibility.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/responsive-visibility.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/size.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/size.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/size.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/size.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/tab-focus.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/tab-focus.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/tab-focus.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/tab-focus.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/table-row.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/table-row.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/table-row.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/table-row.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/text-emphasis.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/text-emphasis.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/text-emphasis.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/text-emphasis.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/text-overflow.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/text-overflow.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/text-overflow.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/text-overflow.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/vendor-prefixes.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/vendor-prefixes.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/mixins/vendor-prefixes.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/mixins/vendor-prefixes.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/modals.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/modals.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/modals.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/modals.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/navbar.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/navbar.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/navbar.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/navbar.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/navs.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/navs.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/navs.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/navs.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/normalize.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/normalize.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/normalize.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/normalize.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/pager.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/pager.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/pager.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/pager.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/pagination.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/pagination.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/pagination.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/pagination.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/panels.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/panels.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/panels.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/panels.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/popovers.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/popovers.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/popovers.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/popovers.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/print.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/print.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/print.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/print.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/progress-bars.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/progress-bars.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/progress-bars.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/progress-bars.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/responsive-embed.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/responsive-embed.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/responsive-embed.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/responsive-embed.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/responsive-utilities.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/responsive-utilities.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/responsive-utilities.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/responsive-utilities.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/scaffolding.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/scaffolding.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/scaffolding.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/scaffolding.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/tables.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/tables.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/tables.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/tables.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/theme.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/theme.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/theme.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/theme.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/thumbnails.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/thumbnails.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/thumbnails.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/thumbnails.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/tooltip.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/tooltip.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/tooltip.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/tooltip.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/type.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/type.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/type.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/type.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/utilities.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/utilities.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/utilities.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/utilities.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/variables.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/variables.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/variables.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/variables.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/wells.less b/kadmos/vistoms/static/lib/lobipanel/bootstrap/less/wells.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/bootstrap/less/wells.less rename to kadmos/vistoms/static/lib/lobipanel/bootstrap/less/wells.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/css/lobipanel.css b/kadmos/vistoms/static/lib/lobipanel/css/lobipanel.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/css/lobipanel.css rename to kadmos/vistoms/static/lib/lobipanel/css/lobipanel.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/demo/demo.css b/kadmos/vistoms/static/lib/lobipanel/demo/demo.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/demo/demo.css rename to kadmos/vistoms/static/lib/lobipanel/demo/demo.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/demo/documentation.css b/kadmos/vistoms/static/lib/lobipanel/demo/documentation.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/demo/documentation.css rename to kadmos/vistoms/static/lib/lobipanel/demo/documentation.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/dist/css/lobipanel.css b/kadmos/vistoms/static/lib/lobipanel/dist/css/lobipanel.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/dist/css/lobipanel.css rename to kadmos/vistoms/static/lib/lobipanel/dist/css/lobipanel.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/dist/css/lobipanel.min.css b/kadmos/vistoms/static/lib/lobipanel/dist/css/lobipanel.min.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/dist/css/lobipanel.min.css rename to kadmos/vistoms/static/lib/lobipanel/dist/css/lobipanel.min.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/dist/js/lobipanel.js b/kadmos/vistoms/static/lib/lobipanel/dist/js/lobipanel.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/dist/js/lobipanel.js rename to kadmos/vistoms/static/lib/lobipanel/dist/js/lobipanel.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/dist/js/lobipanel.min.js b/kadmos/vistoms/static/lib/lobipanel/dist/js/lobipanel.min.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/dist/js/lobipanel.min.js rename to kadmos/vistoms/static/lib/lobipanel/dist/js/lobipanel.min.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/js/lobipanel.js b/kadmos/vistoms/static/lib/lobipanel/js/lobipanel.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/js/lobipanel.js rename to kadmos/vistoms/static/lib/lobipanel/js/lobipanel.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/less/loading-animation.less b/kadmos/vistoms/static/lib/lobipanel/less/loading-animation.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/less/loading-animation.less rename to kadmos/vistoms/static/lib/lobipanel/less/loading-animation.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/less/lobipanel.less b/kadmos/vistoms/static/lib/lobipanel/less/lobipanel.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/less/lobipanel.less rename to kadmos/vistoms/static/lib/lobipanel/less/lobipanel.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/less/main.less b/kadmos/vistoms/static/lib/lobipanel/less/main.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/less/main.less rename to kadmos/vistoms/static/lib/lobipanel/less/main.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/less/variables.less b/kadmos/vistoms/static/lib/lobipanel/less/variables.less similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/less/variables.less rename to kadmos/vistoms/static/lib/lobipanel/less/variables.less diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/css/font-awesome.css b/kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/css/font-awesome.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/css/font-awesome.css rename to kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/css/font-awesome.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/css/font-awesome.css.map b/kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/css/font-awesome.css.map similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/css/font-awesome.css.map rename to kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/css/font-awesome.css.map diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/css/font-awesome.min.css b/kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/css/font-awesome.min.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/css/font-awesome.min.css rename to kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/css/font-awesome.min.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/FontAwesome.otf b/kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/FontAwesome.otf similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/FontAwesome.otf rename to kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/FontAwesome.otf diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.eot b/kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.eot similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.eot rename to kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.eot diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.svg b/kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.svg similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.svg rename to kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.svg diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.ttf b/kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.ttf similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.ttf rename to kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.ttf diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.woff b/kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.woff similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.woff rename to kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.woff diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.woff2 b/kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.woff2 similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.woff2 rename to kadmos/vistoms/static/lib/lobipanel/lib/font-awesome/fonts/fontawesome-webfont.woff2 diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/highlight/github.css b/kadmos/vistoms/static/lib/lobipanel/lib/highlight/github.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/highlight/github.css rename to kadmos/vistoms/static/lib/lobipanel/lib/highlight/github.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/highlight/highlight.pack.js b/kadmos/vistoms/static/lib/lobipanel/lib/highlight/highlight.pack.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/highlight/highlight.pack.js rename to kadmos/vistoms/static/lib/lobipanel/lib/highlight/highlight.pack.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_444444_256x240.png b/kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_444444_256x240.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_444444_256x240.png rename to kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_444444_256x240.png diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_555555_256x240.png b/kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_555555_256x240.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_555555_256x240.png rename to kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_555555_256x240.png diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_777620_256x240.png b/kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_777620_256x240.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_777620_256x240.png rename to kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_777620_256x240.png diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_777777_256x240.png b/kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_777777_256x240.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_777777_256x240.png rename to kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_777777_256x240.png diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_cc0000_256x240.png b/kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_cc0000_256x240.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_cc0000_256x240.png rename to kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_cc0000_256x240.png diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_ffffff_256x240.png b/kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_ffffff_256x240.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/images/ui-icons_ffffff_256x240.png rename to kadmos/vistoms/static/lib/lobipanel/lib/images/ui-icons_ffffff_256x240.png diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery-ui.min.css b/kadmos/vistoms/static/lib/lobipanel/lib/jquery-ui.min.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery-ui.min.css rename to kadmos/vistoms/static/lib/lobipanel/lib/jquery-ui.min.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery-ui.min.js b/kadmos/vistoms/static/lib/lobipanel/lib/jquery-ui.min.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery-ui.min.js rename to kadmos/vistoms/static/lib/lobipanel/lib/jquery-ui.min.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery-ui.theme.min.css b/kadmos/vistoms/static/lib/lobipanel/lib/jquery-ui.theme.min.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery-ui.theme.min.css rename to kadmos/vistoms/static/lib/lobipanel/lib/jquery-ui.theme.min.css diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery.1.11.min.js b/kadmos/vistoms/static/lib/lobipanel/lib/jquery.1.11.min.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery.1.11.min.js rename to kadmos/vistoms/static/lib/lobipanel/lib/jquery.1.11.min.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery.3.20.min.js b/kadmos/vistoms/static/lib/lobipanel/lib/jquery.3.20.min.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery.3.20.min.js rename to kadmos/vistoms/static/lib/lobipanel/lib/jquery.3.20.min.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery.ui.touch-punch.js b/kadmos/vistoms/static/lib/lobipanel/lib/jquery.ui.touch-punch.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery.ui.touch-punch.js rename to kadmos/vistoms/static/lib/lobipanel/lib/jquery.ui.touch-punch.js diff --git a/kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery.ui.touch-punch.min.js b/kadmos/vistoms/static/lib/lobipanel/lib/jquery.ui.touch-punch.min.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/lobipanel/lib/jquery.ui.touch-punch.min.js rename to kadmos/vistoms/static/lib/lobipanel/lib/jquery.ui.touch-punch.min.js diff --git a/kadmos/vispack/VISTOMS/static/lib/style.css b/kadmos/vistoms/static/lib/style.css similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/style.css rename to kadmos/vistoms/static/lib/style.css diff --git a/kadmos/vispack/VISTOMS/static/lib/vkbeautify/vkbeautify.js b/kadmos/vistoms/static/lib/vkbeautify/vkbeautify.js similarity index 100% rename from kadmos/vispack/VISTOMS/static/lib/vkbeautify/vkbeautify.js rename to kadmos/vistoms/static/lib/vkbeautify/vkbeautify.js diff --git a/kadmos/vispack/VISTOMS/static/pictures/AGILE_Icon.png b/kadmos/vistoms/static/pictures/AGILE_Icon.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/AGILE_Icon.png rename to kadmos/vistoms/static/pictures/AGILE_Icon.png diff --git a/kadmos/vispack/VISTOMS/static/pictures/AGILE_Logo.png b/kadmos/vistoms/static/pictures/AGILE_Logo.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/AGILE_Logo.png rename to kadmos/vistoms/static/pictures/AGILE_Logo.png diff --git a/kadmos/vispack/VISTOMS/static/pictures/Acknowledgements.png b/kadmos/vistoms/static/pictures/Acknowledgements.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/Acknowledgements.png rename to kadmos/vistoms/static/pictures/Acknowledgements.png diff --git a/kadmos/vispack/VISTOMS/static/pictures/Acknowledgements.svg b/kadmos/vistoms/static/pictures/Acknowledgements.svg similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/Acknowledgements.svg rename to kadmos/vistoms/static/pictures/Acknowledgements.svg diff --git a/kadmos/vispack/VISTOMS/static/pictures/Contact.png b/kadmos/vistoms/static/pictures/Contact.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/Contact.png rename to kadmos/vistoms/static/pictures/Contact.png diff --git a/kadmos/vispack/VISTOMS/static/pictures/Contact.svg b/kadmos/vistoms/static/pictures/Contact.svg similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/Contact.svg rename to kadmos/vistoms/static/pictures/Contact.svg diff --git a/kadmos/vispack/VISTOMS/static/pictures/Home.png b/kadmos/vistoms/static/pictures/Home.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/Home.png rename to kadmos/vistoms/static/pictures/Home.png diff --git a/kadmos/vispack/VISTOMS/static/pictures/Home.svg b/kadmos/vistoms/static/pictures/Home.svg similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/Home.svg rename to kadmos/vistoms/static/pictures/Home.svg diff --git a/kadmos/vispack/VISTOMS/static/pictures/RWTH_Logo.png b/kadmos/vistoms/static/pictures/RWTH_Logo.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/RWTH_Logo.png rename to kadmos/vistoms/static/pictures/RWTH_Logo.png diff --git a/kadmos/vispack/VISTOMS/static/pictures/RWTH_Logo.svg b/kadmos/vistoms/static/pictures/RWTH_Logo.svg similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/RWTH_Logo.svg rename to kadmos/vistoms/static/pictures/RWTH_Logo.svg diff --git a/kadmos/vispack/VISTOMS/static/pictures/TUDelft_Logo.png b/kadmos/vistoms/static/pictures/TUDelft_Logo.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/TUDelft_Logo.png rename to kadmos/vistoms/static/pictures/TUDelft_Logo.png diff --git a/kadmos/vispack/VISTOMS/static/pictures/TUDelft_Logo.svg b/kadmos/vistoms/static/pictures/TUDelft_Logo.svg similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/TUDelft_Logo.svg rename to kadmos/vistoms/static/pictures/TUDelft_Logo.svg diff --git a/kadmos/vispack/VISTOMS/static/pictures/Tutorial.png b/kadmos/vistoms/static/pictures/Tutorial.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/Tutorial.png rename to kadmos/vistoms/static/pictures/Tutorial.png diff --git a/kadmos/vispack/VISTOMS/static/pictures/Tutorial.svg b/kadmos/vistoms/static/pictures/Tutorial.svg similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/Tutorial.svg rename to kadmos/vistoms/static/pictures/Tutorial.svg diff --git a/kadmos/vispack/VISTOMS/static/pictures/VISTOMS_Label.png b/kadmos/vistoms/static/pictures/VISTOMS_Label.png similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/VISTOMS_Label.png rename to kadmos/vistoms/static/pictures/VISTOMS_Label.png diff --git a/kadmos/vispack/VISTOMS/static/pictures/VISTOMS_Label.svg b/kadmos/vistoms/static/pictures/VISTOMS_Label.svg similarity index 100% rename from kadmos/vispack/VISTOMS/static/pictures/VISTOMS_Label.svg rename to kadmos/vistoms/static/pictures/VISTOMS_Label.svg diff --git a/kadmos/vispack/VISTOMS/templates/VISTOMS.html b/kadmos/vistoms/templates/VISTOMS.html similarity index 99% rename from kadmos/vispack/VISTOMS/templates/VISTOMS.html rename to kadmos/vistoms/templates/VISTOMS.html index 06b06663b7f30033a3e60f301fc6aceaaaa3c1e6..fd410d991b5b39ed148a712902b449ac7e37a8ec 100644 --- a/kadmos/vispack/VISTOMS/templates/VISTOMS.html +++ b/kadmos/vistoms/templates/VISTOMS.html @@ -20023,7 +20023,8 @@ .on("mousedown", function() { bootbox.hideAll(); - bootbox.confirm("Are you sure you want to do this?", function(sure) + bootbox.confirm("<p>This will automatically remove all collisions from the graph by creating multiple variable instances.</p>" + +"<p>Are you sure you want to do this?</p>", function(sure) { if (sure) { @@ -21442,7 +21443,7 @@ } var thisEdge = d3.select(this); - thisEdge.append("svg:title").text("Click right to inspect"); + //thisEdge.append("svg:title").text("Click right to inspect"); thisEdge.on('contextmenu', d3.contextMenu(edgeMenu)) }) } diff --git a/kadmos/vispack/VISTOMS/VISTOMS_Static.html b/kadmos/vistoms/templates/VISTOMS_Static.html similarity index 100% rename from kadmos/vispack/VISTOMS/VISTOMS_Static.html rename to kadmos/vistoms/templates/VISTOMS_Static.html diff --git a/kadmos/vispack/VISTOMS/VISTOMS_TreeViewer.html b/kadmos/vistoms/templates/VISTOMS_TreeViewer.html similarity index 100% rename from kadmos/vispack/VISTOMS/VISTOMS_TreeViewer.html rename to kadmos/vistoms/templates/VISTOMS_TreeViewer.html diff --git a/kadmos/vispack/VISTOMS/vistoms.py b/kadmos/vistoms/vistoms.py similarity index 75% rename from kadmos/vispack/VISTOMS/vistoms.py rename to kadmos/vistoms/vistoms.py index 8c0e6ba4138c7d2125e55312e794feca41ece39b..09bfd065541b9cfe567294029648a679c828b9fd 100644 --- a/kadmos/vispack/VISTOMS/vistoms.py +++ b/kadmos/vistoms/vistoms.py @@ -9,10 +9,9 @@ import tempfile import webbrowser import zipfile from copy import deepcopy -from os.path import expanduser from shutil import copyfile -from flask import Flask, render_template, request, jsonify, send_from_directory +from flask import Flask, render_template, request, jsonify from kadmos.cmdows.cmdows import find_cmdows_file from kadmos.graph import load, FundamentalProblemGraph @@ -22,12 +21,8 @@ app = Flask(__name__) logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) # Folder and file settings -UPLOAD_FOLDER = expanduser("~")+'/VISTOMS/temp/' +UPLOAD_FOLDER = '' TEMP_FILE = 'tmp' -VISTOMS_FOLDER = 'templates/' - -# Open VISTOMS when running the app.py in the beginning -webbrowser.open_new('http://127.0.0.1:5000/VISTOMS') # General functions ######################################################################################################################## @@ -36,7 +31,7 @@ def VISTOMS(): """ Function opens VISTOMS when it is called from the browser """ - return render_template('VISTOMS.html',new=0) + return render_template('VISTOMS.html', new=0) @app.route('/kadmosUploadFile', methods=['GET', 'POST']) @@ -87,20 +82,20 @@ def kadmosUploadFile(): database_dir = "" if fileType == 'Database': - database_dir = UPLOAD_FOLDER+'database_tmp/' + database_dir = os.path.join(UPLOAD_FOLDER, 'database_tmp') zip_ref = zipfile.ZipFile(file, 'r') zip_ref.extractall(database_dir) zip_ref.close() file_list = [] for file in os.listdir(database_dir): - file_list.append(database_dir+file) + file_list.append(os.path.join(database_dir, file)) cmdows_file = find_cmdows_file(file_list) graphFileName = cmdows_file else: - graphFileName = UPLOAD_FOLDER+dgFile.filename + graphFileName = os.path.join(UPLOAD_FOLDER, dgFile.filename) dgFile.save(os.path.join(UPLOAD_FOLDER, dgFile.filename)) - loaded_graph = load(graphFileName, file_check_critical=True) + loaded_graph = load(graphFileName, file_check_critical=False) # Remove the uploaded file (and if existing, database directory) from the temp folder os.remove(graphFileName) if os.path.exists(database_dir): @@ -116,18 +111,24 @@ def kadmosUploadFile(): graph = loaded_graph mpgFileName = mpgFile.filename mpgFile.save(os.path.join(UPLOAD_FOLDER, mpgFileName)) - mpg = load(UPLOAD_FOLDER + mpgFileName, file_check_critical=True) + mpg = load(os.path.join(UPLOAD_FOLDER, mpgFileName), file_check_critical=True) # Remove the uploaded file from the temp folder - os.remove(UPLOAD_FOLDER + mpgFileName) + os.remove(os.path.join(UPLOAD_FOLDER, mpgFileName)) else: graph = loaded_graph mpg = None #save the graph as kdms file in temp folder - graph.save(UPLOAD_FOLDER+TEMP_FILE+'_'+newGraphID+'.kdms',file_type='kdms', graph_check_critical=False, - mpg=mpg) + graph.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+newGraphID+'.kdms'),file_type='kdms', + graph_check_critical=False, mpg=mpg) + + # Use function order for VISTOMS if it is available in the graph information + function_order = None + if graph.graph_has_nested_attributes('problem_formulation', 'function_order') and mpg==None: + function_order = graph.graph['problem_formulation']['function_order'] + # Add the graph with the updated function order to VISTOMS - newVistomsData = graph.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, graph_id=newGraphID, mpg=mpg) + newVistomsData = graph.vistoms_add_json(graph_id=newGraphID, function_order=function_order, mpg=mpg) return newVistomsData @@ -148,25 +149,25 @@ def kadmosExportAllGraphs(): """ try: # Get request form - path = os.path.join(request.form['path'], '') + path = os.path.join(request.form['path'],'') fileType = request.form['fileType'] if not os.path.isdir(path): + print path + " does not exist yet!" os.makedirs(os.path.dirname(path)) - for aFile in os.listdir(UPLOAD_FOLDER): if aFile.endswith(".kdms"): fileName = aFile.split('.')[0] fileName_split = fileName.split('_') - if "mpg" not in fileName_split: # Do not loop through mpg files + if "mpg" not in fileName_split and "backup" not in fileName_split: # Do not loop through mpg files graphFileName = fileName + ".kdms" mpgFileName = fileName + "_mpg.kdms" - if os.path.exists(UPLOAD_FOLDER + mpgFileName): - graph = load(UPLOAD_FOLDER + graphFileName, file_check_critical=False) - mpg = load(UPLOAD_FOLDER + mpgFileName, file_check_critical=False) + if os.path.exists(os.path.join(UPLOAD_FOLDER, mpgFileName)): + graph = load(os.path.join(UPLOAD_FOLDER, graphFileName), file_check_critical=False) + mpg = load(os.path.join(UPLOAD_FOLDER, mpgFileName), file_check_critical=False) else: - graph = load(UPLOAD_FOLDER + graphFileName, file_check_critical=False) + graph = load(os.path.join(UPLOAD_FOLDER, graphFileName), file_check_critical=False) mpg = None # Add problem function roles if they are not already existing @@ -174,34 +175,41 @@ def kadmosExportAllGraphs(): graph_name = fileName else: graph_name = graph.name + # Add problem function roles if they are not already existing if isinstance(graph, FundamentalProblemGraph): - if not hasattr(graph.graph, 'problem_formulation'): - graph.graph['problem_formulation'] = dict() - graph.graph['problem_formulation']['function_order'] = "" - graph.graph['problem_formulation']['mdao_architecture'] = "None" - graph.add_function_problem_roles() + if 'function_order' not in graph.graph['problem_formulation']: + graph.assert_or_add_nested_attribute(['problem_formulation', 'function_order'], + None) + if 'mdao_architecture' not in graph.graph['problem_formulation']: + graph.assert_or_add_nested_attribute(['problem_formulation', 'mdao_architecture'], + 'undefined') + if 'allow_unconverged_couplings' not in graph.graph['problem_formulation']: + graph.assert_or_add_nested_attribute(['problem_formulation', 'allow_unconverged_couplings'], + False) + graph.add_function_problem_roles() + if fileType == "CMDOWS files": file_type = "cmdows" file = graph_name + ".xml" # Save as CMDOWS file - graph.save(UPLOAD_FOLDER + graph_name, file_type=file_type, graph_check_critical=False, mpg=mpg) + graph.save(os.path.join(UPLOAD_FOLDER, graph_name), file_type=file_type, graph_check_critical=False, mpg=mpg) # Copy CMDOWS file from temporary folder to user's download folder - copyfile(UPLOAD_FOLDER + file, path + file) + copyfile(os.path.join(UPLOAD_FOLDER, file), os.path.join(path, file)) # remove temporary CMDOWS file - os.remove(UPLOAD_FOLDER + file) + os.remove(os.path.join(UPLOAD_FOLDER, file)) elif fileType == "KDMS files": file_type = "kdms" # Save as kdms file - graph.save(UPLOAD_FOLDER + graph_name, file_type=file_type, graph_check_critical=False,mpg=mpg) + graph.save(os.path.join(UPLOAD_FOLDER, graph_name), file_type=file_type, graph_check_critical=False, mpg=mpg) file = graph_name + ".kdms" mpgfile = graph_name + "_mpg.kdms" # Copy kdms file from temporary folder to user's download folder - copyfile(UPLOAD_FOLDER + file, path + file) + copyfile(os.path.join(UPLOAD_FOLDER, file), os.path.join(path, file)) # remove temporary kdms file - os.remove(UPLOAD_FOLDER + file) - if os.path.exists(UPLOAD_FOLDER + mpgfile): - copyfile(UPLOAD_FOLDER + mpgfile, path + mpgfile) - os.remove(UPLOAD_FOLDER + mpgfile) + os.remove(os.path.join(UPLOAD_FOLDER, file)) + if os.path.exists(os.path.join(UPLOAD_FOLDER, mpgfile)): + copyfile(os.path.join(UPLOAD_FOLDER, mpgfile), os.path.join(path, mpgfile)) + os.remove(os.path.join(UPLOAD_FOLDER, mpgfile)) return path except Exception as e: @@ -227,33 +235,38 @@ def kadmosExportGraph(): graphFileName = TEMP_FILE+'_'+graphID+'.kdms' mpgFileName = TEMP_FILE+'_'+graphID+'_mpg.kdms' - if os.path.exists(UPLOAD_FOLDER + mpgFileName): - graph = load(UPLOAD_FOLDER + graphFileName, file_check_critical=False) - mpg = load(UPLOAD_FOLDER + mpgFileName, file_check_critical=False) + if os.path.exists(os.path.join(UPLOAD_FOLDER, mpgFileName)): + graph = load(os.path.join(UPLOAD_FOLDER, graphFileName), file_check_critical=False) + mpg = load(os.path.join(UPLOAD_FOLDER, mpgFileName), file_check_critical=False) else: - graph = load(UPLOAD_FOLDER + graphFileName, file_check_critical=False) + graph = load(os.path.join(UPLOAD_FOLDER, graphFileName), file_check_critical=False) mpg = None # Add problem function roles if they are not already existing if isinstance(graph, FundamentalProblemGraph): - if not hasattr(graph.graph, 'problem_formulation'): - graph.graph['problem_formulation'] = dict() - graph.graph['problem_formulation']['function_order'] = functionOrder - graph.graph['problem_formulation']['mdao_architecture'] = "None" - graph.add_function_problem_roles() + if 'function_order' not in graph.graph['problem_formulation']: + graph.assert_or_add_nested_attribute(['problem_formulation', 'function_order'], None) + if 'mdao_architecture' not in graph.graph['problem_formulation']: + graph.assert_or_add_nested_attribute(['problem_formulation', 'mdao_architecture'], 'undefined') + if 'allow_unconverged_couplings' not in graph.graph['problem_formulation']: + graph.assert_or_add_nested_attribute(['problem_formulation', 'allow_unconverged_couplings'], False) + graph.add_function_problem_roles() + + if not os.path.isdir(path): + os.makedirs(os.path.dirname(path)) if fileType == "kdms": - copyfile(UPLOAD_FOLDER+graphFileName, path+fileName+".kdms") - if os.path.exists(UPLOAD_FOLDER + mpgFileName): - copyfile(UPLOAD_FOLDER+mpgFileName, path+fileName+'_mpg'+".kdms") + copyfile(os.path.join(UPLOAD_FOLDER, graphFileName), os.path.join(path, fileName+".kdms")) + if os.path.exists(os.path.join(UPLOAD_FOLDER, mpgFileName)): + copyfile(os.path.join(UPLOAD_FOLDER, mpgFileName), os.path.join(path, fileName+'_mpg'+".kdms")) elif fileType == "cmdows": file = fileName + ".xml" # Save as CMDOWS file - graph.save(UPLOAD_FOLDER + fileName, file_type=fileType, graph_check_critical=False, mpg=mpg) + graph.save(os.path.join(UPLOAD_FOLDER, fileName), file_type=fileType, graph_check_critical=False, mpg=mpg) # Copy CMDOWS file from temporary folder to user's download folder - copyfile(UPLOAD_FOLDER + file, path + file) + copyfile(os.path.join(UPLOAD_FOLDER, file), os.path.join(path, file)) # remove temporary CMDOWS file - os.remove(UPLOAD_FOLDER + file) + os.remove(os.path.join(UPLOAD_FOLDER, file)) else: return ("ERROR: Wrong file type!!!") @@ -281,18 +294,18 @@ def kadmosSaveGraphTmp(): tmpDir = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(tmpDir + mpgFileName): - graph = load(tmpDir + graphFileName, file_check_critical=False) - mpg = load(tmpDir + mpgFileName, file_check_critical=False) + if os.path.exists(os.path.join(tmpDir, mpgFileName)): + graph = load(os.path.join(tmpDir, graphFileName), file_check_critical=False) + mpg = load(os.path.join(tmpDir, mpgFileName), file_check_critical=False) else: - graph = load(tmpDir + graphFileName, file_check_critical=False) + graph = load(os.path.join(tmpDir, graphFileName), file_check_critical=False) mpg = None newFileName = TEMP_FILE + '_' + newGraphID + '.kdms' graph.graph['name'] = newGraphName - graph.save(UPLOAD_FOLDER + newFileName, file_type="kdms", graph_check_critical=False, mpg=mpg) + graph.save(os.path.join(UPLOAD_FOLDER, newFileName), file_type="kdms", graph_check_critical=False, mpg=mpg) - newVistomsData = graph.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=function_order,mpg=mpg, graph_id=newGraphID) + newVistomsData = graph.vistoms_add_json(function_order=function_order,mpg=mpg, graph_id=newGraphID) return newVistomsData @@ -318,14 +331,14 @@ def kadmosDeleteGraph(): backupGraphFileName = TEMP_FILE + '_' + graphID + '_backup.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' backupMpgFileName = TEMP_FILE + '_' + graphID + '_mpg_backup.kdms' - if os.path.exists(tmpDir + graphFileName): - os.remove(tmpDir + graphFileName) - if os.path.exists(tmpDir + backupGraphFileName): - os.remove(tmpDir + backupGraphFileName) - if os.path.exists(tmpDir + mpgFileName): - os.remove(tmpDir + mpgFileName) - if os.path.exists(tmpDir + backupMpgFileName): - os.remove(tmpDir + backupMpgFileName) + if os.path.exists(os.path.join(tmpDir, graphFileName)): + os.remove(os.path.join(tmpDir, graphFileName)) + if os.path.exists(os.path.join(tmpDir, backupGraphFileName)): + os.remove(os.path.join(tmpDir, backupGraphFileName)) + if os.path.exists(os.path.join(tmpDir, mpgFileName)): + os.remove(os.path.join(tmpDir, mpgFileName)) + if os.path.exists(os.path.join(tmpDir, backupMpgFileName)): + os.remove(os.path.join(tmpDir, backupMpgFileName)) return kadmosFindTempGraphs() @@ -348,23 +361,32 @@ def kadmosFindTempGraphs(): tmpDir = UPLOAD_FOLDER newVIstomsDataArray = [] - for file in os.listdir(tmpDir): + file_list = os.listdir(tmpDir) + if file_list: + file_list.sort() + for file in file_list: if file.endswith(".kdms"): fileName = file.split('.')[0].split('_') graphID = fileName[1] if "mpg" not in fileName: # Do not loop through mpg files graphFileName = fileName[0] + "_" + graphID + ".kdms" mpgFileName = fileName[0] + "_" + graphID + "_mpg.kdms" - if os.path.exists(tmpDir + mpgFileName): - graph = load(tmpDir + graphFileName, file_check_critical=False) - mpg = load(tmpDir + mpgFileName, file_check_critical=False) + if os.path.exists(os.path.join(tmpDir, mpgFileName)): + graph = load(os.path.join(tmpDir, graphFileName), file_check_critical=False) + mpg = load(os.path.join(tmpDir, mpgFileName), file_check_critical=False) else: - graph = load(tmpDir + graphFileName, file_check_critical=False) + graph = load(os.path.join(tmpDir, graphFileName), file_check_critical=False) mpg = None - graph.save(UPLOAD_FOLDER + graphFileName, file_type="kdms", graph_check_critical=False,mpg=mpg) + # Use function order for VISTOMS if it is available in the graph information + function_order = None + if graph.graph_has_nested_attributes('problem_formulation', 'function_order') and mpg == None: + function_order = graph.graph['problem_formulation']['function_order'] - newVIstomsDataArray.append(graph.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, graph_id=graphID,mpg=mpg)) + graph.save(os.path.join(UPLOAD_FOLDER, graphFileName), file_type="kdms", + graph_check_critical=False, mpg=mpg) + + newVIstomsDataArray.append(graph.vistoms_add_json(graph_id=graphID, function_order=function_order, mpg=mpg)) return jsonify(newVIstomsDataArray) @@ -389,26 +411,27 @@ def kadmosRevertLastStep(): backupGraphFileName = TEMP_FILE + '_' + graphID + '_backup.kdms' backupMpgFileName = TEMP_FILE + '_' + graphID + '_backup_mpg.kdms' - graph = load(tmpDir + graphFileName, file_check_critical=False) - backupGraph = load(tmpDir + backupGraphFileName, file_check_critical=False) - if os.path.exists(tmpDir + mpgFileName): - mpg = load(tmpDir + mpgFileName, file_check_critical=False) - backupMpg = load(tmpDir + backupMpgFileName, file_check_critical=False) + graph = load(os.path.join(tmpDir, graphFileName), file_check_critical=False) + backupGraph = load(os.path.join(tmpDir, backupGraphFileName), file_check_critical=False) + if os.path.exists(os.path.join(tmpDir, mpgFileName)): + mpg = load(os.path.join(tmpDir, mpgFileName), file_check_critical=False) + backupMpg = load(os.path.join(tmpDir, backupMpgFileName), file_check_critical=False) else: mpg = None backupMpg = None # Switch graph and backup graph (What used to be the backup graph is now the new graph and vice versa) - graph.save(UPLOAD_FOLDER + backupGraphFileName, file_type="kdms", graph_check_critical=False, mpg=backupMpg) - backupGraph.save(UPLOAD_FOLDER + graphFileName, file_type="kdms", graph_check_critical=False, mpg=mpg) + graph.save(os.path.join(UPLOAD_FOLDER, backupGraphFileName), file_type="kdms", graph_check_critical=False, + mpg=backupMpg) + backupGraph.save(os.path.join(UPLOAD_FOLDER, graphFileName), file_type="kdms", graph_check_critical=False, + mpg=mpg) # Get function_oder of the backup graph function_order = None - if 'problem_formulation' in backupGraph.graph: - if 'function_order' in backupGraph.graph['problem_formulation']: - function_order = backupGraph.graph['problem_formulation']['function_order'] + if backupGraph.graph_has_nested_attributes('problem_formulation', 'function_order'): + function_order = backupGraph.graph['problem_formulation']['function_order'] - newVistomsData = backupGraph.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=function_order, mpg=mpg, graph_id=graphID) + newVistomsData = backupGraph.vistoms_add_json(function_order=function_order, mpg=mpg, graph_id=graphID) return newVistomsData @@ -431,11 +454,11 @@ def savePreviousGraph(graph_id): # Save graph as backup file backupGraphFileName = TEMP_FILE + '_' + graph_id + '_backup.kdms' - copyfile(path + graphFileName, path + backupGraphFileName) - if os.path.exists(path + mpgFileName): + copyfile(os.path.join(path, graphFileName), os.path.join(path, backupGraphFileName)) + if os.path.exists(os.path.join(path, mpgFileName)): # If mpg exists, save it as well backupMpgFileName = TEMP_FILE + '_' + graph_id + '_mpg_backup.kdms' - copyfile(path + mpgFileName, path + backupMpgFileName) + copyfile(os.path.join(path, mpgFileName), os.path.join(path, backupMpgFileName)) def deleteBackupGraphs(): """ @@ -443,7 +466,7 @@ def deleteBackupGraphs(): """ for file in os.listdir(UPLOAD_FOLDER): if file.endswith("_backup.kdms"): - os.remove(UPLOAD_FOLDER+file) + os.remove(os.path.join(UPLOAD_FOLDER, file)) ######################################################################################################################## @@ -471,11 +494,11 @@ def kadmosFindAllNodes(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): - graph = load(path + graphFileName, file_check_critical=False) - mpg = load(path + mpgFileName, file_check_critical=False) + if os.path.exists(os.path.join(path, mpgFileName)): + graph = load(os.path.join(path, graphFileName), file_check_critical=False) + mpg = load(os.path.join(path, mpgFileName), file_check_critical=False) else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None if attr_cond == []: @@ -515,11 +538,11 @@ def kadmosL1Check(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): - graph = load(path + graphFileName, file_check_critical=False) - mpg = load(path + mpgFileName, file_check_critical=False) + if os.path.exists(os.path.join(path, mpgFileName)): + graph = load(os.path.join(path, graphFileName), file_check_critical=False) + mpg = load(os.path.join(path, mpgFileName), file_check_critical=False) else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None check_result = graph._check_category_a() @@ -548,11 +571,11 @@ def kadmosL2Check(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): - graph = load(path + graphFileName, file_check_critical=False) - mpg = load(path + mpgFileName, file_check_critical=False) + if os.path.exists(os.path.join(path, mpgFileName)): + graph = load(os.path.join(path, graphFileName), file_check_critical=False) + mpg = load(os.path.join(path, mpgFileName), file_check_critical=False) else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None check_result = graph._check_category_b() @@ -580,11 +603,11 @@ def kadmosL3Check(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): - graph = load(path + graphFileName, file_check_critical=False) - mpg = load(path + mpgFileName, file_check_critical=False) + if os.path.exists(os.path.join(path, mpgFileName)): + graph = load(os.path.join(path, graphFileName), file_check_critical=False) + mpg = load(os.path.join(path, mpgFileName), file_check_critical=False) else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None check_result = graph._check_category_c() @@ -622,12 +645,12 @@ def kadmosStartDefiningMDOProblem(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE+'_'+graphID+'.kdms' mpgFileName = TEMP_FILE+'_'+graphID+'_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: Graph is already an MDPG! FPG Cannot be initialized again!") else: mpg = None - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) if isinstance(graph, FundamentalProblemGraph): return("ERROR: Graph is already an FPG and cannot be initialized again!") @@ -640,9 +663,9 @@ def kadmosStartDefiningMDOProblem(): fpg_initial.graph['problem_formulation']['mdao_architecture'] = "None" # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg_initial.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, graph_id=newGraphID,mpg=mpg) + newVistomsData = fpg_initial.vistoms_add_json(graph_id=newGraphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg_initial.save(UPLOAD_FOLDER + newFileName, file_type="kdms", graph_check_critical=False, mpg=mpg) + fpg_initial.save(os.path.join(UPLOAD_FOLDER, newFileName), file_type="kdms", graph_check_critical=False, mpg=mpg) return newVistomsData @@ -672,10 +695,10 @@ def kadmosChangeNodePos(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE+'_'+graphID+'.kdms' mpgFileName = TEMP_FILE+'_'+graphID+'_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot change a competence's position on an existing MPG! Please go back to the FPG or RCG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None # Change position of a node in th XDSM @@ -687,9 +710,10 @@ def kadmosChangeNodePos(): graph.graph['problem_formulation']['function_order'] = function_order # Add the graph with the updated function order to VISTOMS - newVistomsData = graph.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = graph.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - graph.save(UPLOAD_FOLDER+TEMP_FILE+'_'+graphID+'.kdms', file_type='kdms', graph_check_critical=False, mpg=mpg) + graph.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', + graph_check_critical=False, mpg=mpg) return newVistomsData except Exception as e: @@ -715,10 +739,10 @@ def kadmosDeleteNode(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE+'_'+graphID+'.kdms' mpgFileName = TEMP_FILE+'_'+graphID+'_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot remove a competence from an existing MPG! Please go back to the FPG or RCG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None # remove the node from the graph @@ -728,9 +752,9 @@ def kadmosDeleteNode(): # Add the graph with the updated function order to VISTOMS - newVistomsData = graph.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = graph.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - graph.save(UPLOAD_FOLDER + TEMP_FILE+'_'+graphID+'.kdms', file_type='kdms', graph_check_critical=False, mpg=mpg) + graph.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) return newVistomsData @@ -759,19 +783,19 @@ def kadmosDeleteEdge(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE+'_'+graphID+'.kdms' mpgFileName = TEMP_FILE+'_'+graphID+'_mpg.kdms' - if os.path.exists(path + mpgFileName): - graph = load(path + graphFileName, file_check_critical=False) - mpg = load(path + mpgFileName, file_check_critical=False) + if os.path.exists(os.path.join(path, mpgFileName)): + graph = load(os.path.join(path, graphFileName), file_check_critical=False) + mpg = load(os.path.join(path, mpgFileName), file_check_critical=False) else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None # remove the edge graph.remove_edge(nodeName,edgeName) # Add the graph with the updated function order to VISTOMS - newVistomsData = graph.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = graph.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - graph.save(UPLOAD_FOLDER + TEMP_FILE+'_'+graphID+'.kdms', file_type='kdms', graph_check_critical=False, mpg=mpg) + graph.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) return newVistomsData @@ -800,10 +824,10 @@ def kadmosExcludeDesignCompetences(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot remove a competence from an existing MPG! Please go back to the FPG or RCG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None fpg = FundamentalProblemGraph(graph) @@ -816,9 +840,9 @@ def kadmosExcludeDesignCompetences(): fpg.graph['problem_formulation']['function_order'] = function_order # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = fpg.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg.save(UPLOAD_FOLDER + TEMP_FILE + '_' + graphID + '.kdms', + fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) return newVistomsData @@ -847,10 +871,10 @@ def kadmosMergeSeqDesignCompetences(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot merge comeptences on an existing MPG! Please go back to the FPG or RCG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None @@ -867,9 +891,9 @@ def kadmosMergeSeqDesignCompetences(): for func in nodeList[1:]: function_order.remove(func) # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER,function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = fpg.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg.save(UPLOAD_FOLDER + TEMP_FILE + '_' + graphID + '.kdms', + fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) return newVistomsData @@ -898,10 +922,10 @@ def kadmosMergeParDesignCompetences(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot merge comeptences on an existing MPG! Please go back to the FPG or RCG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None new_node = '-'.join(nodeList) + '--par' @@ -918,10 +942,9 @@ def kadmosMergeParDesignCompetences(): function_order.remove(func) # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, - function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = fpg.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg.save(UPLOAD_FOLDER + TEMP_FILE + '_' + graphID + '.kdms', + fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) return newVistomsData @@ -950,10 +973,10 @@ def kadmosMergeFuncModDesignCompetences(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot merge comeptences on an existing MPG! Please go back to the FPG or RCG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None if isinstance(graph, FundamentalProblemGraph): @@ -974,10 +997,9 @@ def kadmosMergeFuncModDesignCompetences(): function_order.remove(func) # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, - function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = fpg.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg.save(UPLOAD_FOLDER + TEMP_FILE + '_' + graphID + '.kdms', + fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) return newVistomsData @@ -1006,10 +1028,10 @@ def kadmosRemoveCollision(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot merge comeptences on an existing MPG! Please go back to the FPG or RCG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None @@ -1024,9 +1046,9 @@ def kadmosRemoveCollision(): fpg.graph['problem_formulation']['function_order'] = function_order # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = fpg.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg.save(UPLOAD_FOLDER + TEMP_FILE + '_' + graphID + '.kdms', + fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) return newVistomsData @@ -1054,14 +1076,12 @@ def kadmosGetPossibleFunctionOrder(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot merge comeptences on an existing MPG! Please go back to the FPG or RCG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None - - if isinstance(graph, FundamentalProblemGraph): fpg = graph else: @@ -1069,13 +1089,16 @@ def kadmosGetPossibleFunctionOrder(): # Getting the possible function order with the method specified by the user function_order = fpg.get_possible_function_order(method) + fpg.assert_or_add_nested_attribute(['problem_formulation', 'mdao_architecture'], 'undefined') fpg.graph['problem_formulation']['function_order'] = function_order - # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg.save(UPLOAD_FOLDER + TEMP_FILE + '_' + graphID + '.kdms', + fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE + '_' + graphID + '.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) + + # Add the graph with the updated function order to VISTOMS + newVistomsData = fpg.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) + return newVistomsData except Exception as e: @@ -1101,10 +1124,10 @@ def kadmosMakeAllVariablesValid(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot do that on an existing MPG! Please go back to the FPG or RCG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None if isinstance(graph, FundamentalProblemGraph): @@ -1120,9 +1143,9 @@ def kadmosMakeAllVariablesValid(): # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = fpg.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg.save(UPLOAD_FOLDER + TEMP_FILE + '_' + graphID + '.kdms', + fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) return newVistomsData @@ -1149,10 +1172,10 @@ def kadmosAddProblemFunctionRoles(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot do that on an existing MPG! Please go back to the FPG or RCG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None if isinstance(graph, FundamentalProblemGraph): @@ -1166,9 +1189,9 @@ def kadmosAddProblemFunctionRoles(): fpg.add_function_problem_roles() # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = fpg.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg.save(UPLOAD_FOLDER + TEMP_FILE + '_' + graphID + '.kdms', + fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) return newVistomsData @@ -1201,10 +1224,10 @@ def kadmosMarkVariable(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE+'_'+graphID+'.kdms' mpgFileName = TEMP_FILE+'_'+graphID+'_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ('ERROR: This function can only be performed on an FPG!') else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None if isinstance(graph, FundamentalProblemGraph): @@ -1226,9 +1249,9 @@ def kadmosMarkVariable(): return ("ERROR: Something went wrong in KADMOS!") # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER,function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = fpg.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg.save(UPLOAD_FOLDER + TEMP_FILE+'_'+graphID+'.kdms', file_type='kdms', graph_check_critical=False,mpg=mpg) + fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False,mpg=mpg) return newVistomsData @@ -1256,10 +1279,10 @@ def kadmosUnmarkVariable(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE+'_'+graphID+'.kdms' mpgFileName = TEMP_FILE+'_'+graphID+'_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ('ERROR: This function can only be performed on an FPG!') else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None if isinstance(graph, FundamentalProblemGraph): @@ -1270,9 +1293,9 @@ def kadmosUnmarkVariable(): fpg.unmark_variable(xPath) # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER,function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = fpg.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg.save(UPLOAD_FOLDER + TEMP_FILE+'_'+graphID+'.kdms', file_type='kdms', graph_check_critical=False,mpg=mpg) + fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False,mpg=mpg) return newVistomsData @@ -1299,10 +1322,10 @@ def kadmosRemoveUnusedOutputs(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot do that on an existing MPG! Please go back to the FPG or RCG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None if isinstance(graph, FundamentalProblemGraph): @@ -1322,9 +1345,9 @@ def kadmosRemoveUnusedOutputs(): fpg.add_function_problem_roles() # Add the graph with the updated function order to VISTOMS - newVistomsData = fpg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=function_order, graph_id=graphID, mpg=mpg) + newVistomsData = fpg.vistoms_add_json(function_order=function_order, graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - fpg.save(UPLOAD_FOLDER + TEMP_FILE + '_' + graphID + '.kdms', + fpg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) return newVistomsData @@ -1360,12 +1383,12 @@ def kadmosStartDefiningMDAOArchitecture(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE+'_'+graphID+'.kdms' mpgFileName = TEMP_FILE+'_'+graphID+'_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: Graph is already an MDPG! FPG Cannot be initialized again!") else: mpg = None - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) if not isinstance(graph, FundamentalProblemGraph): return("ERROR: Graph is not an FPG yet. Please perform the FPG Manipulation steps first!") @@ -1384,9 +1407,9 @@ def kadmosStartDefiningMDAOArchitecture(): mdg.graph['problem_formulation']['mdao_architecture'] = "None" # Add the graph with the updated function order to VISTOMS - newVistomsData = mdg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, function_order=functionOrder, graph_id=newGraphID,mpg=mpg) + newVistomsData = mdg.vistoms_add_json(function_order=functionOrder, graph_id=newGraphID, mpg=mpg) # Save the graph in temp/tmp.kdms - mdg.save(UPLOAD_FOLDER + newFileName, file_type="kdms", graph_check_critical=False, mpg=mpg) + mdg.save(os.path.join(UPLOAD_FOLDER, newFileName), file_type="kdms", graph_check_critical=False, mpg=mpg) return newVistomsData @@ -1418,10 +1441,10 @@ def kadmosImposeMDAOArchitecture(): path = UPLOAD_FOLDER graphFileName = TEMP_FILE + '_' + graphID + '.kdms' mpgFileName = TEMP_FILE + '_' + graphID + '_mpg.kdms' - if os.path.exists(path + mpgFileName): + if os.path.exists(os.path.join(path, mpgFileName)): return ("ERROR: You cannot perform this on an existing MPG! Please go back to the FPG to do so.") else: - graph = load(path + graphFileName, file_check_critical=False) + graph = load(os.path.join(path, graphFileName), file_check_critical=False) mpg = None mdao_definition = mdao_architecture @@ -1453,7 +1476,6 @@ def kadmosImposeMDAOArchitecture(): fpg.graph['problem_formulation']['allow_unconverged_couplings'] = allow_unconverged_couplings if mdao_architecture in ['converged-DOE', 'unconverged-DOE']: - if doe_method not in fpg.OPTIONS_DOE_METHODS: return "ERROR: Invalid DOE method selected, please select a DOE method from the dropdown list" @@ -1467,16 +1489,15 @@ def kadmosImposeMDAOArchitecture(): fpg.add_function_problem_roles() - mdg = fpg.get_mdg(name='MDG') - mpg = mdg.get_mpg(name='MPG') - - mdg.graph['name'] = 'XDSM' + ' - ' + mdao_definition - mdg.graph['description'] = mdao_architecture + " " + coupling_decomposition + " to solve the " + graph.graph['name'] + mdg, mpg = fpg.impose_mdao_architecture() + mpg.graph['name'] = 'XDSM - {}'.format(mdao_definition) + mpg.graph['description'] = 'Solution strategy to solve the super-sonic business jet test case optimization ' \ + 'problem using the strategy: {}.'.format(mdao_definition) # Add the graph with the updated function order to VISTOMS - newVistomsData = mdg.vistoms_add_json(vistoms_dir=VISTOMS_FOLDER, graph_id=graphID, mpg=mpg) + newVistomsData = mdg.vistoms_add_json(graph_id=graphID, mpg=mpg) # Save the graph in temp/tmp.kdms - mdg.save(UPLOAD_FOLDER + TEMP_FILE + '_' + graphID + '.kdms', + mdg.save(os.path.join(UPLOAD_FOLDER, TEMP_FILE+'_'+graphID+'.kdms'), file_type='kdms', graph_check_critical=False, mpg=mpg) return newVistomsData @@ -1488,8 +1509,11 @@ def kadmosImposeMDAOArchitecture(): # Then in the run_vistoms handle the folder and open_vistoms # arguments as follows: -def run_vistoms(folder=None, open_vistoms=True): +def run_vistoms(folder=None): global UPLOAD_FOLDER + # Open VISTOMS when running the app.py in the beginning + webbrowser.open_new('http://127.0.0.1:5000/VISTOMS') + if folder is None: # Create temporary directory UPLOAD_FOLDER = tempfile.mkdtemp() @@ -1501,7 +1525,6 @@ def run_vistoms(folder=None, open_vistoms=True): if not os.path.isdir(UPLOAD_FOLDER): os.makedirs(os.path.dirname(UPLOAD_FOLDER)) # Run the app - UPLOAD_FOLDER += "/" app.run() @@ -1535,4 +1558,4 @@ if __name__ == '__main__': else: open_vistoms = True # default is to open # Now run the Python VISTOMS method that you have in app.py - run_vistoms(folder=folder, open_vistoms=open_vistoms) \ No newline at end of file + run_vistoms(folder=folder) \ No newline at end of file