Skip to content

Commit 2c1ef45

Browse files
authored
Merge pull request #22 from Iximiel/testplumedheaderinprocessmd_mermaid
added the p_tkwargs also to the get_mermaid calls)
2 parents 801ab0f + 6f467b1 commit 2c1ef45

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/PlumedToHTML/PlumedToHTML.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,13 +450,14 @@ def get_html( inpt, name, outloc, tested, broken, plumedexe, usejson=None, maxch
450450
else : raise Exception("Could not find toggler command for " + val)
451451
return html
452452

453-
def get_mermaid( executible, inpt, force, test_plumed_kwargs={} ) :
453+
def get_mermaid( executible, inpt, force,*, test_plumed_kwargs={} ) :
454454
"""
455455
Generate the mermaid graph showing how data passes through PLUMED input file
456456
457457
Keyword arguments:
458458
inpt -- A string containing the PLUMED input
459459
force -- Bool that if true ensures we show the graph for the backwards pass through the action list
460+
test_plumed_kwargs -- a dictionary of extra keywords to pass to the test_plumed utility, useful for passing an"header"
460461
"""
461462
# Write the plumed input to a file
462463
iff = open( "mermaid_plumed.dat", "w+")
@@ -735,9 +736,11 @@ def processMarkdownString( inp, filename, plumedexe, plumed_names, actions, ofil
735736
if usemermaid!="" :
736737
skipplumedfile, mermaidinpt = True, ""
737738
if usemermaid=="value" :
738-
mermaidinpt = get_mermaid( plumedexe[-1], plumed_inp, False )
739+
mermaidinpt = get_mermaid( plumedexe[-1], plumed_inp, False,
740+
test_plumed_kwargs=test_plumed_kwargs)
739741
elif usemermaid=="force" :
740-
mermaidinpt = get_mermaid( plumedexe[-1], plumed_inp, True )
742+
mermaidinpt = get_mermaid( plumedexe[-1], plumed_inp, True,
743+
test_plumed_kwargs=test_plumed_kwargs)
741744
else :
742745
raise RuntimeError(usemermaid + "is invalid instruction for use mermaid")
743746
if ghmarkdown : ofile.write("```mermaid\n" + mermaidinpt + "\n```\n")

0 commit comments

Comments
 (0)