Skip to content

Commit 5e937dd

Browse files
authored
Fix plotting bug during analyze (PR #86)
Running `mdbenchmark analyze --plot` will now work again.
2 parents 5d6d00a + 426b8aa commit 5e937dd

File tree

3 files changed

+22
-6
lines changed

3 files changed

+22
-6
lines changed

CHANGELOG.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,29 @@ to update this file automatically for each release.
99

1010
.. towncrier release notes start
1111
12+
MDBenchmark 1.3.3 (2018-09-24)
13+
==============================
14+
15+
Bugfixes
16+
--------
17+
18+
- Fixed a bug where the user was unable to call ``mdbenchmark analyze --plot``. (#86)
19+
20+
1221
MDBenchmark 1.3.2 (2018-07-20)
1322
==============================
1423

1524
Bugfixes
1625
--------
1726

18-
- We now print all rows when running `mdbenchmark analyze`. (#68)
27+
- We now print all rows when running ``mdbenchmark analyze``. (#68)
1928
- Suppress UserWarning caused by ``MDAnalysis==0.18``. (#71)
2029

2130

2231
Misc
2332
----
2433

25-
- Added new error message when running `mdbenchmark generate [...] --skip-validation` without providing a supported MD engine. (#74)
34+
- Added new error message when running ``mdbenchmark generate [...] --skip-validation`` without providing a supported MD engine. (#74)
2635

2736

2837
MDBenchmark 1.3.1 (2018-05-17)
@@ -36,7 +45,7 @@ Bugfixes
3645

3746
Misc
3847
----
39-
- Consolidate common functions from `mdengines.gromacs` and `mdengines.namd` into `mdengines.utils`, removing code duplication. (#57)
48+
- Consolidate common functions from ``mdengines.gromacs`` and ``mdengines.namd`` into ``mdengines.utils``, removing code duplication. (#57)
4049
- Refactor unit tests. Make everything more concise and use some more pytest functionality. (#58)
4150

4251

@@ -49,7 +58,7 @@ Features
4958
- Add functionality to perform benchmarks with NAMD. (#29)
5059
- Consolidated internal API to output messages to the console. (#42)
5160
- Module name is now validated against available modules on host. Can be
52-
skipped with `--skip-validation`. (#49)
61+
skipped with ``--skip-validation``. (#49)
5362

5463

5564
Bugfixes

mdbenchmark/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535

3636
from . import analyze, generate, submit
3737

38-
__version__ = '1.3.2'
38+
__version__ = '1.3.3'

mdbenchmark/analyze.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,14 @@ def analyze(directory, plot, ncores, output_name):
187187
# We only support plotting of benchmark systems from equal hosts /
188188
# with equal settings
189189
uniqueness = df.apply(lambda x: x.nunique())
190-
if uniqueness['gromacs'] > 1 or uniqueness['host'] > 1:
190+
191+
# Backwards compatibility to older versions.
192+
if 'module' in uniqueness:
193+
module_column = uniqueness['module']
194+
else:
195+
module_column = uniqueness['gromacs']
196+
197+
if module_column > 1 or uniqueness['host'] > 1:
191198
console.error(
192199
'Cannot plot benchmarks for more than one GROMACS module '
193200
'and/or host.')

0 commit comments

Comments
 (0)