Skip to content

Commit

Permalink
Suppress spglib deprecation warning from SeeK-path
Browse files Browse the repository at this point in the history
  • Loading branch information
ajjackson committed Jul 16, 2024
1 parent b56469f commit 97fdf04
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion euphonic/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def get_qpoint_labels(qpts: np.ndarray,
Tick labels and the q-point indices that they apply to
"""
xlabels, qpts_with_labels = _recip_space_labels(qpts, cell=cell)

for i, label in enumerate(xlabels):
if label == 'GAMMA':
xlabels[i] = r'$\Gamma$'
Expand Down Expand Up @@ -567,7 +568,12 @@ def _recip_space_labels(qpts: np.ndarray,
sym_label_to_coords = _generic_qpt_labels()
else:
try:
sym_label_to_coords = seekpath.get_path(cell)["point_coords"]
with warnings.catch_warnings():
# SeeK-path is raising spglib 2.5.0 deprecation warnings, we
# don't care to see those for now
warnings.simplefilter("ignore", category=DeprecationWarning)
sym_label_to_coords = seekpath.get_path(cell)["point_coords"]

except (SymmetryDetectionError, TypeError) as err:
if isinstance(err, TypeError):
# There is a particular TypeError we expect to see when the
Expand Down

0 comments on commit 97fdf04

Please sign in to comment.