Skip to content

Commit

Permalink
Pre-commit config update
Browse files Browse the repository at this point in the history
  • Loading branch information
tovrstra committed Jun 18, 2024
1 parent 60c7d09 commit afe15b5
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 30 deletions.
12 changes: 5 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -24,15 +24,13 @@ repos:
rev: v1.5.5
hooks:
- id: remove-crlf
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.2.2'
rev: v0.4.9
hooks:
- id: ruff-format
- id: ruff
args: ["--fix", "--show-fixes"]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.0
rev: 0.28.5
hooks:
- id: check-github-workflows
1 change: 0 additions & 1 deletion examples/psi4/runpsi4.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# --
"""Example of the PSI4 interface, by writing out PSI4's quadrature grids."""


import psi4
from denspart.adapters.psi4 import write_density_npz

Expand Down
1 change: 0 additions & 1 deletion src/denspart/adapters/adf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"""


import argparse
import contextlib
import os
Expand Down
15 changes: 4 additions & 11 deletions src/denspart/adapters/gpaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# --
"""Prepare inputs for denspart from a GPAW calculation."""


import argparse

import numpy as np
Expand Down Expand Up @@ -355,21 +354,15 @@ def compute_augmentation_spheres(uniform_data, setups, atoms, atnums, atcoords):
vcor = atgrid_short.integrate(atom_data["density_v_cor"])
myqcors[iatom] += vcor
print(
" {:2d} {:4d} {:12.7f} {:12.7f} {:12.5e}".format(
atnums[iatom],
iatom,
myqcors[iatom],
qcors[iatom],
myqcors[iatom] - qcors[iatom],
)
f" {atnums[iatom]:2d} {iatom:4d} {myqcors[iatom]:12.7f}"
f" {qcors[iatom]:12.7f} {myqcors[iatom] - qcors[iatom]:12.5e}"
)

if sqcors is not None:
mysqcors[iatom] = atgrid_short.integrate(atom_data["spindensity_v_cor"])
print(
"spin {:12.7f} {:12.7f} {:12.5e}".format(
mysqcors[iatom], sqcors[iatom], mysqcors[iatom] - sqcors[iatom]
)
f"spin {mysqcors[iatom]:12.7f} {sqcors[iatom]:12.7f}"
f" {mysqcors[iatom] - sqcors[iatom]:12.5e}"
)

print(" ~~~~~~~ ~~~~~~~~~~~~~ ~~~~~~~~~~~~~ ~~~~~~~~~~~~~")
Expand Down
1 change: 0 additions & 1 deletion src/denspart/adapters/horton3.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"""


import argparse

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion src/denspart/adapters/psi4.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# --
"""Write an density.npz file in a Psi4 job."""


import numpy as np
import psi4

Expand Down
1 change: 0 additions & 1 deletion src/denspart/adapters/test/test_gpaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# --
"""Test the input preparation with GAPW."""


import os
import shutil
from importlib import resources
Expand Down
1 change: 0 additions & 1 deletion src/denspart/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# --
"""Computation cache with selective discard of obsolete intermediates."""


from collections.abc import Callable

__all__ = ("ComputeCache",)
Expand Down
1 change: 0 additions & 1 deletion src/denspart/mbis.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# pylint: disable=too-many-lines
"""Minimal Basis Iterative Stockholder."""


from itertools import combinations

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion src/denspart/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# --
"""Compute atom-in-molecules properties."""


import numpy as np

from .cache import compute_cached
Expand Down
1 change: 0 additions & 1 deletion src/denspart/utils/write_extxyz.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# --
"""Write denspart results into a nice extended XYZ."""


import argparse

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion src/denspart/vh.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
This code is very preliminary, so no serious docstrings yet.
"""


import time
import typing
from functools import partial
Expand Down
1 change: 0 additions & 1 deletion tests/test_mbis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# --
"""Unit tests for the module denspart.mbis."""


from pathlib import Path

import numpy as np
Expand Down
1 change: 0 additions & 1 deletion tests/test_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# --
"""Unit tests for properties module."""


import numpy as np
import pytest
from denspart.properties import spherical_harmonics
Expand Down

0 comments on commit afe15b5

Please sign in to comment.