From 06cc6271d43aaadc12961fd89c5302b4528515d7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Yakutovich Date: Sat, 17 Feb 2024 12:16:56 +0100 Subject: [PATCH] Enable pre-commit (#16) --- .pre-commit-config.yaml | 12 ++++++++++++ before-notebook.d/70_setup_cp2k.sh | 2 +- configs/cp2k.yaml | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..ebe2d62 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,12 @@ +--- +ci: + autoupdate_schedule: quarterly + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + - id: check-yaml + - id: check-added-large-files diff --git a/before-notebook.d/70_setup_cp2k.sh b/before-notebook.d/70_setup_cp2k.sh index 5c76533..d662479 100755 --- a/before-notebook.d/70_setup_cp2k.sh +++ b/before-notebook.d/70_setup_cp2k.sh @@ -9,4 +9,4 @@ if verdi code list | grep -q 'cp2k@localhost'; then else echo "CP2K code not found, creating" verdi code create core.code.installed --config /home/${NB_USER}/configs/cp2k.yaml -fi \ No newline at end of file +fi diff --git a/configs/cp2k.yaml b/configs/cp2k.yaml index 72092eb..564d9dd 100644 --- a/configs/cp2k.yaml +++ b/configs/cp2k.yaml @@ -5,4 +5,4 @@ description: '' filepath_executable: /usr/bin/cp2k.psmp label: cp2k prepend_text: export VECLIB_MAXIMUM_THREADS=1 -use_double_quotes: 'False' \ No newline at end of file +use_double_quotes: 'False'