Skip to content

Commit ff9f938

Browse files
authored
Fix docs (#1109)
* pre-commit autoupdate && pre-commit run --all-files bump ruff to v0.9.3, mypy to v1.14.1, and codespell to v2.4.0 plus auto-fixes * fix .github/workflows/docs.yml by bumping actions/upload-pages-artifact@v2 to v3, actions/deploy-pages@v2 to v4 prior actions/upload-pages-artifact versions started failing, see https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions and https://github.com/actions/upload-pages-artifact/releases/tag/v3.0.0
1 parent 233c2a9 commit ff9f938

File tree

27 files changed

+88
-96
lines changed

27 files changed

+88
-96
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: sphinx-build docs docs_build
4040

4141
- name: Upload build artifact
42-
uses: actions/upload-pages-artifact@v2
42+
uses: actions/upload-pages-artifact@v3
4343
with:
4444
path: ./docs_build
4545

@@ -52,4 +52,4 @@ jobs:
5252
steps:
5353
- name: Deploy to GitHub Pages
5454
id: deployment
55-
uses: actions/deploy-pages@v2
55+
uses: actions/deploy-pages@v4

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ default_language_version:
33
exclude: ^(.github/|tests/test_data/abinit/)
44
repos:
55
- repo: https://github.com/charliermarsh/ruff-pre-commit
6-
rev: v0.8.0
6+
rev: v0.9.3
77
hooks:
88
- id: ruff
99
args: [--fix]
@@ -30,15 +30,15 @@ repos:
3030
- id: rst-directive-colons
3131
- id: rst-inline-touching-normal
3232
- repo: https://github.com/pre-commit/mirrors-mypy
33-
rev: v1.13.0
33+
rev: v1.14.1
3434
hooks:
3535
- id: mypy
3636
files: ^src/
3737
additional_dependencies:
3838
- tokenize-rt==4.1.0
3939
- types-paramiko
4040
- repo: https://github.com/codespell-project/codespell
41-
rev: v2.3.0
41+
rev: v2.4.0
4242
hooks:
4343
- id: codespell
4444
stages: [pre-commit, commit-msg]

src/atomate2/abinit/jobs/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ def setup_job(
5454

5555
if structure is None and prev_outputs is None and restart_from is None:
5656
raise RuntimeError(
57-
"At least one of structure, prev_outputs or "
58-
"restart_from should be defined."
57+
"At least one of structure, prev_outputs or restart_from should be defined."
5958
)
6059

6160
if history is None:

src/atomate2/aims/flows/phonons.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class PhononMaker(BasePhononMaker):
7777
High-throughput electronic band structure calculations:
7878
Challenges and tools. Computational Materials Science,
7979
49(2), 299-312. doi:10.1016/j.commatsci.2010.05.010.
80-
We will however use seekpath and primitive structures
81-
as determined by from phonopy to compute the phonon band structure
80+
We will, however, use seekpath and primitive structures
81+
as determined by phonopy to compute the phonon band structure
8282
bulk_relax_maker : .BaseAimsMaker or None
8383
A maker to perform a tight relaxation on the bulk.
8484
Set to ``None`` to skip the
@@ -106,7 +106,7 @@ class PhononMaker(BasePhononMaker):
106106
it relies on phonopy to handle the relationship
107107
to the primitive cell and not pymatgen
108108
code: str
109-
determines the dft or forcefield code.
109+
determines the DFT or forcefield code.
110110
store_force_constants: bool
111111
if True, force constants will be stored
112112
socket: bool

src/atomate2/ase/schemas.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ class AseResult(BaseModel):
5151
is_force_converged: Optional[bool] = Field(
5252
None,
5353
description=(
54-
"Whether the calculation is converged with respect "
55-
"to interatomic forces."
54+
"Whether the calculation is converged with respect to interatomic forces."
5655
),
5756
)
5857

@@ -220,8 +219,7 @@ class AseStructureTaskDoc(StructureMetadata):
220219
is_force_converged: Optional[bool] = Field(
221220
None,
222221
description=(
223-
"Whether the calculation is converged with respect "
224-
"to interatomic forces."
222+
"Whether the calculation is converged with respect to interatomic forces."
225223
),
226224
)
227225

@@ -285,8 +283,7 @@ class AseMoleculeTaskDoc(MoleculeMetadata):
285283
is_force_converged: Optional[bool] = Field(
286284
None,
287285
description=(
288-
"Whether the calculation is converged with respect "
289-
"to interatomic forces."
286+
"Whether the calculation is converged with respect to interatomic forces."
290287
),
291288
)
292289

@@ -329,8 +326,7 @@ class AseTaskDoc(AseBaseModel):
329326
is_force_converged: Optional[bool] = Field(
330327
None,
331328
description=(
332-
"Whether the calculation is converged with respect "
333-
"to interatomic forces."
329+
"Whether the calculation is converged with respect to interatomic forces."
334330
),
335331
)
336332

src/atomate2/cli/dev.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,9 @@ def test_run_{test_name}(self, mock_abinit, abinit_test_dir, clean_dir):
561561
from atomate2.abinit.schemas.core import AbinitTaskDocument
562562
563563
# load the initial structure, the maker and the ref_paths from the test_dir
564-
test_dir = abinit_test_dir / {" / ".join(
565-
[f'"{part}"' for part in test_dir.parts[index_part:]]
566-
)}
564+
test_dir = abinit_test_dir / {
565+
" / ".join([f'"{part}"' for part in test_dir.parts[index_part:]])
566+
}
567567
structure = Structure.from_file(test_dir / "initial_structure.json.gz")
568568
maker_info = loadfn(test_dir / "maker.json.gz")
569569
maker = maker_info["maker"]

src/atomate2/common/flows/anharmonicity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def make(
9595
It has to be given per formula unit (as a result in corresponding Doc).
9696
Instead of recomputing the energy of the bulk structure every time, this
9797
value can also be provided in eV. If it is provided, the static run will be
98-
skipped. This energy is the typical output dft energy of the dft workflow.
98+
skipped. This energy is the typical output DFT energy of the DFT workflow.
9999
No conversion needed. It is set to 0 by default.
100100
supercell_matrix: Optional[Matrix3D]
101101
Instead of min_length, also a supercell_matrix can be given, e.g.

src/atomate2/common/flows/gruneisen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class BaseGruneisenMaker(Maker, ABC):
5252
bulk_relax_maker: .ForceFieldRelaxMaker, .BaseAimsMaker, .BaseVaspMaker, or None
5353
A maker to perform an initial tight relaxation on the bulk.
5454
code: str
55-
determines the dft or force field code.
55+
determines the DFT or force field code.
5656
const_vol_relax_maker: .ForceFieldRelaxMaker, .BaseAimsMaker,
5757
.BaseVaspMaker, or None. A maker to perform a tight relaxation
5858
on the expanded and shrunk structures at constant volume.

src/atomate2/common/flows/mpmorph.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,8 @@ def make(
165165
structure=deformed_structures[index].final_structure,
166166
prev_dir=None,
167167
)
168-
md_job.name = (
169-
f"{self.name} {md_job.name} {len(working_outputs['relax']['volume'])+1}"
170-
)
168+
relaxed_vol = len(working_outputs["relax"]["volume"])
169+
md_job.name = f"{self.name} {md_job.name} {relaxed_vol + 1}"
171170

172171
working_outputs["relax"]["energies"].append(md_job.output.output.energy)
173172
working_outputs["relax"]["volume"].append(md_job.output.structure.volume)

src/atomate2/common/flows/phonons.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ class BasePhononMaker(Maker, ABC):
9393
High-throughput electronic band structure calculations:
9494
Challenges and tools. Computational Materials Science,
9595
49(2), 299-312. doi:10.1016/j.commatsci.2010.05.010.
96-
We will however use seekpath and primitive structures
97-
as determined by from phonopy to compute the phonon band structure
96+
We will, however, use seekpath and primitive structures
97+
as determined by phonopy to compute the phonon band structure
9898
bulk_relax_maker: .ForceFieldRelaxMaker, .BaseAimsMaker, .BaseVaspMaker, or None
9999
A maker to perform a tight relaxation on the bulk.
100100
Set to ``None`` to skip the
@@ -128,7 +128,7 @@ class BasePhononMaker(Maker, ABC):
128128
it relies on phonopy to handle the relationship
129129
to the primitive cell and not pymatgen
130130
code: str
131-
determines the dft or force field code.
131+
determines the DFT or force field code.
132132
store_force_constants: bool
133133
if True, force constants will be stored
134134
socket: bool
@@ -200,7 +200,7 @@ def make(
200200
It has to be given per formula unit (as a result in corresponding Doc).
201201
Instead of recomputing the energy of the bulk structure every time, this
202202
value can also be provided in eV. If it is provided, the static run will be
203-
skipped. This energy is the typical output dft energy of the dft workflow.
203+
skipped. This energy is the typical output dft energy of the DFT workflow.
204204
No conversion needed.
205205
supercell_matrix: list
206206
Instead of min_length, also a supercell_matrix can be given, e.g.

0 commit comments

Comments
 (0)