-
Notifications
You must be signed in to change notification settings - Fork 10
Dihedral Plots: RDKit Mol Object #243
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
Changes from all commits
b4aeb11
cc17a6b
30ad175
8d67d81
59f32a5
9a7c25a
b6f66c2
2f8c042
844b29f
5fa5f11
82cbaa2
d26d9f1
d80ae4c
a8f5b5e
2522b5c
d54cd86
193dc84
dbabc62
9ba26ee
fda3206
e5a440e
c71d3d8
19973ea
cc673fe
348495d
4ad68bb
9609022
42847f8
60ec522
5279161
181c012
a69f4da
4df1d88
c53cd1a
8135b51
5d8f960
bf1b05d
97267ac
a25c97d
9175fda
45cf29d
71da645
2c21a7c
83c4c63
60636b4
473abaf
6660c98
554bdd3
9de6a4d
d620619
bd02eb7
ba05311
f435207
3a85dde
7f32b93
87f3930
34c63ec
bf98c23
a3bcddc
c0f9550
c47e055
5376eea
110b3f9
f5ead51
a744033
228b7c0
7c9f669
b8236a6
f45f073
adcecc6
bf6884a
e002845
9f751a8
13231a2
0db3c5a
c540c8b
eca078a
34f3e18
2b5d7af
b6d4f61
7843fce
0cb2ddc
84aed57
d231b45
9a7d385
2970b24
9801848
4ebf3c0
292a8bd
4af6de6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,9 @@ dependencies: | |
| - pymbar >=4 | ||
| - rdkit | ||
| - seaborn | ||
| - svgutils | ||
| - cairosvg | ||
| - pypdf | ||
|
|
||
| # Testing | ||
| - pytest | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,6 @@ mdanalysis | |
| rdkit | ||
| seaborn | ||
| matplotlib | ||
| svgutils | ||
| cairosvg | ||
| pypdf | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,19 +2,16 @@ | |
| import os | ||
| import sys | ||
| import yaml | ||
| import pybol | ||
| import pytest | ||
| import pathlib | ||
| import logging | ||
|
|
||
| import pybol | ||
| import pytest | ||
| import pandas as pd | ||
|
|
||
| from mdpow.workflows import base | ||
|
|
||
| from pkg_resources import resource_filename | ||
|
|
||
| from . import RESOURCES, MANIFEST, STATES | ||
|
|
||
| from pkg_resources import resource_filename | ||
| from mdpow.workflows import base | ||
|
|
||
| @pytest.fixture(scope='function') | ||
| def molname_workflows_directory(tmp_path): | ||
|
|
@@ -62,17 +59,23 @@ def test_project_paths_csv_input(self, csv_input_data): | |
|
|
||
| pd.testing.assert_frame_equal(project_paths, csv_df) | ||
|
|
||
| def test_automated_project_analysis(self, project_paths_data, caplog): | ||
| def test_dihedral_analysis_figdir_requirement(self, project_paths_data, caplog): | ||
| caplog.clear() | ||
| caplog.set_level(logging.ERROR, logger='mdpow.workflows.base') | ||
|
|
||
| project_paths = project_paths_data | ||
| # change resname to match topology (every SAMPL7 resname is 'UNK') | ||
| # only necessary for this dataset, not necessary for normal use | ||
| project_paths['resname'] = 'UNK' | ||
|
|
||
| base.automated_project_analysis(project_paths, solvents=('water',), | ||
| ensemble_analysis='DihedralAnalysis') | ||
| with pytest.raises(AssertionError, | ||
| match="figdir MUST be set, even though it is a kwarg. Will be changed with #244"): | ||
|
|
||
| base.automated_project_analysis(project_paths, solvents=('water',), | ||
| ensemble_analysis='DihedralAnalysis') | ||
|
|
||
| assert 'all analyses completed' in caplog.text, ('automated_dihedral_analysis ' | ||
| 'did not iteratively run to completion for the provided project') | ||
| assert 'all analyses completed' in caplog.text, ('automated_dihedral_analysis ' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unindent — that's better outside the pytest.raises block. As a general rule reduce the amount of code in a with block to the essentials as this makes clearer what's relevant for testing the condition.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the test fails without the indent, possibly because of what is being tested or how it is written in the module. I am not certain of this, but making the change last night resulted in a passing test. |
||
| 'did not iteratively run to completion for the provided project') | ||
|
|
||
| def test_automated_project_analysis_KeyError(self, project_paths_data, caplog): | ||
| caplog.clear() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.