Skip to content

Commit ed9b5b0

Browse files
authored
Merge pull request #27 from molssi-seamm/dev
Bugfix: Error selecting systems by name
2 parents 09eda93 + f0ab768 commit ed9b5b0

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

HISTORY.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
=======
22
History
33
=======
4+
2024.8.21 -- Bugfix: Error selecting systems by name
5+
* There was a bug selecting system by name in the For Systems in Database branch.
6+
47
2024.8.16 -- Improved handling for For Systems in Database
58
* Added ability to get all configurations for each system, as well as using matching
69
or regexps for the names of configurations to select.

loop_step/loop.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ def run(self):
351351
if self._loop_value is None:
352352
self._loop_value = 0
353353
self._loop_length = len(configurations)
354-
print(f"{self._loop_length} configurations found.")
355354
printer.important(
356355
__(
357356
f"The loop will have {self._loop_length} iterations.\n\n",
@@ -615,7 +614,6 @@ def run(self):
615614
break
616615

617616
# Set the default system and configuration
618-
print(f"{self._loop_value} / {self._loop_length}")
619617
configuration = configurations[self._loop_value - 1]
620618
system_db = configuration.system_db
621619
system = configuration.system

loop_step/tk_loop.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,12 @@ def reset_dialog(self, widget=None):
192192
self["start"].grid(row=row, column=3, sticky=tk.W)
193193
self["end"].grid(row=row, column=4, sticky=tk.W)
194194
self["step"].grid(row=row, column=5, sticky=tk.W)
195+
row += 1
195196
elif loop_type == "Foreach":
196197
frame.columnconfigure(5, weight=0)
197198
self["variable"].grid(row=row, column=2, sticky=tk.W)
198199
self["values"].grid(row=row, column=3, sticky=tk.EW)
200+
row += 1
199201
frame.columnconfigure(3, weight=1)
200202
elif loop_type == "For rows in table":
201203
frame.columnconfigure(3, weight=0)
@@ -210,10 +212,19 @@ def reset_dialog(self, widget=None):
210212
if "empty" not in op:
211213
self["query-value"].grid(row=row, column=5, sticky=tk.EW)
212214
frame.columnconfigure(5, weight=1)
215+
row += 1
213216
elif loop_type == "For systems in the database":
214217
row += 1
215-
self["criteria"].grid(row=row, column=1, columnspan=3, sticky=tk.NSEW)
216-
frame.rowconfigure(row, weight=1, minsize=100)
218+
# self["criteria"].grid(row=row, column=1, columnspan=3, sticky=tk.NSEW)
219+
# frame.rowconfigure(row, weight=1, minsize=100)
220+
# row += 1
221+
222+
self["where system name"].grid(
223+
row=row, column=0, columnspan=2, sticky=tk.EW
224+
)
225+
choice = self["where system name"].get()
226+
if choice != "is anything":
227+
self["system name"].grid(row=row, column=2, columnspan=2, sticky=tk.EW)
217228
row += 1
218229

219230
self["default configuration"].grid(
@@ -224,12 +235,11 @@ def reset_dialog(self, widget=None):
224235
self["configuration name"].grid(
225236
row=row, column=2, columnspan=2, sticky=tk.EW
226237
)
227-
frame.columnconfigure(3, weight=1)
228238
row += 1
239+
frame.columnconfigure(3, weight=1)
229240
self["directory name"].grid(row=row, column=0, columnspan=3, sticky=tk.W)
230241
else:
231242
raise RuntimeError("Don't recognize the loop_type {}".format(loop_type))
232-
row += 1
233243
self["errors"].grid(row=row, column=0, columnspan=4, sticky=tk.W)
234244
row += 1
235245
frame.columnconfigure(0, minsize=40)

0 commit comments

Comments
 (0)