Skip to content

Commit

Permalink
Add RPC calls between extension components & SDFV as submodule (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
phschaad authored Jan 10, 2023
1 parent 310543a commit 8abfa89
Show file tree
Hide file tree
Showing 45 changed files with 16,495 additions and 7,461 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "packages/sdfv"]
path = packages/sdfv
url = git@github.com:spcl/dace-webclient.git
27 changes: 13 additions & 14 deletions backend/run_dace.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
import os
import re
import sys

try:
import dotenv
import re
import sys

import dotenv

# First, load the environment
dotenv.load_dotenv()
# Then, gather values
Expand Down Expand Up @@ -39,23 +41,20 @@
sys.path.extend(paths)
#####################################################################

import inspect
import sys
from argparse import ArgumentParser
from os import path

# Then, load the rest of the modules
import aenum
from argparse import ArgumentParser
import dace
import inspect
from os import path
import sys

sys.path.append(path.abspath(path.dirname(__file__)))

from dace_vscode.utils import (
load_sdfg_from_file,
disable_save_metadata,
restore_save_metadata,
get_exception_message,
)
from dace_vscode import transformations, arith_ops
from dace_vscode import arith_ops, transformations
from dace_vscode.utils import (disable_save_metadata, get_exception_message,
load_sdfg_from_file, restore_save_metadata)

meta_dict = {}

Expand All @@ -73,9 +72,8 @@ def get_property_metadata(force_regenerate=False):
}

# Lazy import to cut down on module load time.
from dace.sdfg.nodes import full_class_path
from dace.properties import TypeClassProperty

from dace.sdfg.nodes import full_class_path
# In order to get all transformation metadata the @make.properties
# annotation for each transformation needs to have run, so the
# transformations are registered in `dace.serialize._DACE_SERIALIZE_TYPES`.
Expand Down Expand Up @@ -338,6 +336,7 @@ def specialize_sdfg(path, symbol_map, remove_undef=True):

def run_daemon(port):
from logging.config import dictConfig

from flask import Flask, request

# Move Flask's logging over to stdout, because stderr is used for error
Expand Down
17 changes: 10 additions & 7 deletions media/components/analysis/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

<body>
<div id="contents-container" class="container-fluid">
<div id="none-message" class="hidden row">
<div id="none-message" class="row" style="display: none;">
</div>
<div id="contents" class="hidden row">
<div id="contents" class="row" style="display: none;">
<div>
<div id="heatmap-scaling-method-container">
<div>
Expand Down Expand Up @@ -50,7 +50,8 @@
</select>
</div>
</div>
<div class="form-row mt-2 hidden"
<div class="form-row mt-2"
style="display: none;"
id="scaling-method-hist-buckets-container">
<label class="form-label"
for="scaling-method-hist-buckets-input">
Expand All @@ -71,7 +72,8 @@
value="0"
id="scaling-method-hist-buckets-input">
</div>
<div class="form-row mt-2 hidden"
<div class="form-row mt-2"
style="display: none;"
id="scaling-method-exp-base-container">
<label class="form-label"
for="scaling-method-exp-base-input">
Expand Down Expand Up @@ -126,16 +128,17 @@
</div>
</div>
</div>
<hr class="horizontal-divider">
<div id="runtime-measurement">
<hr class="horizontal-divider" id="runtime-measurement-divider"
style="display: none;">
<div id="runtime-measurement" style="display: none;">
<div>
<span>
Runtime Measurements:
</span>
</div>
<div>
<input type="file" id="runtime-report-file-input"
class="hidden">
style="display: none;">
<div class="input-group mb-2">
<input type="text" class="form-control"
id="runtime-report-filename-label"
Expand Down
2 changes: 1 addition & 1 deletion media/components/history/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body>
<div id="contents" class="container-fluid">
<div class="row">
<div id="transformation-list" class="hidden">
<div id="transformation-list" style="display: none;">
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion media/components/outline/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<body>
<div id="contents" class="container-fluid">
<div class="row">
<div id="outline-list" class="hidden">
<div id="outline-list" style="display: none;">
</div>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions media/components/sdfv/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,12 @@
<div id="info-title-container">
<h5 class="offcanvas-title" id="info-title"></h5>
<div id="title-btns-container">
<div class="hidden button" id="goto-source-btn">
<div class="button" id="goto-source-btn"
style="display: none;">
<span>Go to Source</span>
</div>
<div class="hidden button" id="goto-cpp-btn">
<div class="button" id="goto-cpp-btn"
style="display: none;">
<span>Go to Generated Code</span>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions media/components/transformations/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</head>

<body>
<div id="transformation-loading-indicator" class="hidden">
<div id="transformation-loading-indicator" style="display: none;">
<div>
<div id="transformation-loading-text">
Loading&nbsp;
Expand All @@ -28,7 +28,7 @@
</div>
<div id="contents" class="container-fluid">
<div class="row">
<div id="transformation-list" class="hidden">
<div id="transformation-list" style="display: none;">
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 8abfa89

Please sign in to comment.