Skip to content

Commit

Permalink
added version to ui
Browse files Browse the repository at this point in the history
  • Loading branch information
AdnanAbouelela committed Dec 5, 2024
1 parent 552a225 commit 1960f99
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/spaceolotl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from importlib.metadata import version, PackageNotFoundError

try:
__version__ = version("spaceolotl")
__version__ = version("amex_merfish_spaceolotl")
except PackageNotFoundError:
__version__ = "0.0.0_fallback"
3 changes: 1 addition & 2 deletions src/spaceolotl/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from shiny import App
from spaceolotl.mod.ui import app_ui as _ui
from spaceolotl.mod.server import server as _server
from spaceolotl import __version__
print(__version__)

app = App(_ui, _server)
19 changes: 10 additions & 9 deletions src/spaceolotl/mod/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@

from spaceolotl._constants import DATA, GENES, LEIDEN_RESOLUTIONS
from spaceolotl.js._format import DROPDOWN_CONFIG
from spaceolotl import __version__

app_ui = ui.page_navbar(

# RNA
ui.nav_panel("RNA", "Page A content"),

# ATAC
ui.nav_panel("ATAC", "Page B content"),

# MERFISH
ui.nav_panel("MERFISH",
ui.nav_panel(ui.HTML("MERFISH<br><span style='font-size: smaller;'>data v1.0.2</span>"),

# Sidebar
ui.page_sidebar(
Expand Down Expand Up @@ -77,9 +72,15 @@
col_widths={"sm": (5, 7, 12)}
)

),
)
),

# RNA
ui.nav_panel(ui.HTML("RNA<br><span style='font-size: smaller;'>coming soon</span>")),

# ATAC
ui.nav_panel(ui.HTML("ATAC<br><span style='font-size: smaller;'>coming soon</span>")),

# Main content


Expand All @@ -88,7 +89,7 @@
ui.nav_spacer(),
ui.nav_control(ui.input_dark_mode(id="mode", mode = 'dark')),

title="A Cell Atlas of the Axolotl Brain",
title=ui.HTML(f"A Cell Atlas of the Axolotl Brain<br><span style='font-size: 12px; display: block; '>app v{__version__}</span>"),
id="page"

)

0 comments on commit 1960f99

Please sign in to comment.