Skip to content

Commit e92f7c8

Browse files
some paths again corrected
1 parent 2198a90 commit e92f7c8

5 files changed

Lines changed: 17 additions & 20 deletions

File tree

pica/keithley/delta_mode/IV_K6221_DC_Sweep_GUI.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def launch_plotter_utility():
9494
"""Finds and launches the plotter utility script in a new process."""
9595
try:
9696
script_dir = os.path.dirname(os.path.abspath(__file__))
97-
plotter_path = os.path.join(script_dir, "..", "Utilities", "PlotterUtil_Frontend_v3.py")
97+
plotter_path = os.path.join(script_dir, "..", "..", "utils", "PlotterUtil_GUI.py")
9898
if not os.path.exists(plotter_path):
9999
messagebox.showerror("File Not Found", f"Plotter utility not found at expected path:\n{plotter_path}")
100100
return
@@ -106,7 +106,7 @@ def launch_gpib_scanner():
106106
"""Finds and launches the GPIB scanner utility in a new process."""
107107
try:
108108
script_dir = os.path.dirname(os.path.abspath(__file__))
109-
scanner_path = os.path.join(script_dir, "..", "Utilities", "GPIB_Instrument_Scanner_Frontend_v4.py")
109+
scanner_path = os.path.join(script_dir, "..", "..", "utils", "GPIB_scan_GUI.py")
110110
if not os.path.exists(scanner_path):
111111
messagebox.showerror("File Not Found", f"GPIB Scanner not found at expected path:\n{scanner_path}")
112112
return

run_pica.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
"""
2-
Main entry point to launch the PICA application.
3-
"""
41
from pica.main import main
52

63
if __name__ == '__main__':

tests/test_deep_simulation.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def test_01_k2400_iv_backend(self):
104104
with patch('sys.argv', test_args), \
105105
patch('pandas.DataFrame.to_csv'):
106106
self.run_module_safely(
107-
"Keithley_2400.Instrument_Control.IV_K2400_Loop_Instrument_Control", {})
107+
"pica.keithley.k2400.Instrument_Control.IV_K2400_Loop_Instrument_Control", {})
108108
spy.enable_source.assert_called()
109109

110110
@pytest.mark.usefixtures("mock_tkinter")
@@ -119,7 +119,7 @@ def test_02_lakeshore_backend(self):
119119

120120
with patch('builtins.input', side_effect=['10', '300', '10', '350']), \
121121
patch('builtins.open', mock_open()):
122-
self.run_module_safely("Lakeshore_350_340.Instrument_Control.T_Control_L350_Simple_Instrument_Control", {})
122+
self.run_module_safely("pica.lakeshore.Instrument_Control.T_Control_L350_Simple_Instrument_Control", {})
123123

124124
@pytest.mark.usefixtures("mock_tkinter")
125125
def test_03_k6517b_pyro_backend(self):
@@ -131,7 +131,7 @@ def test_03_k6517b_pyro_backend(self):
131131
spy.current = 1.23e-9
132132
with patch('pandas.DataFrame.to_csv'):
133133
self.run_module_safely(
134-
"Keithley_6517B.Pyroelectricity.Instrument_Control."
134+
"pica.keithley.k6517b.Pyroelectricity.Instrument_Control."
135135
"Current_K6517B_Simple_Instrument_Control", {})
136136

137137
@pytest.mark.usefixtures("mock_tkinter")
@@ -146,7 +146,7 @@ def test_04_lcr_keysight_backend(self):
146146
visa_spy.query.return_value = "0.5"
147147
with patch('pandas.DataFrame.to_csv'):
148148
self.run_module_safely(
149-
"LCR_Keysight_E4980A.Instrument_Control.CV_KE4980A_Simple_Instrument_Control", {})
149+
"pica.keysight.Instrument_Control.CV_KE4980A_Simple_Instrument_Control", {})
150150

151151
@pytest.mark.usefixtures("mock_tkinter")
152152
def test_05_delta_simple(self):
@@ -158,7 +158,7 @@ def test_05_delta_simple(self):
158158
inputs = ['0', '1e-5', '1e-6', 'test_file', 'y', 'y']
159159
with patch('builtins.input', side_effect=inputs), \
160160
patch('pandas.DataFrame.to_csv'):
161-
self.run_module_safely("Delta_mode_Keithley_6221_2182.Instrument_Control.Delta_K6221_K2182_Simple", {})
161+
self.run_module_safely("pica.keithley.delta_mode.Instrument_Control.Delta_K6221_K2182_Simple", {})
162162

