Skip to content

Commit

Permalink
Bug fix to ensure that correct docstrings for shortcuts are used
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Aneurin Tribello committed May 15, 2024
1 parent 11ea9c1 commit e27cfae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions PlumedToHTML/PlumedFormatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def format(self, tokensource, outfile):
else :
# This outputs information on the values computed in the previous action for the header
if label not in all_labels :
if "shortcut_" + label not in self.valuedict.keys() : all_labels.add(label)
if shortcut_state==1 and "shortcut_" + label in self.valuedict.keys() : self.writeValueInfo( outfile, action, label, self.valuedict["shortcut_" + label] )
all_labels.add(label)
if shortcut_state>0 and "shortcut_" + label in self.valuedict.keys() : self.writeValueInfo( outfile, action, label, self.valuedict["shortcut_" + label] )
elif label in self.valuedict.keys() : self.writeValueInfo( outfile, action, label, self.valuedict[label] )
elif action in self.keyword_dict and "output" in self.keyword_dict[action]["syntax"] : self.writeValuesData( outfile, action, label, keywords, self.keyword_dict[action]["syntax"]["output"] )
else :
Expand Down Expand Up @@ -214,8 +214,8 @@ def format(self, tokensource, outfile):
outfile.write('<div class="tooltip" style="color:green">' + value.strip() + '<div class="right">'+ self.keyword_dict[action]["description"] + ' <a href="' + self.keyword_dict[action]["hyperlink"] + '" style="color:green">More details</a><i></i></div></div>')
# Check if there is stuff to output for the last action in the file
if len(label)>0 and label not in all_labels :
if "shortcut_" + label not in self.valuedict.keys() : all_labels.add( label )
if shortcut_state==1 and "shortcut_" + label in self.valuedict.keys() : self.writeValueInfo( outfile, action, label, self.valuedict["shortcut_" + label] )
all_labels.add( label )
if shortcut_state>0 and "shortcut_" + label in self.valuedict.keys() : self.writeValueInfo( outfile, action, label, self.valuedict["shortcut_" + label] )
elif label in self.valuedict.keys() : self.writeValueInfo( outfile, action, label, self.valuedict[label] )
elif action in self.keyword_dict and "output" in self.keyword_dict[action]["syntax"] : self.writeValuesData( outfile, action, label, keywords, self.keyword_dict[action]["syntax"]["output"] )
else :
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setuptools.setup(
name='PlumedToHTML',
version='0.67',
version='0.68',
author="Gareth Tribello",
author_email="[email protected]",
description="A package for creating pretified HTML for PLUMED files",
Expand Down

0 comments on commit e27cfae

Please sign in to comment.