Loading .gitmodules +1 −1 Original line number Diff line number Diff line [submodule "simulation_server/simulation/raps"] path = simulation_server/simulation/raps url = git@code.ornl.gov:exadigit/raps.git url = https://github.com/ExaDigiT/RAPS.git branch = main README.md +8 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,14 @@ REST API that allows running and querying the results from the ExaDigit simulation and RAPS. ## Loading RAPS submodule This uses [RAPS](https://github.com/ExaDigiT/RAPS) to run the simulation, which is loaded as a submodule. Make sure to run ``` git submodule update --init --recursive ``` to load the submodule. ## Downloading FMU models You can run the job and power simulation without downloading any FMU models. But to use the cooling simulation you'll need to download FMU models into the `models` directory. You can download Loading simulation_server/util/druid.py +11 −11 Original line number Diff line number Diff line Loading @@ -130,17 +130,17 @@ def execute_ignore_missing(conn, stmt) -> sqla.CursorResult: cursor. Note this may have unexpected results if you have joins/aggregations/etc that would have returned data with an empty table. """ try: # try: return conn.execute(stmt) except Exception as e: existing_tables = set(sqla.inspect(conn.engine).get_table_names()) stmt_tables = set([t.name for t in stmt.get_final_froms()]) missing_tables = stmt_tables - existing_tables if missing_tables: logger.info(f"table(s) {', '.join(stmt_tables)} missing, returning empty result") return conn.execute(sqla.text("SELECT 1 FROM (VALUES (1)) AS tbl(a) WHERE 1 != 1")) else: raise e # except Exception as e: # existing_tables = set(sqla.inspect(conn.engine).get_table_names()) # stmt_tables = set([t.name for t in stmt.get_final_froms()]) # missing_tables = stmt_tables - existing_tables # if missing_tables: # logger.info(f"table(s) {', '.join(stmt_tables)} missing, returning empty result") # return conn.execute(sqla.text("SELECT 1 FROM (VALUES (1)) AS tbl(a) WHERE 1 != 1")) # else: # raise e def submit_ingest(ingest: dict): Loading Loading
.gitmodules +1 −1 Original line number Diff line number Diff line [submodule "simulation_server/simulation/raps"] path = simulation_server/simulation/raps url = git@code.ornl.gov:exadigit/raps.git url = https://github.com/ExaDigiT/RAPS.git branch = main
README.md +8 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,14 @@ REST API that allows running and querying the results from the ExaDigit simulation and RAPS. ## Loading RAPS submodule This uses [RAPS](https://github.com/ExaDigiT/RAPS) to run the simulation, which is loaded as a submodule. Make sure to run ``` git submodule update --init --recursive ``` to load the submodule. ## Downloading FMU models You can run the job and power simulation without downloading any FMU models. But to use the cooling simulation you'll need to download FMU models into the `models` directory. You can download Loading
simulation_server/util/druid.py +11 −11 Original line number Diff line number Diff line Loading @@ -130,17 +130,17 @@ def execute_ignore_missing(conn, stmt) -> sqla.CursorResult: cursor. Note this may have unexpected results if you have joins/aggregations/etc that would have returned data with an empty table. """ try: # try: return conn.execute(stmt) except Exception as e: existing_tables = set(sqla.inspect(conn.engine).get_table_names()) stmt_tables = set([t.name for t in stmt.get_final_froms()]) missing_tables = stmt_tables - existing_tables if missing_tables: logger.info(f"table(s) {', '.join(stmt_tables)} missing, returning empty result") return conn.execute(sqla.text("SELECT 1 FROM (VALUES (1)) AS tbl(a) WHERE 1 != 1")) else: raise e # except Exception as e: # existing_tables = set(sqla.inspect(conn.engine).get_table_names()) # stmt_tables = set([t.name for t in stmt.get_final_froms()]) # missing_tables = stmt_tables - existing_tables # if missing_tables: # logger.info(f"table(s) {', '.join(stmt_tables)} missing, returning empty result") # return conn.execute(sqla.text("SELECT 1 FROM (VALUES (1)) AS tbl(a) WHERE 1 != 1")) # else: # raise e def submit_ingest(ingest: dict): Loading