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

pre-commit autoupdate #286

Merged
merged 5 commits into from
Dec 3, 2024
Merged
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
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
Loading