Skip to content

Commit

Permalink
Merge pull request #171 from molssi-seamm/dev
Browse files Browse the repository at this point in the history
Allows capital letters in variables and columns for results
  • Loading branch information
seamm committed Jul 21, 2024
2 parents ffb08dc + c762011 commit b1a3e7b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
=======
History
=======
2024.7.21 -- Allows capital letters in variables and columns for results
* Allows capital letters for the variables, column names, etc. that results are
stored in. For example, 'T', 'P', and 'V'.

2024.6.27 -- Added support for using local data files.
* Added support in the Flowchart and Node classes for using local data files for
e.g. forcefields. This allows the user to specify a local file, which is copied to
Expand Down
1 change: 1 addition & 0 deletions seamm/flowchart.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def __init__(

# And the root directory and other information
self.root_directory = directory
self._data_path = None
self.in_jobserver = False

# And the parser associated with this flowchart
Expand Down
12 changes: 6 additions & 6 deletions seamm/tk_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,15 +748,15 @@ def handle_dialog(self, result):
w_variable.insert(0, tmp["variable"])
else:
self.tk_var[key].set(0)
w_variable.insert(0, key.lower().replace(" ", "_"))
w_variable.insert(0, key.replace(" ", "_"))

if w_table is not None:
if "table" in tmp:
w_table.insert(0, tmp["table"])
w_column.insert(0, tmp["column"])
else:
w_table.set("")
w_column.insert(0, key.lower().replace("_", " "))
w_column.insert(0, key.replace("_", " "))

if w_property is not None:
if "property" in tmp:
Expand All @@ -776,9 +776,9 @@ def handle_dialog(self, result):
else:
self.logger.debug(" resetting widgets")
self.tk_var[key].set(0)
w_variable.insert(0, key.lower().replace(" ", "_"))
w_variable.insert(0, key.replace(" ", "_"))
if w_column is not None:
w_column.insert(0, key.lower().replace("_", " "))
w_column.insert(0, key.replace("_", " "))

# Reset the parameters, if any
if self.node.parameters is not None:
Expand Down Expand Up @@ -1065,7 +1065,7 @@ def setup_results(self):
table.cell(row, 6, w)
widgets.append(w)
e = ttk.Entry(frame, width=15)
e.insert(0, key.lower().replace(" ", "_"))
e.insert(0, key.replace(" ", "_"))
table.cell(row, 7, e)
widgets.append(e)

Expand All @@ -1083,7 +1083,7 @@ def setup_results(self):
w.bind("<Return>", self._table_cb)
w.bind("<FocusOut>", self._table_cb)
e = ttk.Entry(frame, width=15)
e.insert(0, key.lower().replace("_", " "))
e.insert(0, key.replace("_", " "))
table.cell(row, 10, e)
widgets.append(e)

Expand Down

0 comments on commit b1a3e7b

Please sign in to comment.