Skip to content

Commit

Permalink
pre-commit autoupdate (autoatml#286)
Browse files Browse the repository at this point in the history
* pre-commit autoupdate

updates:
- https://github.com/charliermarsh/ruff-pre-commithttps://github.com/astral-sh/ruff-pre-commit
- [github.com/astral-sh/ruff-pre-commit: v0.6.9 → v0.8.1](astral-sh/ruff-pre-commit@v0.6.9...v0.8.1)
- [github.com/asottile/blacken-docs: 1.19.0 → 1.19.1](adamchainz/blacken-docs@1.19.0...1.19.1)
- [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.13.0](pre-commit/mirrors-mypy@v1.11.2...v1.13.0)

* pre-commit auto-fixes

* fix pre-commit lint complaint

* pre-commit auto-fixes

* fix pre-commit lint complaint

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christina Ertural <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and QuantumChemist authored Dec 3, 2024
1 parent c4d8cab commit d87b398
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 23 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ci:
default_language_version:
python: python3
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.6.9
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
hooks:
- id: ruff
args: [--fix]
Expand All @@ -26,7 +26,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: 1.19.0
rev: 1.19.1
hooks:
- id: blacken-docs
additional_dependencies: [black]
Expand All @@ -39,7 +39,7 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.13.0
hooks:
- id: mypy
files: ^autoplex/.*\.py$
Expand Down
2 changes: 1 addition & 1 deletion src/autoplex/auto/rss/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from autoplex.data.rss.jobs import do_rss_multi_node
from autoplex.fitting.common.flows import MLIPFitMaker

__all__ = ["initial_rss", "do_rss_iterations"]
__all__ = ["do_rss_iterations", "initial_rss"]

logging.basicConfig(
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
Expand Down
15 changes: 3 additions & 12 deletions src/autoplex/benchmark/phonons/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,9 @@ def write_benchmark_metrics(
encoding="utf-8",
) as file:
file.write(
"%-11s%-11s%-12s%-18s%-12s%-16s%-16s%-16s%-18s"
% (
"Potential",
"Structure",
"MPID",
"Displacement (Å)",
"RMSE (THz)",
"imagmodes(pot)",
"imagmodes(dft)",
"Database type",
"(Hyper-)Parameters",
)
f"{'Potential':<11}{'Structure':<11}{'MPID':<12}{'Displacement (Å)':<18}"
f"{'RMSE (THz)':<12}{'imagmodes(pot)':<16}{'imagmodes(dft)':<16}"
f"{'Database type':<16}{'(Hyper-)Parameters':<18}"
)

for metric in metrics_flattened:
Expand Down
2 changes: 1 addition & 1 deletion src/autoplex/data/common/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
flatten,
)

__all__ = ["GenerateTrainingDataForTesting", "DFTStaticLabelling"]
__all__ = ["DFTStaticLabelling", "GenerateTrainingDataForTesting"]

logging.basicConfig(level=logging.DEBUG, format="[%(levelname)s] %(message)s")

Expand Down
2 changes: 1 addition & 1 deletion src/autoplex/data/phonons/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@

__all__ = [
"DFTPhononMaker",
"MLPhononMaker",
"IsoAtomMaker",
"IsoAtomStaticMaker",
"MLPhononMaker",
"RandomStructuresDataGenerator",
"TightDFTStaticMaker",
]
Expand Down
6 changes: 3 additions & 3 deletions src/autoplex/data/rss/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,10 @@ def index_shuffle(self, atoms, ind):
def __repr__(self):
"""Return a representation of the constraint."""
if self._type == "two atoms":
return "Hookean(%d, %d)" % tuple(self.indices)
return f"Hookean({self.indices[0]}, {self.indices[1]})"
if self._type == "point":
return "Hookean(%d) to cartesian" % self.index
return "Hookean(%d) to plane" % self.index
return f"Hookean({self.index}) to cartesian"
return f"Hookean({self.index}) to plane"


def process_rss(
Expand Down
2 changes: 1 addition & 1 deletion src/autoplex/fitting/common/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
)

__all__ = [
"MLIPFitMaker",
"DataPreprocessing",
"MLIPFitMaker",
]


Expand Down

0 comments on commit d87b398

Please sign in to comment.