From 6fbeb68476d76d0fe83540d71146c3f26412f3f3 Mon Sep 17 00:00:00 2001
From: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com>
Date: Fri, 13 Dec 2024 11:46:45 +0100
Subject: [PATCH 1/4] Correcting some links in check_inputs
---
check_inputs/create_inputs.py | 5 +++--
check_inputs/make_inputs.sh | 34 +++++++++++++++++++---------------
2 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/check_inputs/create_inputs.py b/check_inputs/create_inputs.py
index 6fb07c9..989345f 100644
--- a/check_inputs/create_inputs.py
+++ b/check_inputs/create_inputs.py
@@ -37,8 +37,9 @@
print('
The community-developed PLUgin for MolEcular Dynamics
')
print('')
print('', 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()
diff --git a/check_inputs/make_inputs.sh b/check_inputs/make_inputs.sh
index beec157..ed2a889 100755
--- a/check_inputs/make_inputs.sh
+++ b/check_inputs/make_inputs.sh
@@ -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
From 05b1ffd6d94685ddc5abd1419132bf96ac31f07b Mon Sep 17 00:00:00 2001
From: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com>
Date: Fri, 13 Dec 2024 11:47:13 +0100
Subject: [PATCH 2/4] simplifying the local testing
---
.gitignore | 9 +++++++++
requirements.txt | 4 ++++
2 files changed, 13 insertions(+)
create mode 100644 requirements.txt
diff --git a/.gitignore b/.gitignore
index dfccfba..02d5668 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,12 @@ build
.tox
__pycache__
coverage.xml
+# remainings of tox tests
+/colvar*
+/bck*
+/plinp*
+/testmarkdown*
+/mermaid*
+# virtual environments
+/venv*
+/env*
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..43c9fb9
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,4 @@
+lxml
+pygments
+requests
+bs4
From f3683a20e4fd52b81a9c96509a21322d17e2fa6b Mon Sep 17 00:00:00 2001
From: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com>
Date: Fri, 13 Dec 2024 12:20:36 +0100
Subject: [PATCH 3/4] removing the duplicated print(
PlumedToHTML.get_html_header() )
---
check_inputs/create_inputs.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/check_inputs/create_inputs.py b/check_inputs/create_inputs.py
index 989345f..f303c9f 100644
--- a/check_inputs/create_inputs.py
+++ b/check_inputs/create_inputs.py
@@ -49,7 +49,6 @@
print("Input number " + str(item["index"]))
print( out )
-print( PlumedToHTML.get_html_header() )
print('')
print('