Skip to content

Commit 24d579c

Browse files
authored
pin foyer and ffutils version (#694)
* pin foyer and ffutils version * Add some tests and fix precommit error
1 parent 1e5a606 commit 24d579c

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

environment-dev.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@ dependencies:
1111
- pydantic>1.8
1212
- networkx
1313
- pytest
14-
- mbuild >= 0.11.0
15-
- openbabel >= 3.0.0
16-
- foyer >= 0.11.1
17-
- gsd >= 2.0
18-
- parmed >= 3.4.3
14+
- mbuild>=0.11.0
15+
- openbabel>=3.0.0
16+
- foyer>=0.11.3
17+
- forcefield-utilities>=0.2.1
18+
- gsd>=2.0
19+
- parmed>=3.4.3
1920
- pytest-cov
2021
- codecov
2122
- bump2version
2223
- matplotlib
2324
- ipywidgets
24-
- ele >= 0.2.0
25+
- ele>=0.2.0
2526
- pre-commit
26-
- pip:
27-
- "--editable=git+https://github.com/mosdef-hub/forcefield-utilities.git#egg=forcefield-utilities"

environment.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ dependencies:
1010
- lxml
1111
- pydantic>1.8
1212
- networkx
13-
- ele >= 0.2.0
14-
- forcefield-utilities
13+
- ele>=0.2.0
14+
- foyer>=0.11.3
15+
- forcefield-utilities>=0.2.1

gmso/tests/test_forcefield.py

+13
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from gmso.exceptions import (
1111
ForceFieldError,
1212
ForceFieldParseError,
13+
GMSOError,
1314
MissingAtomTypesError,
1415
MissingPotentialError,
1516
)
@@ -658,3 +659,15 @@ def test_valid_sequence(self):
658659
def test_deprecated_gmso(self):
659660
with pytest.warns(DeprecationWarning):
660661
ForceField(get_path("ff-example0.xml"), backend="gmso")
662+
663+
def test_not_supoprted_backend(self, opls_ethane_foyer):
664+
# Unsupported ff parser backend
665+
with pytest.raises(GMSOError):
666+
ForceField(get_path("ff-example0.xml"), backend="bogus")
667+
668+
# Unsupported ff writer backend
669+
with pytest.raises(NotImplementedError):
670+
opls_ethane_foyer.to_xml("test_xml_writer.xml", backend="ffutils")
671+
672+
with pytest.raises(GMSOError):
673+
opls_ethane_foyer.to_xml("test_xml_writer.xml", backend="bogus")

gmso/utils/decorators.py

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def __call__(self, cls):
1919

2020

2121
def deprecate_kwargs(deprecated_kwargs=None):
22+
"""Decorate functions with deprecated/deprecating kwargs."""
2223
if deprecated_kwargs is None:
2324
deprecated_kwargs = set()
2425

0 commit comments

Comments
 (0)