Skip to content

Commit

Permalink
Update pre-commit ruff version
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Aug 19, 2024
1 parent 1001bf9 commit 3bc91c4
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: check-added-large-files

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
rev: v0.6.1
hooks:
- id: ruff
args: [ "--fix", "--show-fixes" ]
Expand Down
3 changes: 2 additions & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

import pathlib

import phelel
import pytest

import phelel
from phelel import Phelel
from phelel.api_phelel import PhelelDataset
from phelel.interface.vasp.file_IO import (
Expand Down
1 change: 1 addition & 0 deletions test/cui/test_phelel_cui.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing import Optional

import pytest

from phelel.cui.phelel_script import main

cwd = pathlib.Path(__file__).parent
Expand Down
5 changes: 3 additions & 2 deletions test/interface/test_phelel_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
from pathlib import Path

import numpy as np
import phelel
import yaml
from phelel.interface.phelel_yaml import PhelelYaml, load_phelel_yaml
from phonopy.structure.cells import isclose

import phelel
from phelel.interface.phelel_yaml import PhelelYaml, load_phelel_yaml

cwd = Path(__file__).parent


Expand Down
1 change: 1 addition & 0 deletions test/interface/vasp/test_derivatives.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path

import numpy as np

from phelel import Phelel
from phelel.interface.phelel_yaml import PhelelYaml
from phelel.interface.vasp.derivatives import (
Expand Down
1 change: 1 addition & 0 deletions test/test_api_phelel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import h5py
import numpy as np

from phelel import Phelel
from phelel.file_IO import read_phelel_params_hdf5
from phelel.utils.data import cmplx2real
Expand Down
1 change: 1 addition & 0 deletions test/utils/test_lattice_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os

import numpy as np

from phelel.utils.lattice_points import get_lattice_points

current_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down
1 change: 1 addition & 0 deletions test/utils/test_spherical_harmonics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pathlib

import numpy as np

from phelel.utils.spherical_harmonics import (
LxLyLzMatrices,
SHRotationMatrices,
Expand Down
1 change: 1 addition & 0 deletions test/utils/test_spinor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pathlib

import numpy as np

from phelel.utils.spinor import PauliMatrices, SpinorRotationMatrices, SxSySzMatrices

cwd = pathlib.Path(__file__).parent
Expand Down
11 changes: 6 additions & 5 deletions test/velph/cli/init/test_cmd_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
import numpy as np
import pytest
import tomli
from phono3py.phonon.grid import BZGrid, get_ir_grid_points
from phonopy.interface.calculator import read_crystal_structure
from phonopy.interface.phonopy_yaml import load_phonopy_yaml
from phonopy.structure.atoms import PhonopyAtoms
from phonopy.structure.cells import get_primitive

from phelel.velph.cli.init.init import (
_collect_init_params,
_determine_cell_choices,
Expand All @@ -30,11 +36,6 @@
get_symmetry_dataset,
)
from phelel.velph.templates import default_template_dict
from phono3py.phonon.grid import BZGrid, get_ir_grid_points
from phonopy.interface.calculator import read_crystal_structure
from phonopy.interface.phonopy_yaml import load_phonopy_yaml
from phonopy.structure.atoms import PhonopyAtoms
from phonopy.structure.cells import get_primitive

cwd = pathlib.Path(__file__).parent

Expand Down
1 change: 1 addition & 0 deletions test/velph/cli/phono3py/init/test_phono3py_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
import pytest
import tomli

from phelel.velph.cli.phono3py.init import run_init


Expand Down
3 changes: 2 additions & 1 deletion test/velph/cli/supercell/differentiate/test_differentiate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import pathlib

import phelel
import pytest

import phelel
from phelel.velph.cli.supercell.differentiate import run_derivatives

cwd = pathlib.Path(__file__).parent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import numpy as np
import tomli

from phelel.velph.cli.supercell.init import run_init

cwd = Path(__file__).parent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import numpy as np
import tomli

from phelel.velph.cli.supercell.init import run_init

cwd = Path(__file__).parent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import numpy as np
import tomli

from phelel.velph.cli.supercell.init import run_init

cwd = Path(__file__).parent
Expand Down
1 change: 1 addition & 0 deletions test/velph/cli/supercell/init/test_supercell_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import numpy as np
import pytest
import tomli

from phelel.velph.cli.supercell.init import run_init

cwd = Path(__file__).parent
Expand Down
1 change: 1 addition & 0 deletions test/velph/cli/test_unitls_kspacing_to_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import numpy as np
import pytest

from phelel.velph.cli.utils import kspacing_to_mesh


Expand Down
5 changes: 3 additions & 2 deletions test/velph/cli/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
from collections.abc import Callable

import numpy as np
from phelel.velph.cli.utils import get_reduced_cell, get_scheduler_dict
from phelel.velph.templates import default_template_dict
from phonopy.interface.phonopy_yaml import read_cell_yaml
from phonopy.structure.atoms import PhonopyAtoms

from phelel.velph.cli.utils import get_reduced_cell, get_scheduler_dict
from phelel.velph.templates import default_template_dict


def test_get_scheduler_dict():
"""Test get_scheduler_dict."""
Expand Down
1 change: 1 addition & 0 deletions test/velph/utils/test_scheduler.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test scheduler writer."""

import pytest

from phelel.velph.utils.scheduler import (
get_sge_scheduler_script,
get_slurm_scheduler_script,
Expand Down
3 changes: 2 additions & 1 deletion test/velph/utils/test_vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
import numpy as np
import pytest
import tomli
from phelel.velph.utils.vasp import CutoffToFFTMesh, VaspIncar, VaspKpoints, VaspPotcar
from phonopy.structure.atoms import PhonopyAtoms

from phelel.velph.utils.vasp import CutoffToFFTMesh, VaspIncar, VaspKpoints, VaspPotcar

cwd = pathlib.Path(__file__).parent


Expand Down

0 comments on commit 3bc91c4

Please sign in to comment.