Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update pre-commit hooks #42

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -25,7 +25,7 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.8.6
hooks:
# Run the linter.
- id: ruff
Expand Down
12 changes: 6 additions & 6 deletions tests/test_atomdiag.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def do_assert(
assert pytest.approx(S2_expected, abs=abs) == S2


@pytest.fixture()
@pytest.fixture
def one_band():
U = 1
mu = U / 2.0 # half-filling
Expand All @@ -59,7 +59,7 @@ def one_band():
return spin_names, n_orb, Lambda_c, D, h0_loc_mat, h_int


@pytest.fixture()
@pytest.fixture
def one_band_expected():
rho_f_expected = np.array([[0.5]])
rho_cf_expected = np.array([[0.4681588161332029]])
Expand All @@ -77,7 +77,7 @@ def one_band_expected():
)


@pytest.fixture()
@pytest.fixture
def bilayer():
U = 1
V = 0.25
Expand All @@ -100,7 +100,7 @@ def bilayer():
return spin_names, n_orb, Lambda_c, D, h0_loc_mat, h_int


@pytest.fixture()
@pytest.fixture
def bilayer_expected():
rho_f_expected = np.array([[0.5, -0.1999913941210893], [-0.1999913941210893, 0.5]])
rho_cf_expected = np.array([[0.42326519677453511, 0], [0, 0.42326519677453511]])
Expand All @@ -118,7 +118,7 @@ def bilayer_expected():
)


@pytest.fixture()
@pytest.fixture
def dh_trimer():
# At two-thirds filling
U = 1
Expand Down Expand Up @@ -165,7 +165,7 @@ def hubb_N(tk, U, n_orb, spin_names): # noqa: ARG001
return spin_names, n_orb, Lambda_c, D, h0_loc_mat, h_int


@pytest.fixture()
@pytest.fixture
def dh_trimer_expected():
rho_f_expected = np.array(
[
Expand Down
6 changes: 3 additions & 3 deletions tests/test_latticesolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def do_assert(subtests, mu, Lambda, Z, mu_expected, Lambda_expected, Z_expected)
assert Z[i][bl] == pytest.approx(Z_expected, abs=abs)


@pytest.fixture()
@pytest.fixture
def one_band():
n_orb = 1
spatial_dim = 3
Expand All @@ -50,7 +50,7 @@ def one_band():
return gf_struct, h0_k, embedding, kweight, mu, Lambda_expected, Z_expected


@pytest.fixture()
@pytest.fixture
def bilayer():
U = 4
V = 0.25
Expand All @@ -77,7 +77,7 @@ def bilayer():
return gf_struct, h0_k, embedding, kweight, mu, Lambda_expected, Z_expected


@pytest.fixture()
@pytest.fixture
def kanamori():
coeff = 0.2
U = 3
Expand Down