Skip to content

Commit

Permalink
add docstring to conf_app function, change requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
ikaryss committed Mar 6, 2023
1 parent 6bc5e0d commit 2c23260
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ numba = ">=0.54.1"
kaleido = "0.1.0"
pillow = ">=9.1.0"
dash = ">=1.21.0"
jupyter-dash = ">=0.4.0"
jupyter-dash = {git = "https://github.com/plotly/jupyter-dash.git", rev = "master"}
PeakUtils = ">=1.3.3"
matplotlib = "^3.5.2"
dash-bootstrap-components = "^1.2.1"
dash-bootstrap-templates = "^1.0.7"
dash-daq = "^0.5.0"
dash-iconify = "^0.1.2"
werkzeug = "2.1.2"

[tool.poetry.dev-dependencies]
pytest = "^7.1.2"
Expand Down
16 changes: 16 additions & 0 deletions pyquac/fmn_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@


def conf_app(spectroscopy, cmap: str = settings.init_cmap):
"""configurate layout and dependencies for plotly dash app
Args:
spectroscopy (dict | list of dicts): each dict contains following keys:\n
data - contains Spectroscopy instance\n
chip - contains chip id or name\n
qubit_toggle - contains name of qubit interaction (for instance: "q1" or "q1_q2_sweep")\n
type - Spectroscopy type "TTS" or "STS"\n
cmap (str, optional): color map for heatmap graph. Defaults to {settings.init_cmap}.
Raises:
PreventUpdate: if dict instance doesn't match the rules
Returns:
Dash app: ready to go plotly Jupyter dash application
"""

# Data configuration block
data_zoo, chip_zoo, qubit_zoo, type_zoo = initial_spectroscopy_in_app(spectroscopy)
Expand Down

0 comments on commit 2c23260

Please sign in to comment.