Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Update dependencies #61

Open
wants to merge 2 commits into
base: jsversion
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/[email protected].4
uses: actions/[email protected].5

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import os

import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from celery import Celery
from dash import Dash
from dash import dcc
from dash import html

from .head import head_config
from .utils import slogger
Expand Down
4 changes: 2 additions & 2 deletions app/custom_widgets.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash import dcc
from dash import html
from dash.dependencies import Input
from dash.dependencies import Output
from dash.dependencies import State
Expand Down
4 changes: 2 additions & 2 deletions app/inv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

import csdmpy as cp
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import numpy as np
import plotly.graph_objs as go
from celery.result import AsyncResult
from dash import callback_context as ctx
from dash import dcc
from dash import html
from dash.dependencies import Input
from dash.dependencies import Output
from dash.dependencies import State
Expand Down
4 changes: 2 additions & 2 deletions app/inv/layout/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import dash_core_components as dcc
import dash_html_components as html
from dash import dcc
from dash import html

from .input import input_layer

Expand Down
10 changes: 6 additions & 4 deletions app/inv/layout/input.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash import dcc
from dash import html

from app.custom_widgets import custom_input_group
from app.sims.graph import generate_graph_instance
Expand Down Expand Up @@ -82,7 +82,8 @@ def inverse_dimensions():

