Skip to content

Commit

Permalink
adjusted behaviour of frames when resizing windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mmedl94 committed Nov 14, 2024
1 parent 4d89146 commit 85b10c9
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bioprocessnexus.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: bioprocessnexus
Version: 1.0.4
Version: 1.0.5
Summary: README.md
Author-email: Matthias Medll <matthias.medl@chello.at>
Description-Content-Type: text/markdown
Expand Down
Binary file modified bioprocessnexus/__pycache__/data_managment.cpython-311.pyc
Binary file not shown.
Binary file modified bioprocessnexus/__pycache__/interact_hist.cpython-311.pyc
Binary file not shown.
Binary file modified bioprocessnexus/__pycache__/main.cpython-311.pyc
Binary file not shown.
Binary file modified bioprocessnexus/__pycache__/mc_subsampling.cpython-311.pyc
Binary file not shown.
Binary file modified bioprocessnexus/__pycache__/performance_eval.cpython-311.pyc
Binary file not shown.
Binary file modified bioprocessnexus/__pycache__/prediction_making.cpython-311.pyc
Binary file not shown.
Binary file modified bioprocessnexus/__pycache__/scaling_performance.cpython-311.pyc
Binary file not shown.
7 changes: 4 additions & 3 deletions bioprocessnexus/data_managment.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ def choose_y(parent):
parent.feature_selection = {}

frame_response = ctk.CTkScrollableFrame(parent.y_select_window)
frame_response.grid(row=0, column=0, padx=20, pady=0)
frame_response.grid(row=0, column=0, padx=20, pady=0, sticky="nsew")
frame_feature = ctk.CTkScrollableFrame(parent.y_select_window)
frame_feature.grid(row=0, column=1, padx=20, pady=0)
frame_feature.grid(row=0, column=1, padx=20, pady=0, sticky="nsew")

parent.response_label = ctk.CTkLabel(frame_response,
text="Select responses",
Expand Down Expand Up @@ -278,7 +278,8 @@ def mix_models(parent):
parent.mix_window.grid_columnconfigure((0, 1), weight=1)

frame_response = ctk.CTkScrollableFrame(parent.mix_window)
frame_response.grid(row=0, column=0, columnspan=3, padx=20, pady=0)
frame_response.grid(row=0, column=0, columnspan=3,
padx=20, pady=0, sticky="nsew")

parent.response_label = ctk.CTkLabel(frame_response,
text="Responses",
Expand Down
2 changes: 1 addition & 1 deletion bioprocessnexus/interact_hist.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def interactive_hist(parent, y_dir):
parent.interactive_hist_window = tk.Toplevel(parent)
parent.interactive_hist_window.title("Interactive histogram")
parent.image_frame = ctk.CTkScrollableFrame(parent.interactive_hist_window)
parent.image_frame.grid(row=0, column=0, columnspan=5)
parent.image_frame.grid(row=0, column=0, columnspan=5, sticky="nsew")
parent.warning_issued = 0
parent.warning_trigger = 0
if parent.model_loaded == 1:
Expand Down
11 changes: 8 additions & 3 deletions bioprocessnexus/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class disclaimer(ctk.CTkToplevel):
def __init__(self, master):
super().__init__(master=master)
self.protocol("WM_DELETE_WINDOW", self.master.destroy)
self.title("BioProcessNexus - 1.0.4")
self.title("BioProcessNexus - 1.0.5")
self.disclaimer_label = ctk.CTkLabel(self,
text="Reminder: Using external sources without citing them goes against good " +
"scientific practice and is considered plagiarism. Please ensure that you cite the " +
Expand Down Expand Up @@ -75,8 +75,8 @@ class nexus(ctk.CTkToplevel):
def __init__(self, master):
super().__init__(master=master)

self.protocol("WM_DELETE_WINDOW", self.master.destroy)
self.title("BioProcessNexus - 1.0.4")
self.protocol("WM_DELETE_WINDOW", self.on_closing)
self.title("BioProcessNexus - 1.0.5")
self.var_names = ["None selected"]
self.filename = "None"
self.prediction_inputs = []
Expand Down Expand Up @@ -230,6 +230,11 @@ def __init__(self, master):
self.batch_predict_button.grid(
row=9, column=0, padx=20, pady=self.button_pad_y)

def on_closing(self):
if hasattr(self, "after_id"):
self.after_cancel(self.after_id)
self.destroy()


if __name__ == "__main__":
launch_nexus()
2 changes: 2 additions & 0 deletions bioprocessnexus/mc_subsampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def generate_data_interface(parent):

parent.data_generation_window = tk.Toplevel(parent)
parent.data_generation_window.title("Generate new dataset")
parent.data_generation_window.grid_rowconfigure(0, weight=1)
parent.data_generation_window.grid_columnconfigure(0, weight=1)

height1 = X_dim*40-30
height2 = parent.data_generation_window.winfo_screenheight()*0.7
Expand Down
9 changes: 6 additions & 3 deletions bioprocessnexus/prediction_making.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,23 @@ def make_predictions(parent):

parent.prediction_window = tk.Toplevel(parent)
parent.prediction_window.title("Make model predictions")
parent.prediction_window.grid_rowconfigure(0, weight=1)
parent.prediction_window.grid_columnconfigure(0, weight=1)
parent.prediction_window.grid_columnconfigure(1, weight=1)

height1 = X_dim*40-30
height2 = parent.prediction_window.winfo_screenheight()*0.65
height2 = parent.prediction_window.winfo_screenheight()*0.7

frame_height = np.min((height1*parent.scaling_factor,
height2*parent.scaling_factor))

X_frame = ctk.CTkScrollableFrame(
parent.prediction_window, height=frame_height, corner_radius=0)
X_frame.grid(row=0, column=0, sticky="ns", padx=20)
X_frame.grid(row=0, column=0, sticky="nsew", padx=20)

y_frame = ctk.CTkScrollableFrame(
parent.prediction_window, height=frame_height, corner_radius=0)
y_frame.grid(row=0, column=1, sticky="ns", padx=20)
y_frame.grid(row=0, column=1, sticky="nsew", padx=20)

get_results_button = ctk.CTkButton(parent.prediction_window,
width=200,
Expand Down
Binary file removed dist/bioprocessnexus-1.0.4-py3-none-any.whl
Binary file not shown.
Binary file removed dist/bioprocessnexus-1.0.4.tar.gz
Binary file not shown.
Binary file added dist/bioprocessnexus-1.0.5-py3-none-any.whl
Binary file not shown.
Binary file added dist/bioprocessnexus-1.0.5.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "bioprocessnexus"
version = "1.0.4"
version = "1.0.5"
authors = [
{ name="Matthias Medll", email="matthias.medl@chello.at" },
]
Expand Down

0 comments on commit 85b10c9

Please sign in to comment.