Skip to content

Commit

Permalink
Fixed formatting issues and corrected license.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsaxe committed Aug 4, 2024
1 parent f011573 commit 350b95c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

BSD 3-Clause License

Copyright (c) 2024, Paul Saxe
Copyright (c) 2024, The Molecular Sciences Software Institute at Virginia Tech
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
25 changes: 10 additions & 15 deletions reaction_path_step/reaction_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(
title="Reaction Path",
namespace="org.molssi.seamm.reaction_path",
extension=None,
logger=logger
logger=logger,
):
"""A step for Reaction Path in a SEAMM flowchart.
Expand All @@ -93,9 +93,7 @@ def __init__(
"""
logger.debug(f"Creating Reaction Path {self}")
self.subflowchart = seamm.Flowchart(
parent=self,
name="Reaction Path",
namespace=namespace
parent=self, name="Reaction Path", namespace=namespace
) # yapf: disable

super().__init__(
Expand All @@ -117,6 +115,7 @@ def version(self):
def git_revision(self):
"""The git version of this module."""
return reaction_path_step.__git_revision__

def set_id(self, node_id):
"""Set the id for node to a given tuple"""
self._id = node_id
Expand Down Expand Up @@ -151,21 +150,19 @@ def description_text(self, P=None):
try:
text += __(node.description_text(), indent=3 * " ").__str__()
except Exception as e:
print(
f"Error describing reaction_path flowchart: {e} in {node}"
)
print(f"Error describing reaction_path flowchart: {e} in {node}")
logger.critical(
f"Error describing reaction_path flowchart: {e} in {node}"
)
raise
except: # noqa: E722
print(
"Unexpected error describing reaction_path flowchart: {} in {}"
.format(sys.exc_info()[0], str(node))
"Unexpected error describing reaction path flowchart: "
f"{sys.exc_info()[0]} in {str(node)}"
)
logger.critical(
"Unexpected error describing reaction_path flowchart: {} in {}"
.format(sys.exc_info()[0], str(node))
self.logger.critical(
"Unexpected error describing reaction path flowchart: "
f"{sys.exc_info()[0]} in {str(node)}"
)
raise
text += "\n"
Expand Down Expand Up @@ -200,9 +197,7 @@ def run(self):

local = seamm.ExecLocal()
result = local.run(
cmd=["Reaction Path", "-in", "molssi.dat"],
files=files,
return_files=[]
cmd=["Reaction Path", "-in", "molssi.dat"], files=files, return_files=[]
) # yapf: disable

if result is None:
Expand Down
7 changes: 2 additions & 5 deletions reaction_path_step/tk_reaction_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
"""The graphical part of a Reaction Path step"""

import pprint # noqa: F401
import tkinter as tk
import tkinter as tk # noqa: F401

import reaction_path_step # noqa: F401
import seamm
from seamm_util import ureg, Q_, units_class # noqa: F401



class TkReactionPath(seamm.TkNode):
"""
The graphical part of a Reaction Path step in a flowchart.
Expand Down Expand Up @@ -125,9 +124,7 @@ def create_dialog(self):
self.dialog.geometry(f"{w}x{h}+{x}+{y}")

self.tk_subflowchart = seamm.TkFlowchart(
master=frame,
flowchart=self.node.subflowchart,
namespace=self.namespace
master=frame, flowchart=self.node.subflowchart, namespace=self.namespace
)
self.tk_subflowchart.draw()

Expand Down
4 changes: 3 additions & 1 deletion tests/test_reaction_path_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@
def test_construction():
"""Just create an object and test its type."""
result = reaction_path_step.ReactionPath()
assert str(type(result)) == "<class 'reaction_path_step.reaction_path.ReactionPath'>"
assert (
str(type(result)) == "<class 'reaction_path_step.reaction_path.ReactionPath'>"
)

0 comments on commit 350b95c

Please sign in to comment.