Skip to content

Commit

Permalink
Fix: typo in data_utils (#56)
Browse files Browse the repository at this point in the history
A typo in `generate_preprocess_data` was spotted, due to a wrong given type.
  • Loading branch information
bastonero committed May 24, 2023
1 parent 26f4e19 commit d2c32cf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/aiida_phonopy/calculations/functions/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def generate_preprocess_data(
supercell_matrix: orm.List | None = None,
primitive_matrix: orm.List | None = None,
symprec: orm.Float | None = None,
is_symmetry: orm.Float | None = None,
is_symmetry: orm.Bool | None = None,
distinguish_kinds: orm.Bool | None = None,
):
"""Return a complete stored PreProcessData node.
Expand Down
19 changes: 19 additions & 0 deletions tests/calculations/functions/test_data_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
"""Tests for :mod:`calculations.functions.data_utils`."""
from aiida import orm


def test_generate_preprocess_data(generate_structure):
"""Test the `generate_preprocess_data` calcfunction."""
from aiida_phonopy.calculations.functions.data_utils import generate_preprocess_data

inputs = {
'structure': generate_structure(),
'displacement_generator': orm.Dict({'distance': 0.001}),
'symprec': orm.Float(1e-4),
'is_symmetry': orm.Bool(False),
'distinguish_kinds': orm.Bool(True),
'supercell_matrix': orm.List([[1, 0, 0], [0, 1, 0], [0, 0, 1]]),
'primitive_matrix': orm.List([[1, 0, 0], [0, 1, 0], [0, 0, 1]]),
}
generate_preprocess_data(**inputs)

0 comments on commit d2c32cf

Please sign in to comment.