Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
fail-fast: false
matrix:
# as now the various plumed support sites use 3.9 and 3.8 (and with 3.10 starts to fail...)
python-version: ["3.8", "3.9"] #, "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12","3.13"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ coverage.xml
# virtual environments
/venv*
/env*
*.zip
*.stderr.*
/test*
12 changes: 6 additions & 6 deletions PlumedToHTML/PlumedLexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ class PlumedLexer(RegexLexer):
(r'(\w+)(=)(__FILL__)', bygroups(Name.Attribute, Text, Literal)),
(r'__FILL__', Literal),
# Find LABEL=lab
(r'((?i)LABEL)(=)(\S+\b)', bygroups(Name.Attribute, Text, String.Double)),
(r'([Ll][Aa][Bb][Ee][Ll])(=)(\S+\b)', bygroups(Name.Attribute, Text, String.Double)),
# Find special replica syntax with fill
(r'(\w+)(=)(@\S+:)(__FILL__)', bygroups(Name.Attribute, Text, Name.Constant, Literal)),
# Find special replica syntax with brackets around replica command
(r'(\w+)(=\{)(@\S+:)((?s)\{.*?\})(\})', bygroups(Name.Attribute, Text, Name.Constant, Generic, Text)),
(r'(?s)(\w+)(=\{)(@\S+:)(\{.*?\})(\})', bygroups(Name.Attribute, Text, Name.Constant, Generic, Text)),
# Find special repliica syntax with multiple brackets
(r'(\w+)(=)(@\S+:)((?s)\{\s*\{.*?\}\s*\})', bygroups(Name.Attribute, Text, Name.Constant, Generic)),
(r'(?s)(\w+)(=)(@\S+:)(\{\s*\{.*?\}\s*\})', bygroups(Name.Attribute, Text, Name.Constant, Generic)),
# Find special replica syntax with brackets
(r'(\w+)(=)(@\S+:)((?s)\{.*?\})', bygroups(Name.Attribute, Text, Name.Constant, Generic)),
(r'(?s)(\w+)(=)(@\S+:)(\{.*?\})', bygroups(Name.Attribute, Text, Name.Constant, Generic)),
# Find special replica syntax without brackets
(r'(\w+)(=)(@\S+:)(\S+\b)', bygroups(Name.Attribute, Text, Name.Constant, Generic)),
# Find KEYWORD with {} brackets around value
(r'(\w+)(=)((?s)\{.*?\})', bygroups(Name.Attribute, Text, Generic)),
(r'(?s)(\w+)(=)(\{.*?\})', bygroups(Name.Attribute, Text, Generic)),
# Find KEYWORD=whatever with comment immediately after end of whatever
(r'(\w+)(=)(\S+)(#.*$)', bygroups(Name.Attribute, Text, Generic, Comment)),
# Find KEYWORD=whatever
Expand All @@ -43,7 +43,7 @@ class PlumedLexer(RegexLexer):
# And stuff for long versions of shortcuts
(r'(^# PLUMED interprets the command:\n)(#.+$)', bygroups(Comment, Comment.Hashbang)),
# Find ENDPLUMED and set everything after it to a comment
(r'(^\s*ENDPLUMED)((?s).*\Z)', bygroups(Keyword, Comment)),
(r'(?s)(^\s*)([Ee][Nn][Dd][Pp][Ll][Uu][Mm][Ee][Dd])(.*\Z)', bygroups(Text, Keyword, Comment)),
# Find the start of shortcuts
(r'#SHORTCUT.*?\r?\n',Comment.Preproc),
# Find the start of a shortcut with a nested default
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"Operating System :: OS Independent",
],
install_requires=['lxml','pygments','requests','bs4'],
test_suite='nose.collector',
tests_require=['nose'],
# This adds the assets that PlumedToHTML.get_html_header() asks for ()
data_files=[('PlumedToHTML', ['PlumedToHTML/assets/header.html'])],
include_package_data=True,
)
# print(setuptools.find_packages())
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[testenv]
deps =
nose
coverage
commands = nosetests --with-coverage --cover-inclusive --cover-xml
deps = pytest
pytest-cov
commands = pytest --cov=PlumedToHTML --cov-report=term-missing PlumedToHTML/tests