Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatteo committed Jul 21, 2024
1 parent c11c3aa commit aeefa50
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@ jobs:
defaults:
run:
shell: bash -l {0} # enables conda/mamba env activation by reading bash profile

strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-latest
python: '3.11'
#python: '>3.9'
#extras: ci, optional

# pytest-split automatically distributes work load so parallel jobs finish in similar time
# update durations file with `pytest --store-durations --durations-path tests/files/.pytest-split-durations`
#split: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

runs-on: ${{ matrix.config.os }}

Expand Down Expand Up @@ -63,4 +59,4 @@ jobs:
conda activate abipy
#abicheck.py --with-flow
pip install -r requirements-tests.txt
cd abipy && pytest -v # --splits 10 --group ${{ matrix.split }} # --durations-path tests/files/.pytest-split-durations tests
cd abipy && pytest -v
7 changes: 4 additions & 3 deletions abipy/flowtk/abiphonopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ def on_all_ok(self):
structure.to(filename=self.outdir.path_in("POSCAR"))

# Write yaml file with displacements.
supercell = phonon.get_supercell()
displacements = phonon.get_displacements()
#directions = phonon.get_displacement_directions()
#supercell = phonon.get_supercell()
supercell = phonon.supercell
#displacements = phonon.get_displacements()
displacements = phonon.displacements
file_IO.write_disp_yaml(displacements, supercell, # directions=directions,
filename=self.outdir.path_in('disp.yaml'))

Expand Down
4 changes: 2 additions & 2 deletions abipy/lumi/lineshape.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ def L_hw(self, T=0, lamb=5, w=1, model='multi-D'):
"""

E_x, A = self.A_hw(T, lamb, w, model)
C = 1 / (simps(A * E_x ** 3, E_x))
C = 1 / (simps(A * E_x ** 3, x=E_x))
I = C * A * E_x ** 3 # intensity prop to energy CUBE
return (E_x, I)
return E_x, I

##### Plot functions ######

Expand Down

0 comments on commit aeefa50

Please sign in to comment.