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.ci] pre-commit autoupdate #240

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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.6.0
hooks:
- id: check-json
- id: check-yaml
Expand All @@ -15,12 +15,12 @@ repos:
exclude: *exclude_pre_commit_hooks

- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
rev: 0.7.1
hooks:
- id: nbstripout

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
rev: v0.6.5
hooks:
- id: ruff-format
exclude: &exclude_ruff >
Expand Down
25 changes: 13 additions & 12 deletions src/aiida_sssp_workflow/workflows/convergence/cohesive_energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def compute_xy(

reference_node = orm.load_node(report.reference.uuid)
output_parameters_r: orm.Dict = reference_node.outputs.output_parameters
y_ref = output_parameters_r['cohesive_energy_per_atom']
y_ref = output_parameters_r["cohesive_energy_per_atom"]

xs = []
ys = []
Expand All @@ -198,24 +198,25 @@ def compute_xy(
if node_point.exit_status != 0:
# TODO: log to a warning file for where the node is not finished_okay
continue

x = node_point.wavefunction_cutoff
xs.append(x)

node = orm.load_node(node_point.uuid)
output_parameters_p: orm.Dict = node.outputs.output_parameters

y = (output_parameters_p['cohesive_energy_per_atom'] - y_ref) / y_ref * 100
y = (output_parameters_p["cohesive_energy_per_atom"] - y_ref) / y_ref * 100
ys.append(y)
ys_cohesive_energy_per_atom.append(output_parameters_p['cohesive_energy_per_atom'])
ys_cohesive_energy_per_atom.append(
output_parameters_p["cohesive_energy_per_atom"]
)

return {
'xs': xs,
'ys': ys,
'ys_relative_diff': ys,
'ys_cohesive_energy_per_atom': ys_cohesive_energy_per_atom,
'metadata': {
'unit': '%',
}
"xs": xs,
"ys": ys,
"ys_relative_diff": ys,
"ys_cohesive_energy_per_atom": ys_cohesive_energy_per_atom,
"metadata": {
"unit": "%",
},
}

Loading