Skip to content

Commit

Permalink
Fix imports, make app runnable
Browse files Browse the repository at this point in the history
  • Loading branch information
kretep committed Dec 2, 2024
1 parent ed0172b commit 8db7843
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 23 deletions.
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cvasl-gui"
version = "0.1.1"
version = "0.1.2"
description = "A GUI for the cvasl package"
authors = ["Peter Kok <[email protected]>"]
license = "Apache 2.0"
Expand All @@ -12,6 +12,8 @@ dash = "^2.18.1"
pandas = "^2.2.3"
statsmodels = "^0.14.4"

[tool.poetry.scripts]
cvasl-gui = "cvasl_gui.index:main"

[build-system]
requires = ["poetry-core"]
Expand Down
4 changes: 2 additions & 2 deletions src/cvasl_gui/components/data_table.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pandas as pd
from dash import Input, Output, dash_table
from dash.exceptions import PreventUpdate
from app import app
import data_store
from cvasl_gui.app import app
from cvasl_gui import data_store


def create_data_table():
Expand Down
4 changes: 2 additions & 2 deletions src/cvasl_gui/components/directory_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from dash import dcc, html, Input, Output, State
from dash.exceptions import PreventUpdate
import pandas as pd
from app import app
import data_store
from cvasl_gui.app import app
from cvasl_gui import data_store


def create_directory_input():
Expand Down
4 changes: 2 additions & 2 deletions src/cvasl_gui/components/plots/box_plot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from dash import html, dcc, Input, Output
from app import app
from cvasl_gui.app import app
import plotly.express as px
import data_store
from cvasl_gui import data_store


layout = html.Div([
Expand Down
4 changes: 2 additions & 2 deletions src/cvasl_gui/components/plots/scatter_plot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from dash import html, dcc, Input, Output
from app import app
from cvasl_gui.app import app
import plotly.express as px
import data_store
from cvasl_gui import data_store


layout = html.Div([
Expand Down
4 changes: 2 additions & 2 deletions src/cvasl_gui/components/plots/violin_plot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from dash import html, dcc, Input, Output
from app import app
from cvasl_gui.app import app
import plotly.express as px
import data_store
from cvasl_gui import data_store


layout = html.Div([
Expand Down
16 changes: 10 additions & 6 deletions src/cvasl_gui/index.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from dash import html, dcc, Input, Output

import data_store
from app import app
from tab_data_inspection import create_tab_data_inspection
from tab_input_selection import create_tab_input_selection
from tab_compare import create_tab_compare
from cvasl_gui import data_store
from cvasl_gui.app import app
from cvasl_gui.tab_data_inspection import create_tab_data_inspection
from cvasl_gui.tab_input_selection import create_tab_input_selection
from cvasl_gui.tab_compare import create_tab_compare

data_store.all_data = None
data_store.selected_directory = None
Expand Down Expand Up @@ -48,5 +48,9 @@ def display_content(selected_tab):
return [{'display': 'block' if selected_tab == str(i) else 'none'} for i in range(1, 6)]


if __name__ == '__main__':
def main():
app.run_server(debug=True)


if __name__ == '__main__':
main()
8 changes: 4 additions & 4 deletions src/cvasl_gui/tab_compare.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import dash
from dash import Dash, html, dcc, Input, Output
from components.plots import violin_plot
from components.plots import box_plot
from components.plots import scatter_plot
from app import app
from cvasl_gui.components.plots import violin_plot
from cvasl_gui.components.plots import box_plot
from cvasl_gui.components.plots import scatter_plot
from cvasl_gui.app import app


def create_tab_compare():
Expand Down
2 changes: 1 addition & 1 deletion src/cvasl_gui/tab_data_inspection.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from dash import html
from components.data_table import create_data_table
from cvasl_gui.components.data_table import create_data_table

def create_tab_data_inspection():
return html.Div([
Expand Down
2 changes: 1 addition & 1 deletion src/cvasl_gui/tab_input_selection.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from dash import html
from components.directory_input import create_directory_input
from cvasl_gui.components.directory_input import create_directory_input

def create_tab_input_selection():
return html.Div([
Expand Down

0 comments on commit 8db7843

Please sign in to comment.