Skip to content

Commit

Permalink
Top ape found some more nits
Browse files Browse the repository at this point in the history
  • Loading branch information
sphuber committed Apr 9, 2021
1 parent 24eb652 commit f679726
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions aiida_pseudo/groups/mixins/cutoffs.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def get_recommended_cutoffs(self, *, elements=None, structure=None, stringency=N
:param elements: single or tuple of elements.
:param structure: a ``StructureData`` node.
:param stringency: optional stringency if different from the default.
:param unit: string definition of a unit of energy as recognized by the ``UnitRegistry`` of the ``pint`` lib.
:return: tuple of recommended wavefunction and density cutoff.
:raises ValueError: if the requested stringency is not defined for this family.
:raises ValueError: if optional unit specified is invalid.
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _get_pseudo_potential_data(element='Ar', entry_point=None) -> PseudoPotentia

@pytest.fixture
def get_pseudo_family(tmpdir, filepath_pseudos):
"""Return a factory for a `PseudoPotentialFamily` instance."""
"""Return a factory for a ``PseudoPotentialFamily`` instance."""

def _get_pseudo_family(
label='family',
Expand Down
10 changes: 5 additions & 5 deletions tests/groups/mixins/test_cutoffs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_get_cutoffs_private(get_pseudo_family, get_cutoffs):

@pytest.mark.usefixtures('clear_db')
def test_validate_cutoffs_unit():
"""Test the `CutoffsFamily.validate_cutoffs_unit` method."""
"""Test the ``CutoffsFamily.validate_cutoffs_unit`` method."""
with pytest.raises(TypeError):
CutoffsFamily.validate_cutoffs_unit(10)

Expand Down Expand Up @@ -97,7 +97,7 @@ def test_get_cutoff_stringencies(get_pseudo_family, get_cutoffs):

@pytest.mark.usefixtures('clear_db')
def test_set_cutoffs(get_pseudo_family):
"""Test the `CutoffsFamily.set_cutoffs` method."""
"""Test the ``CutoffsFamily.set_cutoffs`` method."""
elements = ['Ar', 'He']
family = get_pseudo_family(label='SSSP/1.0/PBE/efficiency', cls=CutoffsFamily, elements=elements)
cutoffs = {'default': {element: {'cutoff_wfc': 1.0, 'cutoff_rho': 2.0} for element in elements}}
Expand Down Expand Up @@ -164,7 +164,7 @@ def test_set_cutoffs_auto_default(get_pseudo_family):

@pytest.mark.usefixtures('clear_db')
def test_get_cutoffs(get_pseudo_family):
"""Test the `CutoffsFamily.get_cutoffs` method."""
"""Test the ``CutoffsFamily.get_cutoffs`` method."""
elements = ['Ar', 'He']
family = get_pseudo_family(label='SSSP/1.0/PBE/efficiency', cls=CutoffsFamily, elements=elements)
cutoffs = {'default': {element: {'cutoff_wfc': 1.0, 'cutoff_rho': 2.0} for element in elements}}
Expand All @@ -182,7 +182,7 @@ def test_get_cutoffs(get_pseudo_family):

@pytest.mark.usefixtures('clear_db')
def test_get_recommended_cutoffs(get_pseudo_family, generate_structure):
"""Test the `CutoffsFamily.get_recommended_cutoffs` method."""
"""Test the ``CutoffsFamily.get_recommended_cutoffs`` method."""
elements = ['Ar', 'He']
cutoffs = {
'default': {
Expand Down Expand Up @@ -270,7 +270,7 @@ def test_get_recommended_cutoffs_unit(get_pseudo_family):

@pytest.mark.usefixtures('clear_db')
def test_get_cutoffs_unit(get_pseudo_family, get_cutoffs):
"""Test the `CutoffsFamily.get_cutoffs_unit` method."""
"""Test the ``CutoffsFamily.get_cutoffs_unit`` method."""
family = get_pseudo_family(cls=CutoffsFamily)
assert family.get_cutoffs_unit() == 'eV'

Expand Down

0 comments on commit f679726

Please sign in to comment.