Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check_inputs #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ build
.tox
__pycache__
coverage.xml
# remainings of tox tests
/colvar*
/bck*
/plinp*
/testmarkdown*
/mermaid*
# virtual environments
/venv*
/env*
13 changes: 9 additions & 4 deletions check_inputs/create_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,23 @@
print('<h2 class="project-tagline">The community-developed PLUgin for MolEcular Dynamics</h2>')
print('</section>')
print('<section class="main-content">', flush=True)

f = open("../tdata/tests.json")
# Putting this here You can see render the page while it is being generated
print( PlumedToHTML.get_html_header() )
f = open("./tdata/tests.json")
tests = json.load(f)
f.close()

for item in tests["regtests"] :
actions = set({})
out = PlumedToHTML.test_and_get_html( item["input"], "plinp" + str(item["index"]), actions=actions )
print("Input number " + str(item["index"]))

print(f"<h3>Input number {item['index']}</h3>")
#this visualizes the "from-to" and it is more clear to eye-check what is going on
print("<pre>")
print(item["input"])
print("</pre>")
print( out )

print( PlumedToHTML.get_html_header() )
print('</section>')
print('</body>')
print('</html>')
34 changes: 19 additions & 15 deletions check_inputs/make_inputs.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
#!/bin/bash
PlumedToHTMLInstalled=no
# This script will test PlumedToHTML (without needing to install it)

# Delete all the crap from the last time we ran this
for file in `ls .` ; do
if [ $file != "make_inputs.sh" ] && [ $file != "create_inputs.py" ] ; then
rm -rf $file
fi
done

# Create symbolic links to PlumedToHMTL
ln -s ../PlumedToHTML/PlumedFormatter.py .
ln -s ../PlumedToHTML/PlumedToHTML.py .
ln -s ../PlumedToHTML/PlumedLexer.py
ln -s ../PlumedtoHTML/assets .
ln -s ../tdata .

# Clean the previous run
rm -rf testDir
mkdir testDir
cd testDir || {
echo "error in creating the testDirectory"
exit 1
}
if [[ $PlumedToHTMLInstalled = no ]]; then
# Create symbolic links to PlumedToHMTL
ln -s ../../PlumedToHTML/PlumedFormatter.py .
ln -s ../../PlumedToHTML/PlumedToHTML.py .
ln -s ../../PlumedToHTML/PlumedLexer.py .
ln -s ../../PlumedToHTML/assets .
fi
ln -s ../../tdata .
cp ../create_inputs.py .
# And run the python
python create_inputs.py > check_site.html
python create_inputs.py >check_site.html
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
lxml
pygments
requests
bs4
Loading