Skip to content

Commit 459370a

Browse files
CopilotSierd
andcommitted
Address code review feedback: move import to top and remove hardcoded path
Co-authored-by: Sierd <[email protected]>
1 parent 5eb7484 commit 459370a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

aeolis/gui.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
import matplotlib.pyplot as plt
77
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
88
from matplotlib.figure import Figure
9+
from aeolis.constants import DEFAULT_CONFIG
910

1011
try:
1112
import netCDF4
1213
HAVE_NETCDF = True
1314
except ImportError:
1415
HAVE_NETCDF = False
1516

16-
# Default configuration file path
17-
configfile = r'C:\Users\svries\Documents\GitHub\OE_aeolis-python\aeolis\examples\2D\Barchan_dune\aeolis.txt'
17+
# Default configuration file path (placeholder, will be replaced by user selection)
18+
configfile = os.path.join(os.getcwd(), "aeolis.txt")
1819

1920
# Function to prompt the user to select a configuration file
2021
def prompt_file():
@@ -38,10 +39,8 @@ def prompt_file():
3839
dic = aeolis.inout.read_configfile(configfile)
3940
else:
4041
# User canceled - load empty fields with defaults
41-
# Set configfile to a placeholder path in the current directory
42-
configfile = os.path.join(os.getcwd(), "aeolis.txt")
42+
# Keep configfile as placeholder path in the current directory
4343
# Use the default configuration from constants
44-
from aeolis.constants import DEFAULT_CONFIG
4544
dic = DEFAULT_CONFIG.copy()
4645

4746
class AeolisGUI:

0 commit comments

Comments
 (0)