From da30b4dd4f535b879a03a366cbac60345c71ea67 Mon Sep 17 00:00:00 2001 From: "Adam J. Jackson" Date: Tue, 16 Jul 2024 12:58:22 +0100 Subject: [PATCH] Maintenance: Brille and Spglib updates (#304) * Restore testing to macos-latest * Check that Brille updates have resolved the compatibility issue with macos-latest * Suppress spglib deprecation warning from SeeK-path * Update changelog, remaining github workflows to mac-latest --- .github/workflows/build_upload_pypi_wheels.yml | 2 +- .github/workflows/run_tests.yml | 2 +- .github/workflows/test_release.yml | 2 +- CHANGELOG.rst | 6 +----- euphonic/util.py | 8 +++++++- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_upload_pypi_wheels.yml b/.github/workflows/build_upload_pypi_wheels.yml index 9e25b1de3..c981b6ff7 100644 --- a/.github/workflows/build_upload_pypi_wheels.yml +++ b/.github/workflows/build_upload_pypi_wheels.yml @@ -14,7 +14,7 @@ jobs: include: - os: windows-latest wheelname: win - - os: macos-12 + - os: macos-latest wheelname: macos - os: ubuntu-latest wheelname: manylinux diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 6cae22247..5a88312d4 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -17,7 +17,7 @@ jobs: (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no_ci')) strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-12] + os: [ubuntu-latest, windows-latest, macos-latest] fail-fast: false runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/test_release.yml b/.github/workflows/test_release.yml index 887e7837e..8022a728f 100644 --- a/.github/workflows/test_release.yml +++ b/.github/workflows/test_release.yml @@ -10,7 +10,7 @@ jobs: test: strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-12] + os: [ubuntu-latest, windows-latest, macos-latest] fail-fast: false runs-on: ${{ matrix.os }} steps: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3501bbae4..7d834cab4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -28,11 +28,7 @@ - Update reference to scipy.integrate.simpson (scipy.integrate.simps is deprecated) - - Mac tests and builds are running against "macos-12" github runner - instead of "macos-latest", in order to test properly against - Brille. This should be restored to "macos-latest" when Brille - build system is updated and gives consistent results with - win/linux. + - Filter out spglib deprecation warnings caused by SeeK-path. ------------------------------------------------------------------------------- diff --git a/euphonic/util.py b/euphonic/util.py index e935aabe5..bdbc93722 100644 --- a/euphonic/util.py +++ b/euphonic/util.py @@ -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$' @@ -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