diff --git a/aiida_pseudo/groups/mixins/cutoffs.py b/aiida_pseudo/groups/mixins/cutoffs.py index 4ffe5af..a9022fb 100644 --- a/aiida_pseudo/groups/mixins/cutoffs.py +++ b/aiida_pseudo/groups/mixins/cutoffs.py @@ -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. diff --git a/tests/conftest.py b/tests/conftest.py index 28e4ca5..afda81f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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', diff --git a/tests/groups/mixins/test_cutoffs.py b/tests/groups/mixins/test_cutoffs.py index 3312d11..e4f69aa 100644 --- a/tests/groups/mixins/test_cutoffs.py +++ b/tests/groups/mixins/test_cutoffs.py @@ -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) @@ -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}} @@ -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}} @@ -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': { @@ -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'