Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 19, 2024
1 parent 7254799 commit 2f956fd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ USER root
RUN apt-get update --yes && \
apt-get install --yes --no-install-recommends bc && \
apt-get clean && rm -rf /var/lib/apt/lists/*

COPY ./before-notebook.d/* /usr/local/bin/before-notebook.d/

# Remove content of $HOME
Expand Down
2 changes: 1 addition & 1 deletion before-notebook.d/41_setup-hq-computer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ else
--transport core.local \
--scheduler hyperqueue \
--work-dir /home/${NB_USER}/aiida_run/ \
--mpirun-command "mpirun -np {tot_num_mpiprocs}"
--mpirun-command "mpirun -np {tot_num_mpiprocs}"

verdi computer configure core.local "${HQ_COMPUTER}" \
--non-interactive \
Expand Down
1 change: 0 additions & 1 deletion before-notebook.d/42_start-hq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ fi
# Start hq server with a worker
run-one-constantly hq server start 1>$HOME/.hq-stdout 2>$HOME/.hq-stderr &
run-one-constantly hq worker start --cpus=${CPU_LIMIT} --resource "mem=sum(${MEMORY_LIMIT})" --no-detect-resources &

8 changes: 6 additions & 2 deletions src/aiidalab_qe/common/setup_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ def setup_codes(computer):
try:
subprocess.run(["python", "-c", python_code], capture_output=True, check=True)
except subprocess.CalledProcessError as err:
raise RuntimeError(f"Failed to setup codes, exit_code={err.returncode}, {err.stderr}") from None
raise RuntimeError(
f"Failed to setup codes, exit_code={err.returncode}, {err.stderr}"
) from None


def install_and_setup(computer="localhost", force=False):
Expand Down Expand Up @@ -236,7 +238,9 @@ def _setup(computer):
["python", "-c", python_code], capture_output=True, check=True
)
except subprocess.CalledProcessError as err:
raise RuntimeError(f"Failed to setup codes, exit_code={err.returncode}, {err.stderr}") from None
raise RuntimeError(
f"Failed to setup codes, exit_code={err.returncode}, {err.stderr}"
) from None

except Timeout:
# Assume that the installation was triggered by a different process.
Expand Down

0 comments on commit 2f956fd

Please sign in to comment.