Skip to content

Commit

Permalink
Devops: Exclude CP2K protocol YAML from format hook (#338)
Browse files Browse the repository at this point in the history
The protocol file includes a couple of instances of `ON` and `OFF` that
are intended as literal string values. The formatter strips quotes from
strings without spaces as it is not required in YAML. However, in YAML,
the `ON` and `OFF` values are also aliases for `true` and `false` and so
the formatter standardizes these values to `true` and `false`. The file
is excluded from the formatter for that reason.
  • Loading branch information
sphuber authored Mar 4, 2024
1 parent 340dbee commit b738fd4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 49 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ repos:
args: [--autofix]
- id: pretty-format-yaml
args: [--autofix]
exclude: src/aiida_common_workflows/workflows/relax/cp2k/protocol.yml

- repo: local
hooks:
Expand Down
98 changes: 49 additions & 49 deletions src/aiida_common_workflows/workflows/relax/cp2k/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ moderate:
NHOMO: 1 # all eigenvalues are dumped anyway
NLUMO: 1 # specified neigenvalues are dupmed
MULLIKEN:
_: ON
_: 'ON'
ADD_LAST: SYMBOLIC
EACH:
CELL_OPT: 0
GEO_OPT: 0
MD: 0
LOWDIN:
_: OFF
_: 'OFF'
HIRSHFELD:
_: OFF
_: 'OFF'
MOTION:
PRINT:
TRAJECTORY:
Expand All @@ -78,15 +78,15 @@ moderate:
GEO_OPT: 1
MD: 1
RESTART_HISTORY:
_: OFF
_: 'OFF'
CELL:
_: OFF
_: 'OFF'
VELOCITIES:
_: OFF
_: 'OFF'
FORCES:
_: ON
_: 'ON'
STRESS:
_: ON
_: 'ON'
GEO_OPT:
TYPE: MINIMIZATION #default: MINIMIZATION
OPTIMIZER: BFGS #default: BFGS
Expand Down Expand Up @@ -159,27 +159,27 @@ precise:
PARAMETRIZATION: ORIG
PRINT:
MO:
_: OFF
_: 'OFF'
ADD_LAST: SYMBOLIC
EIGENVALUES: ON
OCCUPATION_NUMBERS: ON
EIGENVALUES: 'ON'
OCCUPATION_NUMBERS: 'ON'
NDIGITS: 12
EACH:
CELL_OPT: 0
GEO_OPT: 0
MD: 0
QS_SCF: 0
MULLIKEN:
_: ON
_: 'ON'
ADD_LAST: SYMBOLIC
EACH:
CELL_OPT: 0
GEO_OPT: 0
MD: 0
LOWDIN:
_: OFF
_: 'OFF'
HIRSHFELD:
_: OFF
_: 'OFF'
MOTION:
PRINT:
TRAJECTORY:
Expand All @@ -195,15 +195,15 @@ precise:
GEO_OPT: 1
MD: 1
RESTART_HISTORY:
_: OFF
_: 'OFF'
CELL:
_: OFF
_: 'OFF'
VELOCITIES:
_: OFF
_: 'OFF'
FORCES:
_: ON
_: 'ON'
STRESS:
_: ON
_: 'ON'
GEO_OPT:
TYPE: MINIMIZATION #default: MINIMIZATION
OPTIMIZER: BFGS #default: BFGS
Expand Down Expand Up @@ -284,16 +284,16 @@ fast:
NHOMO: 1 # all eigenvalues are dumped anyway
NLUMO: 1 # specified neigenvalues are dupmed
MULLIKEN:
_: ON
_: 'ON'
ADD_LAST: SYMBOLIC
EACH:
CELL_OPT: 0
GEO_OPT: 0
MD: 0
LOWDIN:
_: OFF
_: 'OFF'
HIRSHFELD:
_: OFF
_: 'OFF'
MOTION:
PRINT:
TRAJECTORY:
Expand All @@ -309,15 +309,15 @@ fast:
GEO_OPT: 1
MD: 1
RESTART_HISTORY:
_: OFF
_: 'OFF'
CELL:
_: OFF
_: 'OFF'
VELOCITIES:
_: OFF
_: 'OFF'
FORCES:
_: ON
_: 'ON'
STRESS:
_: ON
_: 'ON'
GEO_OPT:
TYPE: MINIMIZATION #default: MINIMIZATION
OPTIMIZER: BFGS #default: BFGS
Expand Down Expand Up @@ -398,27 +398,27 @@ verification-PBE-v1:
PARAMETRIZATION: ORIG
PRINT:
MO:
_: OFF
_: 'OFF'
ADD_LAST: SYMBOLIC
EIGENVALUES: ON
OCCUPATION_NUMBERS: ON
EIGENVALUES: 'ON'
OCCUPATION_NUMBERS: 'ON'
NDIGITS: 12
EACH:
CELL_OPT: 0
GEO_OPT: 0
MD: 0
QS_SCF: 0
MULLIKEN:
_: ON
_: 'ON'
ADD_LAST: SYMBOLIC
EACH:
CELL_OPT: 0
GEO_OPT: 0
MD: 0
LOWDIN:
_: OFF
_: 'OFF'
HIRSHFELD:
_: OFF
_: 'OFF'
MOTION:
PRINT:
TRAJECTORY:
Expand All @@ -434,15 +434,15 @@ verification-PBE-v1:
GEO_OPT: 1
MD: 1
RESTART_HISTORY:
_: OFF
_: 'OFF'
CELL:
_: OFF
_: 'OFF'
VELOCITIES:
_: OFF
_: 'OFF'
FORCES:
_: ON
_: 'ON'
STRESS:
_: ON
_: 'ON'
GEO_OPT:
TYPE: MINIMIZATION #default: MINIMIZATION
OPTIMIZER: BFGS #default: BFGS
Expand Down Expand Up @@ -509,27 +509,27 @@ verification-PBE-v1-sirius:
_: ''
PRINT:
MO:
_: OFF
_: 'OFF'
ADD_LAST: SYMBOLIC
EIGENVALUES: ON
OCCUPATION_NUMBERS: ON
EIGENVALUES: 'ON'
OCCUPATION_NUMBERS: 'ON'
NDIGITS: 12
EACH:
CELL_OPT: 0
GEO_OPT: 0
MD: 0
QS_SCF: 0
MULLIKEN:
_: ON
_: 'ON'
ADD_LAST: SYMBOLIC
EACH:
CELL_OPT: 0
GEO_OPT: 0
MD: 0
LOWDIN:
_: OFF
_: 'OFF'
HIRSHFELD:
_: OFF
_: 'OFF'
SUBSYS:
MOTION:
PRINT:
Expand All @@ -546,15 +546,15 @@ verification-PBE-v1-sirius:
GEO_OPT: 1
MD: 1
RESTART_HISTORY:
_: OFF
_: 'OFF'
CELL:
_: OFF
_: 'OFF'
VELOCITIES:
_: OFF
_: 'OFF'
FORCES:
_: ON
_: 'ON'
STRESS:
_: ON
_: 'ON'
GEO_OPT:
TYPE: MINIMIZATION #default: MINIMIZATION
OPTIMIZER: BFGS #default: BFGS
Expand Down

0 comments on commit b738fd4

Please sign in to comment.