Skip to content

Commit

Permalink
Update test_real_self_energy.py and test_spectral_function.py
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Dec 25, 2023
1 parent 27f7d15 commit 37eb8bb
Show file tree
Hide file tree
Showing 5 changed files with 1,288 additions and 711 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/phono3py-pytest-conda-mkl-v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Pytest with mkl and --v2 option

on:
pull_request:
branches: [ develop ]
push:
branches-ignore:
- publish-gh-pages
- master
- rc

jobs:
build-linux:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v3
# Use conda-incubator/setup-miniconda for precise control of conda infrastructure
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
- name: Install dependent packages
run: |
conda activate test
conda install --yes python=${{ matrix.python-version }}
#conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
- name: Install phonopy develop branch
run: |
conda activate test
git clone --depth 1 https://github.com/phonopy/phonopy.git
cd phonopy
pip install -e . -vvv
cd ..
- name: Install phono3py
run: |
conda activate test
pip install -e . -vvv
- name: Run pytest
run: |
pytest --v2 -v --cov=./ --cov-report=xml test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
verbose: true
2 changes: 1 addition & 1 deletion test/phonon3/test_imag_self_energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,7 @@ def test_imag_self_energy_nacl_nac_npoints(nacl_pbe: Phono3py):
[nacl_pbe.grid.gp_Gamma], [300], num_frequency_points=10
)

print(",".join([f"{val:.8f}" for val in gammas.ravel()]))
# print(",".join([f"{val:.8f}" for val in gammas.ravel()]))

np.testing.assert_allclose(
ref_freq_points_nacl_nac, fpoints.ravel(), rtol=0, atol=1e-5
Expand Down
Loading

0 comments on commit 37eb8bb

Please sign in to comment.