Skip to content

Commit d81e168

Browse files
authored
Merge pull request #7 from Iximiel/feature/testmultipleversion-investigating
Feature/testmultipleversion investigating
2 parents 2e3cd4b + 19c3001 commit d81e168

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
fail-fast: false
7171
matrix:
7272
# as now the various plumed support sites use 3.9 and 3.8 (and with 3.10 starts to fail...)
73-
python-version: ["3.8", "3.9"] #, "3.10", "3.11", "3.12"]
73+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12","3.13"]
7474
runs-on: ubuntu-latest
7575
steps:
7676
- uses: actions/checkout@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ coverage.xml
1515
# virtual environments
1616
/venv*
1717
/env*
18+
*.zip
19+
*.stderr.*
20+
/test*

PlumedToHTML/PlumedLexer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ class PlumedLexer(RegexLexer):
1717
(r'(\w+)(=)(__FILL__)', bygroups(Name.Attribute, Text, Literal)),
1818
(r'__FILL__', Literal),
1919
# Find LABEL=lab
20-
(r'((?i)LABEL)(=)(\S+\b)', bygroups(Name.Attribute, Text, String.Double)),
20+
(r'([Ll][Aa][Bb][Ee][Ll])(=)(\S+\b)', bygroups(Name.Attribute, Text, String.Double)),
2121
# Find special replica syntax with fill
2222
(r'(\w+)(=)(@\S+:)(__FILL__)', bygroups(Name.Attribute, Text, Name.Constant, Literal)),
2323
# Find special replica syntax with brackets around replica command
24-
(r'(\w+)(=\{)(@\S+:)((?s)\{.*?\})(\})', bygroups(Name.Attribute, Text, Name.Constant, Generic, Text)),
24+
(r'(?s)(\w+)(=\{)(@\S+:)(\{.*?\})(\})', bygroups(Name.Attribute, Text, Name.Constant, Generic, Text)),
2525
# Find special repliica syntax with multiple brackets
26-
(r'(\w+)(=)(@\S+:)((?s)\{\s*\{.*?\}\s*\})', bygroups(Name.Attribute, Text, Name.Constant, Generic)),
26+
(r'(?s)(\w+)(=)(@\S+:)(\{\s*\{.*?\}\s*\})', bygroups(Name.Attribute, Text, Name.Constant, Generic)),
2727
# Find special replica syntax with brackets
28-
(r'(\w+)(=)(@\S+:)((?s)\{.*?\})', bygroups(Name.Attribute, Text, Name.Constant, Generic)),
28+
(r'(?s)(\w+)(=)(@\S+:)(\{.*?\})', bygroups(Name.Attribute, Text, Name.Constant, Generic)),
2929
# Find special replica syntax without brackets
3030
(r'(\w+)(=)(@\S+:)(\S+\b)', bygroups(Name.Attribute, Text, Name.Constant, Generic)),
3131
# Find KEYWORD with {} brackets around value
32-
(r'(\w+)(=)((?s)\{.*?\})', bygroups(Name.Attribute, Text, Generic)),
32+
(r'(?s)(\w+)(=)(\{.*?\})', bygroups(Name.Attribute, Text, Generic)),
3333
# Find KEYWORD=whatever with comment immediately after end of whatever
3434
(r'(\w+)(=)(\S+)(#.*$)', bygroups(Name.Attribute, Text, Generic, Comment)),
3535
# Find KEYWORD=whatever
@@ -43,7 +43,7 @@ class PlumedLexer(RegexLexer):
4343
# And stuff for long versions of shortcuts
4444
(r'(^# PLUMED interprets the command:\n)(#.+$)', bygroups(Comment, Comment.Hashbang)),
4545
# Find ENDPLUMED and set everything after it to a comment
46-
(r'(^\s*ENDPLUMED)((?s).*\Z)', bygroups(Keyword, Comment)),
46+
(r'(?s)(^\s*)([Ee][Nn][Dd][Pp][Ll][Uu][Mm][Ee][Dd])(.*\Z)', bygroups(Text, Keyword, Comment)),
4747
# Find the start of shortcuts
4848
(r'#SHORTCUT.*?\r?\n',Comment.Preproc),
4949
# Find the start of a shortcut with a nested default

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
"Operating System :: OS Independent",
2121
],
2222
install_requires=['lxml','pygments','requests','bs4'],
23-
test_suite='nose.collector',
24-
tests_require=['nose'],
23+
# This adds the assets that PlumedToHTML.get_html_header() asks for ()
24+
data_files=[('PlumedToHTML', ['PlumedToHTML/assets/header.html'])],
25+
include_package_data=True,
2526
)
27+
# print(setuptools.find_packages())

tox.ini

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[testenv]
2-
deps =
3-
nose
4-
coverage
5-
commands = nosetests --with-coverage --cover-inclusive --cover-xml
2+
deps = pytest
3+
pytest-cov
4+
commands = pytest --cov=PlumedToHTML --cov-report=term-missing PlumedToHTML/tests

0 commit comments

Comments
 (0)