163163
@pytest.mark.usefixtures("mock_tkinter")
164164
def test_06_delta_sensing(self):
@@ -174,7 +174,7 @@ def test_06_delta_sensing(self):
174174
patch('pandas.DataFrame.to_csv'):
175175
try:
176176
self.run_module_safely(
177-
"Delta_mode_Keithley_6221_2182.Instrument_Control.Delta_K6221_K2182_L350_T_Sensing_Instrument_Control", {})
177+
"pica.keithley.delta_mode.Instrument_Control.Delta_K6221_K2182_L350_T_Sensing_Instrument_Control", {})
178178
except ModuleNotFoundError:
179179
print(" [SKIP] Module not found, skipping.")
180180

@@ -216,7 +216,7 @@ def test_08_combined_2400_2182(self):
216216
with patch('builtins.input', side_effect=inputs), \
217217
patch('pandas.DataFrame.to_csv'):
218218
self.run_module_safely(
219-
"Keithley_2400_Keithley_2182.Instrument_Control.IV_K2400_K2182_Instrument_Control", {})
219+
"pica.keithley.k2400.Keithley_2182.Instrument_Control.IV_K2400_K2182_Instrument_Control", {})
220220
mock_pymeasure.stop()
221221

222222
@pytest.mark.usefixtures("mock_tkinter")
@@ -228,7 +228,7 @@ def test_09_poling(self):
228228
inputs = ['100', '10', 'y']
229229
with patch('builtins.input', side_effect=inputs):
230230
self.run_module_safely(
231-
"Keithley_6517B.Pyroelectricity.Instrument_Control.Poling_K6517B_Instrument_Control", {})
231+
"pica.keithley.k6517b.Pyroelectricity.Instrument_Control.Poling_K6517B_Instrument_Control", {})
232232

233233
@pytest.mark.usefixtures("mock_tkinter")
234234
def test_10_high_resistance(self):
@@ -246,7 +246,7 @@ def test_10_high_resistance(self):
246246

247247
with patch('builtins.input', side_effect=inputs), \
248248
patch('builtins.open', mock_open()):
249-
self.run_module_safely("Keithley_6517B.High_Resistance.Instrument_Control.IV_K6517B_Simple_Instrument_Control", {})
249+
self.run_module_safely("pica.keithley.k6517b.High_Resistance.Instrument_Control.IV_K6517B_Simple_Instrument_Control", {})
250250

251251
@pytest.mark.usefixtures("mock_tkinter")
252252
def test_11_gpib_scanner(self):

tests/test_full_stack_simulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def test_keithley2400_iv_protocol(self):
6262
with patch('sys.argv', test_args), \
6363
patch('pandas.DataFrame.to_csv'):
6464
self.run_module_safely(
65-
"Keithley_2400.Instrument_Control.IV_K2400_Loop_Instrument_Control")
65+
"pica.keithley.k2400.Instrument_Control.IV_K2400_Loop_Instrument_Control")
6666

6767
# Assertions
6868
spy_inst.enable_source.assert_called()
@@ -121,7 +121,7 @@ def test_lakeshore_visa_communication(self):
121121
patch('tkinter.filedialog.asksaveasfilename', mock_file_dialog):
122122

123123
self.run_module_safely(
124-
"Lakeshore_350_340.Instrument_Control.T_Control_L350_Simple_Instrument_Control")
124+
"pica.lakeshore.Instrument_Control.T_Control_L350_Simple_Instrument_Control")
125125

126126
# --- ASSERTIONS ---
127127
# Now that the script runs fully without crashing on .plot(),

tests/test_gui_layouts.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
sys.path.insert(0, project_root)
1515

1616
GUI_TARGETS = [
17-
"Keithley_6517B.High_Resistance.IV_K6517B_GUI",
18-
"Keithley_6517B.High_Resistance.RT_K6517B_L350_T_Control_GUI",
19-
"Keithley_2400.IV_K2400_GUI",
20-
"Lakeshore_350_340.T_Sensing_L350_GUI"
17+
"pica.keithley.k6517b.High_Resistance.IV_K6517B_GUI",
18+
"pica.keithley.k6517b.High_Resistance.RT_K6517B_L350_T_Control_GUI",
19+
"pica.keithley.k2400.IV_K2400_GUI",
20+
"pica.lakeshore.T_Sensing_L350_GUI"
2121
]
2222

2323
# --- SAFE CLASSES ---

0 commit comments

Comments
 (0)