From 6f467b1e7ff64d7e0d196a8d023bc560e288fb8e Mon Sep 17 00:00:00 2001 From: Daniele Rapetti Date: Thu, 9 Oct 2025 09:44:47 +0200 Subject: [PATCH] added the p_tkwargs also to the get_mermaid calls) --- src/PlumedToHTML/PlumedToHTML.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/PlumedToHTML/PlumedToHTML.py b/src/PlumedToHTML/PlumedToHTML.py index 7a09dc6..a037317 100644 --- a/src/PlumedToHTML/PlumedToHTML.py +++ b/src/PlumedToHTML/PlumedToHTML.py @@ -450,13 +450,14 @@ def get_html( inpt, name, outloc, tested, broken, plumedexe, usejson=None, maxch else : raise Exception("Could not find toggler command for " + val) return html -def get_mermaid( executible, inpt, force, test_plumed_kwargs={} ) : +def get_mermaid( executible, inpt, force,*, test_plumed_kwargs={} ) : """ Generate the mermaid graph showing how data passes through PLUMED input file Keyword arguments: inpt -- A string containing the PLUMED input force -- Bool that if true ensures we show the graph for the backwards pass through the action list + test_plumed_kwargs -- a dictionary of extra keywords to pass to the test_plumed utility, useful for passing an"header" """ # Write the plumed input to a file iff = open( "mermaid_plumed.dat", "w+") @@ -735,9 +736,11 @@ def processMarkdownString( inp, filename, plumedexe, plumed_names, actions, ofil if usemermaid!="" : skipplumedfile, mermaidinpt = True, "" if usemermaid=="value" : - mermaidinpt = get_mermaid( plumedexe[-1], plumed_inp, False ) + mermaidinpt = get_mermaid( plumedexe[-1], plumed_inp, False, + test_plumed_kwargs=test_plumed_kwargs) elif usemermaid=="force" : - mermaidinpt = get_mermaid( plumedexe[-1], plumed_inp, True ) + mermaidinpt = get_mermaid( plumedexe[-1], plumed_inp, True, + test_plumed_kwargs=test_plumed_kwargs) else : raise RuntimeError(usemermaid + "is invalid instruction for use mermaid") if ghmarkdown : ofile.write("```mermaid\n" + mermaidinpt + "\n```\n")