# Kernel
def kernel_type():
label = dbc.InputGroupAddon("Type", addon_type="prepend")
# label = dbc.InputGroupAddon("Type", addon_type="prepend")
label = dbc.InputGroupText("Type")
kernel_options = [
{"label": "MAF", "value": "MAF"},
{"label": "Sideband correlation", "value": "sideband-correlation"},
Expand All @@ -94,7 +95,8 @@ def kernel_type():


def channel():
label = dbc.InputGroupAddon("Channel", addon_type="prepend")
# label = dbc.InputGroupAddon("Channel", addon_type="prepend")
label = dbc.InputGroupText("Channel")
selection = dbc.Select(
options=isotope_options_list, value="29Si", id="INV-kernel-channel"
)
Expand Down
7 changes: 4 additions & 3 deletions app/root/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import json

import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash import callback_context as ctx
from dash import dcc
from dash import html
from dash.dependencies import Input
from dash.dependencies import Output

Expand Down Expand Up @@ -53,7 +53,8 @@ def card(item, app_name):
# addon_type="prepend"
# ),
# dbc.Input(id="input-group-search", placeholder="Search on site"),
# dbc.InputGroupAddon(search_button, addon_type="append"),
# # dbc.InputGroupAddon(search_button, addon_type="append"),
# dbc.InputGroupText(search_button)
# ],
# size="lg",
# )
Expand Down
4 changes: 2 additions & 2 deletions app/sims/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

import csdmpy as cp
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import numpy as np
import plotly.graph_objs as go
from dash import callback_context as ctx
from dash import dcc
from dash import html
from dash import no_update
from dash.dependencies import Input
from dash.dependencies import Output
Expand Down
4 changes: 2 additions & 2 deletions app/sims/features/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash import dcc
from dash import html

from .fields import features_modal
from .fields import fields
Expand Down
4 changes: 2 additions & 2 deletions app/sims/features/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from datetime import datetime

import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash import callback_context as ctx
from dash import dcc
from dash import html
from dash.dependencies import ClientsideFunction
from dash.dependencies import Input
from dash.dependencies import Output
Expand Down
4 changes: 2 additions & 2 deletions app/sims/features/info_modal.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash import dcc
from dash import html
from dash.dependencies import Input
from dash.dependencies import Output
from dash.dependencies import State
Expand Down
4 changes: 2 additions & 2 deletions app/sims/fit_report/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import os

import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_extensions as de
import dash_html_components as html
import pdfkit
from dash import callback_context as ctx
from dash import dcc
from dash import html
from dash.dependencies import ClientsideFunction
from dash.dependencies import Input
from dash.dependencies import Output
Expand Down
4 changes: 2 additions & 2 deletions app/sims/graph.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_extensions as de
import dash_html_components as html
import plotly.graph_objs as go
from dash import dcc
from dash import html
from dash.dependencies import ClientsideFunction
from dash.dependencies import Input
from dash.dependencies import Output
Expand Down
4 changes: 2 additions & 2 deletions app/sims/home/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
- Spin system overview
"""
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import numpy as np
from dash import dcc
from dash import html
from dash.dependencies import ClientsideFunction
from dash.dependencies import Input
from dash.dependencies import Output
Expand Down
3 changes: 2 additions & 1 deletion app/sims/home/modal.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
"""Modal window for updating simulator title and description"""
import dash_bootstrap_components as dbc
from dash import html
from dash.dependencies import Input
from dash.dependencies import Output
from dash.dependencies import State
Expand Down Expand Up @@ -29,7 +30,7 @@ def description():


def body():
return dbc.FormGroup([*title(), *description()])
return html.Div([*title(), *description()])


def footer():
Expand Down
4 changes: 2 additions & 2 deletions app/sims/menubar.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash import dcc
from dash import html
from dash.dependencies import Input
from dash.dependencies import Output
from dash.dependencies import State
Expand Down
4 changes: 2 additions & 2 deletions app/sims/method/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from datetime import datetime

import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import numpy as np
from dash import dcc
from dash import html
from dash.dependencies import ClientsideFunction
from dash.dependencies import Input
from dash.dependencies import Output
Expand Down
4 changes: 2 additions & 2 deletions app/sims/method/fields.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import dash_core_components as dcc
import dash_html_components as html
from dash import dcc
from dash import html
from dash.dependencies import Input
from dash.dependencies import Output

Expand Down
11 changes: 7 additions & 4 deletions app/sims/method/modal.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
"""Modal window for method selection"""
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import mrsimulator.methods as mt
from dash import dcc
from dash.dependencies import Input
from dash.dependencies import Output
from dash.dependencies import State
Expand Down Expand Up @@ -30,12 +30,15 @@
head = dbc.ModalHeader("Select a method")

# method selection
method_selection = dcc.Dropdown(id="method-type", options=METHOD_OPTIONS, value=0)
method_selection = dcc.Dropdown(
id="method-type", options=METHOD_OPTIONS, value=0, clearable=False
)

# Channel selection
ch_label = dbc.InputGroupAddon("Channel", addon_type="prepend")
# ch_label = dbc.InputGroupAddon("Channel", addon_type="prepend")
ch_label = dbc.InputGroupText("Channel")
ch_selection = dbc.Select(options=isotope_options_list, value="1H", id="channel")
channel_ui = dbc.InputGroup([ch_label, ch_selection], className="container")
channel_ui = dbc.InputGroup(["ch_label", ch_selection], className="container")

# select button
button = dbc.Button(
Expand Down
4 changes: 2 additions & 2 deletions app/sims/modal/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import json

import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash import dcc
from dash import html
from dash.dependencies import Input
from dash.dependencies import Output
from mrsimulator import __version__ as mrsim_version
Expand Down
2 changes: 1 addition & 1 deletion app/sims/modal/help.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import dash_bootstrap_components as dbc
import dash_html_components as html
from dash import html


def get_icon_with_description(icon, description):
Expand Down
4 changes: 2 additions & 2 deletions app/sims/modal/spectra_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import json

import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import plotly
from dash import callback_context as ctx
from dash import dcc
from dash import html
from dash.dependencies import ClientsideFunction
from dash.dependencies import Input
from dash.dependencies import Output
Expand Down
4 changes: 2 additions & 2 deletions app/sims/navbar.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash import dcc
from dash import html

from .menubar import master_menubar
from app import year
Expand Down
2 changes: 1 addition & 1 deletion app/sims/post_simulation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import json

import dash_bootstrap_components as dbc
import dash_html_components as html
from dash import callback_context as ctx
from dash import html
from dash import no_update
from dash.exceptions import PreventUpdate
from mrsimulator import parse
Expand Down
11 changes: 7 additions & 4 deletions app/sims/post_simulation/convolution.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import dash_bootstrap_components as dbc
import dash_core_components as dcc
from dash import callback_context as ctx
from dash import dcc

from app.custom_widgets import container
from app.custom_widgets import custom_button
Expand All @@ -14,7 +14,8 @@

def ui(index, data=None, n_dim=1, n_dv=1, **kwargs):
def function_type(index):
type_label = dbc.InputGroupAddon("Type", addon_type="prepend")
# type_label = dbc.InputGroupAddon("Type", addon_type="prepend")
type_label = dbc.InputGroupText("Type")
val = "Exponential" if data is None else data["type"]
type_select = dbc.Select(
options=[
Expand All @@ -38,7 +39,8 @@ def arguments(index):
)

def dimension_index(index):
input_ = dbc.InputGroupAddon("Spectral dimension indexes", addon_type="prepend")
# input_=dbc.InputGroupAddon("Spectral dimension indexes", addon_type="prepend")
input_ = dbc.InputGroupText("Spectral dimension indexes")

value = [0]
if data is not None:
Expand All @@ -53,7 +55,8 @@ def dimension_index(index):
return dbc.InputGroup([input_, dim_index], className="input-form")

def dependent_variable_index(index):
input_ = dbc.InputGroupAddon("Spin System indexes", addon_type="prepend")
# input_ = dbc.InputGroupAddon("Spin System indexes", addon_type="prepend")
input_ = dbc.InputGroupText("Spin System indexes")
options = [{"label": f"{i}", "value": i} for i in range(n_dv)]
options += [{"label": "ALL", "value": "None"}]

Expand Down
6 changes: 3 additions & 3 deletions app/sims/sidebar.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash import dcc
from dash import html
from dash.dependencies import Input
from dash.dependencies import Output
from dash.dependencies import State
Expand Down Expand Up @@ -179,7 +179,7 @@ def body():
integration_info(),
number_of_sidebands(),
]
return dbc.FormGroup(form)
return form

def footer():
"""Modal footer is a close button"""
Expand Down
4 changes: 2 additions & 2 deletions app/sims/spin_system/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import numpy as np
from dash import dcc
from dash import html
from dash.dependencies import ClientsideFunction
from dash.dependencies import Input
from dash.dependencies import Output
Expand Down
Loading